Is there an easier way to copy all the war type artifacts in the child pom from parent pom and the imported boms.
I have the following plugin in the child pom,
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/sources</outputDirectory>
<stripClassifier>true</stripClassifier>
<stripVersion>true</stripVersion>
<includeTypes>war</includeTypes>
<excludeTransitive>false</excludeTransitive>
</configuration>
</execution>
</executions>
</plugin>
This only copies the war artifacts to ${project.build.directory}/sources
directory that are in the current pom, but does not transitively copy the wars from parent or the boms that are imported in parent.
I know that, in the child pom, if I explicitly mention the dependencies, that I am interested to copy, I get the expected results. But I have to manually identify all the war artifacts from parent and it's dependencies (boms) and add those in the child pom, which is very error prone.
Purpose : The child pom is used to generate a distribution build which packages all the war files from parent and it's dependent bom. The distribution package is then released as a jboss deploy-able artifact.
Is there an easier way to achieve what I need?
Note : I have control over only the child pom and the parent pom. I do not have control over the dependencies (boms) in the parent pom.