You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rick Mann <rm...@latencyzero.com> on 2012/12/17 02:48:30 UTC

Anyone know how to use the ant task scopes?

Anyone at all?

-- 
Rick




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


Re: Anyone know how to use the ant task scopes?

Posted by Rick Mann <rm...@latencyzero.com>.
On Dec 17, 2012, at 3:59 , Martin Gainty <mg...@hotmail.com> wrote:

> Rick depends on where you place declaration in your build.xml global declaration with <property>http://ant.apache.org/manual/Tasks/property.html target-local override with <local>http://ant.apache.org/manual/Tasks/local.html
> is this what you're looking for?

Sorry, I didn't repeat my original issue here. I'm hoping to have one <artifact:dependencies> entry with each dependency having appropriate scope ("compile", "provided", "test"), and then refer to the class path and file list generated by that <artifact:dependencies> from each of my various targets (compile, build, test). So, I want to adjust the "useScope" attribute accordingly, but since it's part of the <artifact:dependencies> element, I don't see a way to do that.

Are you saying I should put a ${} property in there that can be adjusted inside each target, and that will, in turn, adjust the generated class path and file list?

-- 
Rick




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


RE: Anyone know how to use the ant task scopes?

Posted by Martin Gainty <mg...@hotmail.com>.
Rick depends on where you place declaration in your build.xml global declaration with <property>http://ant.apache.org/manual/Tasks/property.html target-local override with <local>http://ant.apache.org/manual/Tasks/local.html
is this what you're looking for?
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

 > Subject: Re: Anyone know how to use the ant task scopes?
> From: rmann@latencyzero.com
> Date: Sun, 16 Dec 2012 19:28:23 -0800
> To: users@maven.apache.org
> 
> 
> On Dec 16, 2012, at 18:06 , Benson Margulies <bi...@gmail.com> wrote:
> 
> > You'll have to be a lot more specific. With the antrun plugin? With
> > something else?
> 
> I've posted a couple times with my specific query, but no replies to it. I set it up a long time ago, so I didn't know there was more than one way to use the maven plugin in ant. In my ~/.ant/lib I have maven-ant-tasks-2.1.3.jar. Here's what I have in my build.xml:
> 
> <project name="proj" default="build-nojar" basedir="." xmlns:artifact="antlib:org.apache.maven.artifact.ant">
> 
> ...
> 
>     <artifact:remoteRepository id="main.repository" url="http://mirrors.ibiblio.org/maven2"/>
> 
> ...
> 
>     <artifact:dependencies pathId="runtime.classpath" filesetId="runtime.fileset" >
> 		
>         <remoteRepository refid="main.repository"/>
> 		
>             <dependency	groupId="com.caucho" artifactId="hessian" version="4.0.7" scope="compile"/>
>             ...
> 
> etc.
> 
> I don't know if that's antrun or something else.
> 
> -- 
> Rick
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
 		 	   		  

Re: Anyone know how to use the ant task scopes?

Posted by Rick Mann <rm...@latencyzero.com>.
On Dec 17, 2012, at 4:18 , Stephen Connolly <st...@gmail.com> wrote:

> that is maven Ant tasks.
> 
> 
> The scope element is used when you have specified "scopes" attr in
> <artifact:dependencies> *however* it is really only of use when you have a
> pomRefId as there is no other way to reference a different set of scopes.
> 
> So the way you would do this is create a <artifact:pom> with all the
> dependencies, e.g.
> https://github.com/apache/cassandra/blob/trunk/build.xml#L319 and then use
> the scopes element to select the scopes you want. I have not done that
> here: https://github.com/apache/cassandra/blob/trunk/build.xml#L517 but
> that is for political reasons, where c* didn't want test scoped
> dependencies in their non-test "pom"s

Thanks, Stephen. I'll see if I can figure it out, but thanks for pointing me at the :pom element.

And thanks for pointing me at Cassandra. A friend at a very large company just told me they're using Cassandra, but thought was commercial. Now I see it isn't :-)

-- 
Rick




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


Re: Anyone know how to use the ant task scopes?

Posted by Stephen Connolly <st...@gmail.com>.
On 17 December 2012 03:28, Rick Mann <rm...@latencyzero.com> wrote:

>
> On Dec 16, 2012, at 18:06 , Benson Margulies <bi...@gmail.com>
> wrote:
>
> > You'll have to be a lot more specific. With the antrun plugin? With
> > something else?
>
> I've posted a couple times with my specific query, but no replies to it. I
> set it up a long time ago, so I didn't know there was more than one way to
> use the maven plugin in ant. In my ~/.ant/lib I have
> maven-ant-tasks-2.1.3.jar. Here's what I have in my build.xml:
>
> <project name="proj" default="build-nojar" basedir="."
> xmlns:artifact="antlib:org.apache.maven.artifact.ant">
>
> ...
>
>     <artifact:remoteRepository id="main.repository" url="
> http://mirrors.ibiblio.org/maven2"/>
>
> ...
>
>     <artifact:dependencies pathId="runtime.classpath"
> filesetId="runtime.fileset" >
>
>         <remoteRepository refid="main.repository"/>
>
>             <dependency groupId="com.caucho" artifactId="hessian"
> version="4.0.7" scope="compile"/>
>             ...
>
> etc.
>
> I don't know if that's antrun or something else.
>

that is maven Ant tasks.


The scope element is used when you have specified "scopes" attr in
<artifact:dependencies> *however* it is really only of use when you have a
pomRefId as there is no other way to reference a different set of scopes.

So the way you would do this is create a <artifact:pom> with all the
dependencies, e.g.
https://github.com/apache/cassandra/blob/trunk/build.xml#L319 and then use
the scopes element to select the scopes you want. I have not done that
here: https://github.com/apache/cassandra/blob/trunk/build.xml#L517 but
that is for political reasons, where c* didn't want test scoped
dependencies in their non-test "pom"s

-Stephen


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

Re: Anyone know how to use the ant task scopes?

Posted by Rick Mann <rm...@latencyzero.com>.
On Dec 16, 2012, at 18:06 , Benson Margulies <bi...@gmail.com> wrote:

> You'll have to be a lot more specific. With the antrun plugin? With
> something else?

I've posted a couple times with my specific query, but no replies to it. I set it up a long time ago, so I didn't know there was more than one way to use the maven plugin in ant. In my ~/.ant/lib I have maven-ant-tasks-2.1.3.jar. Here's what I have in my build.xml:

<project name="proj" default="build-nojar" basedir="." xmlns:artifact="antlib:org.apache.maven.artifact.ant">

...

    <artifact:remoteRepository id="main.repository" url="http://mirrors.ibiblio.org/maven2"/>

...

    <artifact:dependencies pathId="runtime.classpath" filesetId="runtime.fileset" >
		
        <remoteRepository refid="main.repository"/>
		
            <dependency	groupId="com.caucho" artifactId="hessian" version="4.0.7" scope="compile"/>
            ...

etc.

I don't know if that's antrun or something else.

-- 
Rick


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


Re: Anyone know how to use the ant task scopes?

Posted by Benson Margulies <bi...@gmail.com>.
You'll have to be a lot more specific. With the antrun plugin? With
something else?


On Sun, Dec 16, 2012 at 8:48 PM, Rick Mann <rm...@latencyzero.com> wrote:
> Anyone at all?
>
> --
> Rick
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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