Im working with the dependency plugin to create a distribution folder for my
company's project. And ive run into a few problems:
1) when using the unpack-dependencies goal - how do I control or set the
name of the folder thats used? the value of <finalName> on the dependents
seems to be ignored, so I windup with something like
packager\target\Release\<artifactId<assemblyID><extention>\
ex:
packager\target\Release\j2ee_A_package_Dist.zip\
packager\target\Release\j2ee_B_package_Dist.zip\
When I want it to be:
packager\target\Release\<finalName>\
ex:
packager\target\Release\j2ee_A\
packager\target\Release\j2ee_B\
2) when using the copy dependencies goal, ive got it copying my system
dependencies to a single folder. But the system dependencies are from
different 3rd party providers, and our requirements need them to be in
various folders according to who provides them. I tried setting a
classifier to represent each type so i could then filter the copy by
classifier name - but then maven started looking in my repository for the
system dependencies. which of course failed. I tried something like this:
<execution>
<id>copy-frm</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/Release/${envType}/dist</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<excludeTransitive>true</excludeTransitive>
<classifier>SFP</classifier>
<copyPom>false</copyPom>
<stripVersion>true</stripVersion>
</configuration>
</execution>
where my parent pom has dependencies listed like so:
<dependency>
<groupId>myCompany</groupId>
<artifactId>NumGen-frmwk</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${FWFolder}NumGen-frmwk.jar</systemPath>
<classifier>SFP</classifier>
</dependency>
and then ${FWFolder} points to a local path on my HD.
but then I would see errors like so:
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-dependency-plugin:2.1:copy-dependencies
(copy-frm) on project NP_Release: not found in any repository:
myCompany:NumGen-frmwk:java-source:SFP:1.0: System artifact:
myCompany:NumGen-frmwk:java-source:SFP:1.0:system has no file attached
[ERROR]
[ERROR] Try downloading the file manually from the project website.
So How can I get thes files copied to folders based on an arbitrary
category?