I have a project where some of the dependencies have a secondary artifact that I would like to collect & unpack when making my distribution. By using the type and classifier parameters I was able to find these secondary artifacts, which is great.
The only problem is that the transitive dependency tree is quite large and most of the transitive dependencies do not have this secondary artifact, so the build is taking forever looking for things it will never find.
I would like to restrict the search to only certain groupIDs that could possibly have these secondary artifacts. It seems that the includeGroupIds parameter can not accept wildcards.
Is there any way to use wildcard filtering here, or will I have to live the maintenance chore of explicitly listing every group?
Here's an example of what I have now; note the long & hard to maintain list of included groups:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-litescale</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
<classifier>litescale</classifier>
<type>zip</type>
<includeGroupIds>com.foo.group1,com.foo.group2,com.foo.group3,com.foo.group4,com.foo.group5,com.foo.group6</includeGroupIds>
</configuration>
</execution>
</executions>
</plugin>
Here's an example of what I want:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-litescale</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
<classifier>litescale</classifier>
<type>zip</type>
<includeGroupIds>com.foo.*</includeGroupIds>
</configuration>
</execution>
</executions>
</plugin>