Hello Michael,

The jdk.tools dependency is marked optional in the audience-annotations pom.xml 
file:

    <dependency>
      <!-- Version and location set in project pom -->
      <groupId>jdk.tools</groupId>
      <artifactId>jdk.tools</artifactId>
      <scope>system</scope>
      <!-- Mark as optional so that it isn't taken transitively -->
      <optional>true</optional>
    </dependency>

That should have the effect of filtering the jdk.tools dependency out of your 
project.  I just tried setting up a minimal Maven project, and it worked as 
expected.  The build passed, and “mvn dependency:tree” showed no transitive 
dependency on jdk.tools.

Is there something about your Gradle build that would cause it to “promote” 
jdk.tools to a transitive dependency, even though it’s marked optional here?

--Chris Nauroth

On 8/17/16, 7:44 AM, "Michael Kobit" <[email protected]> wrote:

    I'm not sure what happens with Maven, but when trying to consume when using
    Gradle 3.0 I get an error message about unresolved POM dependency.
    
    > Could not resolve org.apache.yetus:audience-annotations:0.3.0.
       > Could not parse POM
    
https://repo1.maven.org/maven2/org/apache/yetus/audience-annotations/0.3.0/audience-annotations-0.3.0.pom
          > Unable to resolve version for dependency 'jdk.tools:jdk.tools:jar'
    > Could not resolve org.apache.yetus:audience-annotations:0.3.0.
       > Could not parse POM
    
https://repo.gradle.org/gradle/repo/org/apache/yetus/audience-annotations/0.3.0/audience-annotations-0.3.0.pom
          > Unable to resolve version for dependency 'jdk.tools:jdk.tools:jar'
    
    
    Any thoughts around this?
    

Reply via email to