You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by John Fallows <jo...@gmail.com> on 2005/07/07 20:18:25 UTC

[m2] incorrect groupId, artifactId, version used during pom install

Maven 2.0-alpha-3, Java 1.5.0_02, WinXP SP2

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.

Is this a known issue?  

Kind Regards,
John Fallows.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] incorrect groupId, artifactId, version used during pom install

Posted by John Fallows <jo...@gmail.com>.
On 7/7/05, Emmanuel Venisse <em...@venisse.net> wrote:
> Can you create a jira issue?

Done, filed jira issue MNG-588.

http://jira.codehaus.org/browse/MNG-558

Kind Regards,
John Fallows.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] incorrect groupId, artifactId, version used during pom install

Posted by Emmanuel Venisse <em...@venisse.net>.
Can you create a jira issue?

Thanks
Emmanuel

John Fallows wrote:
> Maven 2.0-alpha-3, Java 1.5.0_02, WinXP SP2
> 
> 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.
> 
> Is this a known issue?  
> 
> Kind Regards,
> John Fallows.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org