Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Java 9+ #20

Open
tpischke-bedag opened this issue Oct 22, 2018 · 3 comments
Open

Support Java 9+ #20

tpischke-bedag opened this issue Oct 22, 2018 · 3 comments

Comments

@tpischke-bedag
Copy link

When including swagger-doclet as a dependency and with Java 9+, a maven dependepency resolution error occurs. This problem is due to the use of the following profile in the project pom:

<profiles>
		<profile>
			<id>default-tools.jar</id>
			<activation>
				<property>
					<name>java.vendor</name>
					<value>Oracle Corporation</value>
				</property>
			</activation>
			<dependencies>
				<dependency>
					<groupId>com.sun</groupId>
					<artifactId>tools</artifactId>
					<version>1.7.0</version>
					<scope>system</scope>
					<systemPath>${java.home}/../lib/tools.jar</systemPath>
				</dependency>
			</dependencies>
		</profile>
	</profiles>

Example of the error when using openJDK 11

[ERROR] Failed to execute goal on project example: Could not resolve dependencies for project com.example:example:jar:openjdk11-SNAPSHOT: Could not find artifact com.sun:tools:jar:1.7.0 at specified path C:\dev\jdk-11.0.1/../lib/tools.jar -> [Help 1]

I haven't yet found a way to cleanly disable the profile dependency in a project using swagger-doclet. Could somebody point me to a workaround, or fix this in this project by include a version in the profile activation section?

@tpischke-bedag
Copy link
Author

Can be worked around with the following exclusion:

<dependency>
      <groupId>com.tenxerconsulting</groupId>
      <artifactId>swagger-doclet</artifactId>
      <version>1.1.3</version>
        <exclusions>
            <exclusion>
                <groupId>com.sun</groupId>
                <artifactId>tools</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

@dnagpal755
Copy link

@bshivam0407
Copy link

@dnagpal755 where you able to find solution for this?

@tpischke-bedag Pls suggest how can it be excluded in docletartifact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants