Hi,
I have four projects under maven.
I want to be able to run "assembly:assembly" on each projects with minimum
effort.
So I had create a main project with this configuration :
...
<modules>
<module>../aaa</module>
<module>../zzz</module>
<module>../eee</module>
<module>../rrr</module>
</modules>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<descriptors>
<descriptor>${basedir}/assembly/livraison.xml</descriptor>
</descriptors>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
On each child, I add this two pieces of code :
<parent>
<groupId>the.group</groupId>
<artifactId>main</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../main/pom.xml</relativePath>
</parent>
and
<build>
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<!-- see configuration on parent's project -->
</plugin>
...
</plugins>
</build>
Maven help (http://maven.apache.org/pom.html#Plugin_Management) say : Plugin
Management contains plugin elements in much the same way, except that rather
than configuring plugin information for this particular project build, it is
intended to configure project builds that inherit from this one.
But, "assembly:assembly" on the main's pom.xml throw an error :
[INFO] [assembly:assembly]
[INFO] Reading assembly descriptor: /path/to\main/assembly/livraison.xml
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error reading assemblies: Error locating assembly descriptor
Which is completly normal because I do not have assembly descriptor for the
main project.
Plus, the assembly is not done on the childs projects
How can I run assembly:assembly only on the childs projects ??
Thanks