i have an multi-module maven project with the following structure:
- Root
- sub-module1
- sub-module2
- sub-module3
Now i created an maven plugin that should generate sources. I've added the plugin to the pom of sub-module2. This plugin configuration has an dependency to "sub-module1". So if i call now "mvn clean compile" on "sub-module2" the plugin generates me sources by information of "sub-module1". But if i call now "mvn clean compile" on the Root project, the sources aren't generated. The plugin is executed but it seams like that the plugin dependency to th sub-module 1 isn't added to the classpath :/ ... has anyone an idea where is the problem? Is it a maven bug?
EDIT:
It's an plugin i wrote myself ... its for generating flex source files by some xml files of sub-module1. The plugin runs in the "generate-sources" phase. This is how the plugin is configured in the pom:
<plugin>
<groupId>xxx</groupId>
<artifactId>code-generator-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- Generate by default only classes for our metadata -->
<catalogs>
<catalog>/xxx/.*</catalog>
</catalogs>
<!-- Generated files will be placed directly in the source folder -->
<outputFolder>src/main/flex</outputFolder>
</configuration>
<dependencies>
<!-- Don't forgot this dependency to the API project -->
<dependency>
<groupId>xxx</groupId>
<artifactId>api</artifactId>
<!-- We have to put version here because dependencyManagement -->
<!-- doesn't work for plugin dependencies -->
<version>${project.version}</version>
</dependency>
</dependencies>
</plugin>
This is the plugin defined in the pom of sub-module2 ... the dependency to the artifactId "api" is the "sub-module1" i described on top of my post