You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ryan Jaeb <ry...@jptech.ca> on 2009/08/15 03:33:06 UTC
Can I reference a dependency artifactId in a POM?
Hi,
I'm wondering if there's a way in Maven 2 to reference the artifactId
of a dependency that was used for a build. For example, I have a flex
module with:
<finalName>${project.artifactId}-r${build.vcs.number}</finalName>
It produces an artifactId like:
my-flex-ui-1.0-SNAPSHOT-r12345
I'm trying to include the artifact id in a .html wrapper task provided
by flexmojos. The artifactId of the dependency should get injected
into the .html file created by the wrapper execution. So far the only
solution I've found is to use the <stripVersion>true</stripVersion>
parameter of the dependency plugin when copying my resources over (I
actually use the flexmojos-maven-plugin for this, but it works the
same way). I'd prefer to use a more verbose artifactId for my
dependency. Here's my execution portion of the
'flexmojos-maven-plugin'
<!--
This execution creates a html wrapper for my flex project (module).
The artifact
name specified in the 'swf' parameter is injected into the .html wrapper.
-->
<execution>
<id>create-wrapper</id>
<goals>
<goal>wrapper</goal>
</goals>
<configuration>
<htmlName>index</htmlName>
<outputDirectory>${project.build.directory}/html-wrapper</outputDirectory>
<parameters>
<title>ITMA Flex UI</title>
<application>itma-flex-ui</application>
<!--
This is the artifact name (prefix) that will be injected into the
.html wrapper that is created. I'd prefer to use something like:
dependencies:ca.jptech.itma:itma-flex-ui:artifactId
that references the exact artifactId for the itma-flex-ui
dependency used for this build. For example:
itma-flex-ui-1.0-SNAPSHOT-r12345
Does anything like that exist?
-->
<swf>itma-flex-ui</swf>
<width>100%</width>
<height>100%</height>
</parameters>
</configuration>
</execution>
I hope that gets formatted properly. Here is the usage doc for the execution:
http://sites.sonatype.org/flexmojos/flexmojos-maven-plugin/wrapper-mojo.html
TIA for any help,
Ryan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org