[ http://jira.codehaus.org/browse/MNG-558?page=comments#action_43121 ]
Brett Porter commented on MNG-558: ---------------------------------- this should have been fixed in the last release, but it doesn't appear to be applied > Incorrect groupId, artifactId, version used during install > ---------------------------------------------------------- > > Key: MNG-558 > URL: http://jira.codehaus.org/browse/MNG-558 > Project: Maven 2 > Type: Bug > Components: maven-artifact > Versions: 2.0-alpha-3 > Environment: Maven 2.0-alpha-3, Java 1.5.0_02, WinXP SP2 > Reporter: John Fallows > Priority: Critical > Fix For: 2.0-beta-1 > > > When <pluginManagement> is present in pom.xml with "pom" packaging, > then the last plugin artifact information (groupId, artifactId, > version) is used during m2 install. > <?xml version="1.0" encoding="UTF-8"?> > <project> > <modelVersion>4.0.0</modelVersion> > <groupId>org.example</groupId> > <artifactId>sample</artifactId> > <version>alpha-1</version> > <packaging>pom</packaging> > <pluginManagement> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <version>1.0-alpha-1</version> > </plugin> > </plugins> > </pluginManagement> > </project> > [INFO] > ---------------------------------------------------------------------------- > [INFO] Building org.apache.maven.plugins:maven-compiler-plugin:pom:1.0-alpha-1 > [INFO] > ---------------------------------------------------------------------------- > [INFO] maven-install-plugin: resolved to version 2.0-alpha-3 from > local repository > [INFO] [install:install] > [INFO] Installing C:\Development\Projects\sample\pom.xml to > C:\Documents and > Settings\jfallows\.m2\repository\org\apache\maven\plugins\maven-compiler-plugin\1.0-alpha-1\maven-compiler-plugin-1.0-alpha-1.pom > [INFO] > ---------------------------------------------------------------------------- > [INFO] BUILD SUCCESSFUL > [INFO] > ---------------------------------------------------------------------------- > [INFO] Total time: 1 second > [INFO] Finished at: Thu Jul 07 11:14:11 PDT 2005 > [INFO] Final Memory: 1M/3M > [INFO] > ---------------------------------------------------------------------------- > However, if <pluginManagement> is removed, giving: > <?xml version="1.0" encoding="UTF-8"?> > <project> > <modelVersion>4.0.0</modelVersion> > <groupId>org.example</groupId> > <artifactId>sample</artifactId> > <version>alpha-1</version> > <packaging>pom</packaging> > </project> > then everything works as expected, as shown below: > [INFO] > ---------------------------------------------------------------------------- > [INFO] Building org.example:sample:pom:alpha-1 > [INFO] > ---------------------------------------------------------------------------- > [INFO] maven-install-plugin: resolved to version 2.0-alpha-3 from > local repository > [INFO] [install:install] > [INFO] Installing C:\Development\Projects\sample\pom.xml to > C:\Documents and > Settings\jfallows\.m2\repository\org\example\sample\alpha-1\sample-alpha-1.pom > [INFO] > ---------------------------------------------------------------------------- > [INFO] BUILD SUCCESSFUL > [INFO] > ---------------------------------------------------------------------------- > [INFO] Total time: 1 second > [INFO] Finished at: Thu Jul 07 11:15:54 PDT 2005 > [INFO] Final Memory: 1M/3M > [INFO] > ---------------------------------------------------------------------------- > It doesn't appear to be limited to "pom" packaging, after changing to > "jar" packaging, the m2 install behavior is still incorrectly > influenced by the existence of <pluginManagement> in the pom. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]