Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-45286

the job of maven can't achive dependencyManagement configuration of SuperPom

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • jenkins:2.60.1
      Apache Maven 3.3.9
      Java version: 1.8.0_101, vendor: Oracle Corporation
      OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"

      Hi all,

      I configured dependencyManagement as bellow

      <dependencyManagement>
      <dependencies>

      <dependency>
      <groupId>org.apache.struts</groupId>
      <artifactId>struts2-core</artifactId>
      <version>2.3.32</version>
      </dependency>

      </dependencies>
      </dependencyManagement>

      And the dependency of pom.xml in the project is as follows

      <dependency>
      <groupId>org.apache.struts</groupId>
      <artifactId>struts2-core</artifactId>

      </dependency>

       

      When I ran this project with maven in command line,everything is OK.But When I create a job with the type of maven in Jenkins,it encountered an error,
      ERROR: Failed to parse POMs
      org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
      [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.apache.mina:mina-core:jar -> version 2.0.0-M6 vs 2.0.5 @ line 458, column 15
      [ERROR] 'dependencies.dependency.version' for org.apache.struts:struts2-core:jar is missing. @ line 283, column 15

      at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:364)
      at hudson.maven.MavenEmbedder.buildProjects(MavenEmbedder.java:361)
      at hudson.maven.MavenEmbedder.readProjects(MavenEmbedder.java:331)
      at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1326)
      at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1123)
      at hudson.FilePath.act(FilePath.java:997)
      at hudson.FilePath.act(FilePath.java:975)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:985)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:690)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:490)
      at hudson.model.Run.execute(Run.java:1735)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:542)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:405)
      Finished: FAILURE
      At last,I recreated the job of this project with free style,the build is success again.

      The attachment is my configuration of the maven job

      Thank you for all to help me with my problem.Due to I can't change all my job into free style,I need to know how to solve this bug without delete the job and recreat another one.

       

            Unassigned Unassigned
            jane151013 z y
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: