You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Alexandre GIGLEUX (JIRA)" <ji...@codehaus.org> on 2008/07/31 09:00:27 UTC
[jira] Created: (MANTRUN-95) Plugin classpath problem in multi
module maven project
Plugin classpath problem in multi module maven project
------------------------------------------------------
Key: MANTRUN-95
URL: http://jira.codehaus.org/browse/MANTRUN-95
Project: Maven 2.x Antrun Plugin
Issue Type: Bug
Environment: WindowsXP Pro
jdk1.5.0_11
MAVEN 2.0.9
Reporter: Alexandre GIGLEUX
Attachments: ProblemMavenPluginClasspath.zip
We have a pom.xml with <modules> :
<modules>
<module>./Module1</module>
<module>./Module2</module>
</modules>
In Module1 we use the define <dependencies>.
In Module2 we also define <dependencies> for maven-antrun-plugin with other <dependency>.
Problem when we display <echo message="plugin classpath: ${plugin_classpath}" />, in Module2 we have the classpath of the Module1.
The only workaround is to add specific <dependency> of Module2, in Module1 (for the maven-antrun-plugin plugin).
It looks like the plugin classpath is not updated for each Module.
--
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
[jira] Commented: (MANTRUN-95) Plugin classpath problem in multi
module maven project
Posted by "Jean-Marc Borer (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTRUN-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=175282#action_175282 ]
Jean-Marc Borer commented on MANTRUN-95:
----------------------------------------
Same annoying issue for me.
There is another workaround than the one proposed by Alexandre.
Declare a root POM that modules 1 and 2 inherit and in the the pluginManagement section add the dependencies required by each of the plug-ins:
...
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<dependencies>
<dependency>
<groupId>com.example</groupId>
<artifactId>first</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.another</groupId>
<artifactId>second</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
...
Well OK all antrun will inherit those dependencies. So if it is not a problem (version conflicts for example) I find this solution better as it avoids M1 to have a dependency on M2 or that you must count on the build order for your dependencies.
I hope this will be fixed soon. Is it the reactor or the ant plugin that causes this problem?
> Plugin classpath problem in multi module maven project
> ------------------------------------------------------
>
> Key: MANTRUN-95
> URL: http://jira.codehaus.org/browse/MANTRUN-95
> Project: Maven 2.x Antrun Plugin
> Issue Type: Bug
> Environment: WindowsXP Pro
> jdk1.5.0_11
> MAVEN 2.0.9
> Reporter: Alexandre GIGLEUX
> Attachments: ProblemMavenPluginClasspath.zip
>
>
> We have a pom.xml with <modules> :
> <modules>
> <module>./Module1</module>
> <module>./Module2</module>
> </modules>
> In Module1 we use the define <dependencies>.
> In Module2 we also define <dependencies> for maven-antrun-plugin with other <dependency>.
> Problem when we display <echo message="plugin classpath: ${plugin_classpath}" />, in Module2 we have the classpath of the Module1.
> The only workaround is to add specific <dependency> of Module2, in Module1 (for the maven-antrun-plugin plugin).
> It looks like the plugin classpath is not updated for each Module.
--
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
[jira] Closed: (MANTRUN-95) Plugin classpath problem in multi
module maven project
Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTRUN-95?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Gier closed MANTRUN-95.
----------------------------
Resolution: Duplicate
This is a duplicate of MANTRUN-51
> Plugin classpath problem in multi module maven project
> ------------------------------------------------------
>
> Key: MANTRUN-95
> URL: http://jira.codehaus.org/browse/MANTRUN-95
> Project: Maven 2.x Antrun Plugin
> Issue Type: Bug
> Environment: WindowsXP Pro
> jdk1.5.0_11
> MAVEN 2.0.9
> Reporter: Alexandre GIGLEUX
> Attachments: ProblemMavenPluginClasspath.zip
>
>
> We have a pom.xml with <modules> :
> <modules>
> <module>./Module1</module>
> <module>./Module2</module>
> </modules>
> In Module1 we use the define <dependencies>.
> In Module2 we also define <dependencies> for maven-antrun-plugin with other <dependency>.
> Problem when we display <echo message="plugin classpath: ${plugin_classpath}" />, in Module2 we have the classpath of the Module1.
> The only workaround is to add specific <dependency> of Module2, in Module1 (for the maven-antrun-plugin plugin).
> It looks like the plugin classpath is not updated for each Module.
--
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
[jira] Commented: (MANTRUN-95) Plugin classpath problem in multi
module maven project
Posted by "Anders Hammar (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTRUN-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=233189#action_233189 ]
Anders Hammar commented on MANTRUN-95:
--------------------------------------
I believe this issue is caused by a bug in Maven 2.x core, which is very unlikely to be fixed (bad code that can't be fixed). It should not be an issue with Maven 3.0.
> Plugin classpath problem in multi module maven project
> ------------------------------------------------------
>
> Key: MANTRUN-95
> URL: http://jira.codehaus.org/browse/MANTRUN-95
> Project: Maven 2.x Antrun Plugin
> Issue Type: Bug
> Environment: WindowsXP Pro
> jdk1.5.0_11
> MAVEN 2.0.9
> Reporter: Alexandre GIGLEUX
> Attachments: ProblemMavenPluginClasspath.zip
>
>
> We have a pom.xml with <modules> :
> <modules>
> <module>./Module1</module>
> <module>./Module2</module>
> </modules>
> In Module1 we use the define <dependencies>.
> In Module2 we also define <dependencies> for maven-antrun-plugin with other <dependency>.
> Problem when we display <echo message="plugin classpath: ${plugin_classpath}" />, in Module2 we have the classpath of the Module1.
> The only workaround is to add specific <dependency> of Module2, in Module1 (for the maven-antrun-plugin plugin).
> It looks like the plugin classpath is not updated for each Module.
--
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
[jira] Commented: (MANTRUN-95) Plugin classpath problem in multi
module maven project
Posted by "Hannes Schmidt (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTRUN-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=144347#action_144347 ]
Hannes Schmidt commented on MANTRUN-95:
---------------------------------------
I can confirm this issue. The advertised workaround also works for me.
> Plugin classpath problem in multi module maven project
> ------------------------------------------------------
>
> Key: MANTRUN-95
> URL: http://jira.codehaus.org/browse/MANTRUN-95
> Project: Maven 2.x Antrun Plugin
> Issue Type: Bug
> Environment: WindowsXP Pro
> jdk1.5.0_11
> MAVEN 2.0.9
> Reporter: Alexandre GIGLEUX
> Attachments: ProblemMavenPluginClasspath.zip
>
>
> We have a pom.xml with <modules> :
> <modules>
> <module>./Module1</module>
> <module>./Module2</module>
> </modules>
> In Module1 we use the define <dependencies>.
> In Module2 we also define <dependencies> for maven-antrun-plugin with other <dependency>.
> Problem when we display <echo message="plugin classpath: ${plugin_classpath}" />, in Module2 we have the classpath of the Module1.
> The only workaround is to add specific <dependency> of Module2, in Module1 (for the maven-antrun-plugin plugin).
> It looks like the plugin classpath is not updated for each Module.
--
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
[jira] Commented: (MANTRUN-95) Plugin classpath problem in multi
module maven project
Posted by "Ceki Gulcu (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTRUN-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=149812#action_149812 ]
Ceki Gulcu commented on MANTRUN-95:
-----------------------------------
It seems that if a antrun-plugin is declared in say module M0, then the dependency declaration
within the antrun-plugin are ignored nut only if building from the top-level directory. Building
from the module itself, that is from TOP_LEVEL/M0/ folder works fine.
I have tested this with Maven 2.0.8., 2.0.9 and 2.1.0-M1 as well as antrun-plugin and 1.1 and 1.2.
> Plugin classpath problem in multi module maven project
> ------------------------------------------------------
>
> Key: MANTRUN-95
> URL: http://jira.codehaus.org/browse/MANTRUN-95
> Project: Maven 2.x Antrun Plugin
> Issue Type: Bug
> Environment: WindowsXP Pro
> jdk1.5.0_11
> MAVEN 2.0.9
> Reporter: Alexandre GIGLEUX
> Attachments: ProblemMavenPluginClasspath.zip
>
>
> We have a pom.xml with <modules> :
> <modules>
> <module>./Module1</module>
> <module>./Module2</module>
> </modules>
> In Module1 we use the define <dependencies>.
> In Module2 we also define <dependencies> for maven-antrun-plugin with other <dependency>.
> Problem when we display <echo message="plugin classpath: ${plugin_classpath}" />, in Module2 we have the classpath of the Module1.
> The only workaround is to add specific <dependency> of Module2, in Module1 (for the maven-antrun-plugin plugin).
> It looks like the plugin classpath is not updated for each Module.
--
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
[jira] Commented: (MANTRUN-95) Plugin classpath problem in multi
module maven project
Posted by "Thorsten Möller (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTRUN-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=187129#action_187129 ]
Thorsten Möller commented on MANTRUN-95:
----------------------------------------
Please, fix this bug.
It took me more than three hours to spot this bug and another two hours to integrate a nasty tweak in our builds since the suggested workarounds were not directly applicable for us.
> Plugin classpath problem in multi module maven project
> ------------------------------------------------------
>
> Key: MANTRUN-95
> URL: http://jira.codehaus.org/browse/MANTRUN-95
> Project: Maven 2.x Antrun Plugin
> Issue Type: Bug
> Environment: WindowsXP Pro
> jdk1.5.0_11
> MAVEN 2.0.9
> Reporter: Alexandre GIGLEUX
> Attachments: ProblemMavenPluginClasspath.zip
>
>
> We have a pom.xml with <modules> :
> <modules>
> <module>./Module1</module>
> <module>./Module2</module>
> </modules>
> In Module1 we use the define <dependencies>.
> In Module2 we also define <dependencies> for maven-antrun-plugin with other <dependency>.
> Problem when we display <echo message="plugin classpath: ${plugin_classpath}" />, in Module2 we have the classpath of the Module1.
> The only workaround is to add specific <dependency> of Module2, in Module1 (for the maven-antrun-plugin plugin).
> It looks like the plugin classpath is not updated for each Module.
--
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