Keith,
I'm not that familiar with the assembly plugin but looking at the
assembly descriptor reference i found the <attachmentClassifier/> tag,
for which the description says:
"When specified, the attachmentClassifier will cause the assembler to
look at artifacts attached to the module instead of the main project
artifact. If it can find an attached artifact matching the specified
classifier, it will use it; otherwise, it will throw an exception."
Perhaps this does what you want. If this doesn't help you probably
should ask the question in a new thread again so that someone other than
me can step in.
-Tim
Keith Beattie schrieb:
On 6/23/07, Tim Kettler <[EMAIL PROTECTED]> wrote:
Hi,
this should do what you want:
[... very helpful jar-plugin example ...]
Excellent, this works. Thank you very much!
You then probably also want to attach the second artifact to the pom
with the build-helper plugin's [1] attach-artifact goal so that it gets
installed and deployed.
Indeed. But (if I can follow up on this here) I seem to be having trouble
getting the proper incantation between the build-helper and the assembly
descriptor in the top-level pom. At the top, my assembly descriptor is:
<assembly>
<id>dist</id>
<formats>
<format>dir</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<moduleSets>
<moduleSet>
<includes>
<include>edu.wisc.icecube:StringHub</include>
<include>edu.wisc.icecube:secondaryBuilders</include>
<include> edu.wisc.icecube:eventBuilder-prod</include>
<include>edu.wisc.icecube:trigger</include>
</includes>
<binaries>
<outputDirectory></outputDirectory>
<unpack>false</unpack>
</binaries>
</moduleSet>
</moduleSets>
</assembly>
In the project with the multiple jars (the 'trigger' project) I have (in
addition to the jar-plugin solution above) for build-helper:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<classifier>gtrig</classifier>
<file>${project.build.directory}/${artifactId}-${version}-
gtrig.jar</file>
<type>jar</type>
</artifact>
<artifact>
<classifier>ittrig</classifier>
<file>${project.build.directory}/${artifactId}-${version}-
ittrig.jar</file>
<type>jar</type>
</artifact>
<artifact>
<classifier>iitrig</classifier>
<file>${project.build.directory}/${artifactId}-${version}-
iitrig.jar</file>
<type>jar</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
Where there is a one-to-one correspondence between the jar executions and
builder-helper artifacts. This appears to work, based on output from
mvn -X
within that trigger project, but then at the top a 'mvn -X clean package
assembly:assembly' ends with:
[INFO] [assembly:assembly]
[INFO] Reading assembly descriptor:
/home/ksb/Projects/IceCube/pDAQ_Assemble_1326/src/assemble/dist.xml
[DEBUG] No dependency sets specified.
[DEBUG] Processing binary artifact for module project:
edu.wisc.icecube:trigger:jar:1.0.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to create assembly: Error adding file '
edu.wisc.icecube:trigger:jar:1.0.0-SNAPSHOT' to archive:
/home/ksb/Projects/IceCube/pDAQ_Assemble_1326/trigger/target/classes
isn't a
file.
[INFO]
------------------------------------------------------------------------
[DEBUG] Trace
It seems that either the build-helper isn't attaching the artifacts or the
assembly isn't finding them properly, or both. Ideas?
TIA and pointers to more complete docs on how to learn about configuring
these plugins welcomed...
ksb
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]