You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jean-Marc Borer (JIRA)" <ji...@codehaus.org> on 2009/05/06 17:41:45 UTC

[jira] Commented: (MANTRUN-95) Plugin classpath problem in multi module maven project

    [ 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