[ http://jira.codehaus.org/browse/MNG-4178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=178556#action_178556 ]
Krashan Brahmanjara commented on MNG-4178: ------------------------------------------ True but if childs projects use this plugin that all got the same dependency from parent. This may results with this error The projects in the reactor contain a cyclic reference: Edge between 'Vertex{label='...'}' and 'Vertex{label='...'}' introduces to cycle in the graph (...) --> (...) --> (...) [INFO] I don't see method to exclude this dependency. For example I try assign dependency in parent only to specified goal <build> <pluginManagement> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxws-maven-plugin</artifactId> <goals> <goal>wsgen</goal> </goals> <dependencies> <dependency> <groupId>${groupId}</groupId> <artifactId>oss-services-ejb</artifactId> <version>${version}</version> <classifier>client</classifier> </dependency> </dependencies> </plugin> </plugins> </pluginManagement> </build> > Plugin dependency not always included to classpath > -------------------------------------------------- > > Key: MNG-4178 > URL: http://jira.codehaus.org/browse/MNG-4178 > Project: Maven 2 > Issue Type: Bug > Affects Versions: 2.1.0 > Environment: mvn 2.1.0 > Reporter: Krashan Brahmanjara > > Plugins not always see their dependencies. > For example. I got project with parent project - > - if I run mvn install on child project mvn package runs correctly. > - if i run mvn install on parent project then child project is build with > error, plugin doesn't see their dependency and fails with class not found > Example of child project > Short example > <?xml version="1.0" encoding="UTF-8"?> > <project xmlns="http://maven.apache.org/POM/4.0.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/maven-v4_0_0.xsd"> > <modelVersion>4.0.0</modelVersion> > <parent> > <groupId>oss</groupId> > <artifactId>oss</artifactId> > <version>1.0.0-SNAPSHOT</version> > <relativePath>../pom.xml</relativePath> > </parent> > <groupId>oss</groupId> > <artifactId>oss-ws</artifactId> > <packaging>war</packaging> > (...) > <dependencies> > <dependency> > <groupId>${groupId}</groupId> > <artifactId>oss-rpc</artifactId> > <version>${version}</version> > <scope>provided</scope> <!-- if > dependecy is compile evething runs ok--> > </dependency> > </dependencies> > <build> > <plugins> > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>jaxws-maven-plugin</artifactId> > <executions> > <execution> > <id>wsdl_generate_service_classes</id> > <phase>process-classes</phase> > <goals> > <goal>wsgen</goal> > </goals> > <configuration> > <genWsdl>true</genWsdl> > <sei>oss.ossServiceImpl</sei> > </configuration> > </execution> > </executions> > <dependencies> > <dependency> > <groupId>${groupId}</groupId> > <artifactId>oss-rpc</artifactId> > <version>${version}</version> > </dependency> > </dependencies> > </plugin> > (...) > Parent project > (..) > <modules> > <module>oss</module> > </modules> -- 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