Uploaded image for project: 'Active and Available Inventory'
  1. Active and Available Inventory
  2. AAI-566

AAI Eclipse build failure - aai-traversal pom has hardcoded 1.8.0_101 jdk.tools version

    Details

      Description

       As a developer of ONAP I wish to build all projects in ONAP

      Using COMMON-17

       The following hardcoded dependency that will only work on systems running 101 (the path is from the system not maven central) – I am running the latest at 120 for aai-traversal

      Description	Resource	Path	Location	Type
      Failed to execute goal on project aai-traversal: Could not resolve dependencies for project org.onap.aai.traversal:aai-traversal:jar:1.1.0-SNAPSHOT: Could not find artifact jdk.tools:jdk.tools:jar:1.8.0_101 at specified path ${JAVA_HOME}/lib/tools.jar (org.apache.maven.plugins:maven-dependency-plugin:2.8:copy-dependencies:copy-dependencies-ajsc-arch-parent-commonLibs:prepare-package)
      
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project aai-traversal: Could not resolve dependencies for project org.onap.aai.traversal:aai-traversal:jar:1.1.0-SNAPSHOT: Could not find artifact jdk.tools:jdk.tools:jar:1.8.0_101 at specified path ${JAVA_HOME}/lib/tools.jar
      at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:221)
      at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
      at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:245)
      at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:330)
      at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362)
      at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1)
      at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
      at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
      at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360)
      at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52)
      at com.ianbrandt.tools.m2e.mdp.core.MdpBuildParticipant.executeMojo(MdpBuildParticipant.java:133)
      at com.ianbrandt.tools.m2e.mdp.core.MdpBuildParticipant.build(MdpBuildParticipant.java:67)
      at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137)
      at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172)
      at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1)
      at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115)
      at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
      at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
      at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105)
      at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
      at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
      at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
      at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86)
      at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
      at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
      at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
      at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)
      at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)
      at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:142)
      at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:232)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
      Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project org.onap.aai.traversal:aai-traversal:jar:1.1.0-SNAPSHOT: Could not find artifact jdk.tools:jdk.tools:jar:1.8.0_101 at specified path ${JAVA_HOME}/lib/tools.jar
      at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:211)
      at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:195)
      ... 35 more
      Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact jdk.tools:jdk.tools:jar:1.8.0_101 at specified path ${JAVA_HOME}/lib/tools.jar
      at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
      at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:205)
      ... 36 more
      Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact jdk.tools:jdk.tools:jar:1.8.0_101 at specified path ${JAVA_HOME}/lib/tools.jar
      at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
      at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
      at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
      ... 37 more
      Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact jdk.tools:jdk.tools:jar:1.8.0_101 at specified path ${JAVA_HOME}/lib/tools.jar
      at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:286)
      ... 39 more
      pom.xml	/aai-traversal	line 6	Maven Build Problem
      

      setting JAVA_HOME in eclipse does not fix it

      A maven force update fixes it if I change the version to mine 1.8.0_121

       

              <dependency>

                  <groupId>jdk.tools</groupId>

                  <artifactId>jdk.tools</artifactId>

                  <version>1.8.0_101</version>

                  <scope>system</scope>

                  <systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>

              </dependency>

        Attachments

          Issue Links

          # Subject Branch Project Status CR V

            Activity

              People

              • Assignee:
                michaelobrien Michael O'Brien
                Reporter:
                michaelobrien Michael O'Brien
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: