I have a hierarchical maven project, from which I am trying to build a native installer for several of the sub-modules. I am using my product name as a prefix: <finalName>xyz-${artifactId}</finalName>
in the parent POM so that all my artifact jars have a standard naming convention.
xyz-parent
+-- util
+--- target/xyz-util.jar
+-- core
+--- target/xyz-core.jar
+-- app1 <--- "builds an installer as part of the package phase"
+--- target/xyz-app1.jar
+-- app2 <--- "builds an installer as part of the package phase"
...
I need to materialize all the dependent jars into a directory (since inno setup knows nothing about maven). So for each submodule which is an installer I plan to use maven-assembly-plugin, then use something like the following in my inno setup:
Source: "target\pkg\lib\*.jar"; DestDir: "{app}\external"; Flags: ignoreversion;
When I run mvn clean package
, I get a target/xyz-app1-bin/xyz-app1/lib
directory with all of the dependent jars, however none of the jars produced by my sibling projects have their correct final names (e.g. I have util-0.0.1-SNAPSHOT.jar
instead of xyz-util.jar
)
This problem seems similar to this post, but I have no idea what "attach" is (perhaps deprecated).