You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Hilco Wijbenga <hi...@gmail.com> on 2009/05/17 09:56:39 UTC

How to reference a specific dependency in maven-antrun-plugin?

Hi all,

The documentation for maven-antrun-plugin lists at the very bottom of
"Referencing the Maven Classpaths":

===== Start snippet =====
You can also use the path to each dependency artifact

<property name="mvn.dependency.jar"
refid="maven.dependency.my.group.id:my.artifact.id:classifier:jar.path"/>
<echo message="My Dependency JAR-Path: ${mvn.dependency.jar}"/>
===== End snippet =====

I've tried several variations but I can't seem to find the right one.
If I have groupId "org.example", artifactId "xyz", and version "1.2",
then what is the magic incantation that uses the above snippet
properly?

I assume it's something like

<property name="mvn.dependency.jar"
refid="maven.dependency.org.example:xyz:classifier:jar.path"/>

but what do I do with "classifier" and "jar.path"?

Cheers,
Hilco

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


Re: How to reference a specific dependency in maven-antrun-plugin?

Posted by yann herrmann <ya...@almiris.fr>.
Hi,

I could not find the exact answer to this question. But if your need is to
use a class of one of your dependency, you can reference the
maven.compile.classpath property as in :

<taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean"
classpathref="maven.compile.classpath"/>

This classpath exposes all the dependencies jar.

Hope this helps.


hilco wrote:
> 
> 2009/5/17 Hilco Wijbenga <hi...@gmail.com>:
>> Hi all,
>>
>> The documentation for maven-antrun-plugin lists at the very bottom of
>> "Referencing the Maven Classpaths":
>>
>> ===== Start snippet =====
>> You can also use the path to each dependency artifact
>>
>> <property name="mvn.dependency.jar"
>> refid="maven.dependency.my.group.id:my.artifact.id:classifier:jar.path"/>
>> <echo message="My Dependency JAR-Path: ${mvn.dependency.jar}"/>
>> ===== End snippet =====
>>
>> I've tried several variations but I can't seem to find the right one.
>> If I have groupId "org.example", artifactId "xyz", and version "1.2",
>> then what is the magic incantation that uses the above snippet
>> properly?
>>
>> I assume it's something like
>>
>> <property name="mvn.dependency.jar"
>> refid="maven.dependency.org.example:xyz:classifier:jar.path"/>
>>
>> but what do I do with "classifier" and "jar.path"?
> 
> Anyone? Is the question not clear? Or is this a dark and unexplored
> area of maven-antrun-plugin? :-)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-reference-a-specific-dependency-in-maven-antrun-plugin--tp23580985p25868126.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: How to reference a specific dependency in maven-antrun-plugin?

Posted by Hilco Wijbenga <hi...@gmail.com>.
2009/5/17 Hilco Wijbenga <hi...@gmail.com>:
> Hi all,
>
> The documentation for maven-antrun-plugin lists at the very bottom of
> "Referencing the Maven Classpaths":
>
> ===== Start snippet =====
> You can also use the path to each dependency artifact
>
> <property name="mvn.dependency.jar"
> refid="maven.dependency.my.group.id:my.artifact.id:classifier:jar.path"/>
> <echo message="My Dependency JAR-Path: ${mvn.dependency.jar}"/>
> ===== End snippet =====
>
> I've tried several variations but I can't seem to find the right one.
> If I have groupId "org.example", artifactId "xyz", and version "1.2",
> then what is the magic incantation that uses the above snippet
> properly?
>
> I assume it's something like
>
> <property name="mvn.dependency.jar"
> refid="maven.dependency.org.example:xyz:classifier:jar.path"/>
>
> but what do I do with "classifier" and "jar.path"?

Anyone? Is the question not clear? Or is this a dark and unexplored
area of maven-antrun-plugin? :-)

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