Hi all,

I am using the maven-assembly-plugin to copy some dependencies around. Unfortunately, I have to rename them in some fairly arbitrary fashion, i.e., the final name has nothing to do with the dependencies artifactId or groupId. (And no, I can't change that!)

According to the Maven Reference it should be possible to use a property defined in the dependency's POM as the name of the output file, but cannot make enough sense of the following (from <http://www.sonatype.com/books/mvnref-book/reference/assemblies-sect-output-algorithm.html#assemblies-sect-interpolate>) to figure out how I have to name this property:

If the expression matches the pattern ${artifact.*}:

   1. Match against the dependency’s Artifact instance (resolves: groupId, 
artifactId, version, baseVersion, scope, classifier, and file.*)
   2. Match against the dependency’s ArtifactHandler instance (resolves: 
expression)
   3. Match against the project instance associated with the dependency’s 
Artifact (resolves: mainly POM properties)

If I put <artifact.final.name>arbitrary</artifact.final.name> in the dependency's POM and <outputFileNameMapping>{artifact.final.name}.dat</outputFileNameMapping> in my assembly descriptor's <dependencySet> I think it should work -- only it doesn't. The copied dependency ends up named "{artifact.final.name}.dat". :-(

Any thoughts?

Andreas Sewe


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to