Uploaded image for project: 'Maven Release Plugin'
  1. Maven Release Plugin
  2. MRELEASE-400

Failed to validate POM for project ... at ...\release-pom.xml

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Auto Closed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: prepare-with-pom
    • Labels:
      None

      Description

      When releasing the multimodule project and one of the transitive dependencies is tools.jar a fatal error occurs.

      mvn release:prepare -DgenerateReleasePoms=true

      ...
      [INFO] Executing: mvn clean verify --no-plugin-updates -P proxy
      [INFO] Scanning for projects...
              [INFO] NOTE: Using release-pom: C:\eclipse\workspace\trident-project\release-pom.xml in reactor build.
              [INFO] NOTE: Using release-pom: C:\eclipse\workspace\trident-project\trident-admin\release-pom.xml in reactor build.
              [INFO] ------------------------------------------------------------------------
              [ERROR] FATAL ERROR
              [INFO] ------------------------------------------------------------------------
              [INFO] Error building POM (may not be this project's POM).
      
      
              Project ID: com.interseek:trident-admin
              POM Location: C:\eclipse\workspace\trident-project\trident-admin\release-pom.xml
              Validation Messages:
      
              [0]  For dependency Dependency {groupId=com.sun, artifactId=tools, version=1.5.0, type=jar}: system-scoped dependency must specify systemPath.
      
      
              Reason: Failed to validate POM for project com.interseek:trident-admin at C:\eclipse\workspace\trident-project\trident-admin\release-pom.xml
      
      
              [INFO] ------------------------------------------------------------------------
              [INFO] Trace
              org.apache.maven.reactor.MavenExecutionException: Failed to validate POM for project com.interseek:trident-admin at C:\eclipse\workspace\trident-project\trident-admin\release-pom.xml
                      at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
                      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:292)
                      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
                      at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:585)
                      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
                      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
                      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
                      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
              Caused by: org.apache.maven.project.InvalidProjectModelException: Failed to validate POM for project com.interseek:trident-admin at C:\eclipse\workspace\trident-project\trident-admin\release-pom.xml
                      at org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:1108)
                      at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:878)
                      at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:506)
                      at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:198)
                      at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:583)
                      at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:461)
                      at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:534)
                      at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
                      ... 11 more
              [INFO] ------------------------------------------------------------------------
              [INFO] Total time: < 1 second
              [INFO] Finished at: Wed Oct 08 11:14:22 CEST 2008
              [INFO] Final Memory: 1M/2M
              [INFO] ------------------------------------------------------------------------
              [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Maven execution failed, exit code: '1'
      
      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 57 seconds
      [INFO] Finished at: Wed Oct 08 11:14:22 CEST 2008
      [INFO] Final Memory: 8M/14M
      [INFO] ------------------------------------------------------------------------
      

      The 3rd party pom has this in the POM:

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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              svarog svarog
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: