You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by noon <ra...@gmail.com> on 2006/12/28 20:47:20 UTC

ANT script without a phase binding?

I've successfully used the maven-antrun-plugin in maven2 projects. Thanks to
the authors of this great plugin :)

Is it possible to run ANT scripits so that they are NOT bind into any Maven
phase? I would like to use ant scripts like it was in Maven 1 ... or to be
more precise, I would like to make my own Maven (pre / post) goals like in
Maven 1 I was able to do ... eventhough pre / post goals are history in
Maven 2.

Thanks already.


-- 
View this message in context: http://www.nabble.com/ANT-script-without-a-phase-binding--tf2891873s177.html#a8079266
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: ANT script without a phase binding?

Posted by Henri Tremblay <he...@gmail.com>.
Hi,

I'm also interested in doing that. But the parameters passed to
antrun:run are quite complex. Can you give me a command line example
of how you would call a given target from a build.xml?

Thanks,
Henri

On 12/28/06, Eric Redmond <er...@gmail.com> wrote:
> Yeah, you can run the "antrun:run" goal directly.
>
> Eric
>
> On 12/28/06, noon <ra...@gmail.com> wrote:
> >
> >
> > I've successfully used the maven-antrun-plugin in maven2 projects. Thanks
> > to
> > the authors of this great plugin :)
> >
> > Is it possible to run ANT scripits so that they are NOT bind into any
> > Maven
> > phase? I would like to use ant scripts like it was in Maven 1 ... or to be
> > more precise, I would like to make my own Maven (pre / post) goals like in
> > Maven 1 I was able to do ... eventhough pre / post goals are history in
> > Maven 2.
> >
> > Thanks already.
> >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/ANT-script-without-a-phase-binding--tf2891873s177.html#a8079266
> > 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
> >
> >
>
>
> --
> Eric Redmond
> http://codehaus.org/~eredmond
>
>

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


Re: ANT script without a phase binding?

Posted by Eric Redmond <er...@gmail.com>.
You can run multiple tasks. In fact, you _have_ the wrap tasks you execute
in the "tasks" element. If you don't nothing will happen.

For example:

            <configuration>
              <tasks>
                <antlr target="calc.g" outputdirectory="target">
                  <classpath refid="maven.plugin.classpath"/>
                </antlr>
              </tasks>
            </configuration>

http://maven.apache.org/plugins/maven-antrun-plugin/usage.html
http://maven.apache.org/plugins/maven-antrun-plugin/classpaths.html


On 12/29/06, noon <ra...@gmail.com> wrote:
>
>
> Hi,
>
> If I run just mvn antrun:run goal, nothing happens, except following
> lines:
>
> [INFO] [antrun:run]
> [INFO] Executing tasks
> [INFO] Executed tasks
> [INFO] --------------------...
> [INFO] BUILD SUCCESSFUL
> [INFO] --------------------...
>
> Could you post an example how to pass the right parameters? How about if I
> have multiple ant tasks (excecution elements) in my pom.xml? Am I able to
> run just one of them?
>
>
>
>
> Eric Redmond wrote:
> >
> > Yeah, you can run the "antrun:run" goal directly.
> >
> > Eric
> >
> > On 12/28/06, noon <ra...@gmail.com> wrote:
> >>
> >>
> >> I've successfully used the maven-antrun-plugin in maven2 projects.
> Thanks
> >> to
> >> the authors of this great plugin :)
> >>
> >> Is it possible to run ANT scripits so that they are NOT bind into any
> >> Maven
> >> phase? I would like to use ant scripts like it was in Maven 1 ... or to
> >> be
> >> more precise, I would like to make my own Maven (pre / post) goals like
> >> in
> >> Maven 1 I was able to do ... eventhough pre / post goals are history in
> >> Maven 2.
> >>
> >> Thanks already.
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/ANT-script-without-a-phase-binding--tf2891873s177.html#a8079266
> >> 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
> >>
> >>
> >
> >
> > --
> > Eric Redmond
> > http://codehaus.org/~eredmond
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/ANT-script-without-a-phase-binding--tf2891873s177.html#a8085605
> 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
>
>


-- 
Eric Redmond
http://codehaus.org/~eredmond

Re: ANT script without a phase binding?

Posted by noon <ra...@gmail.com>.
Hi, 

If I run just mvn antrun:run goal, nothing happens, except following lines:

[INFO] [antrun:run]
[INFO] Executing tasks
[INFO] Executed tasks
[INFO] --------------------...
[INFO] BUILD SUCCESSFUL
[INFO] --------------------...

Could you post an example how to pass the right parameters? How about if I
have multiple ant tasks (excecution elements) in my pom.xml? Am I able to
run just one of them?




Eric Redmond wrote:
> 
> Yeah, you can run the "antrun:run" goal directly.
> 
> Eric
> 
> On 12/28/06, noon <ra...@gmail.com> wrote:
>>
>>
>> I've successfully used the maven-antrun-plugin in maven2 projects. Thanks
>> to
>> the authors of this great plugin :)
>>
>> Is it possible to run ANT scripits so that they are NOT bind into any
>> Maven
>> phase? I would like to use ant scripts like it was in Maven 1 ... or to
>> be
>> more precise, I would like to make my own Maven (pre / post) goals like
>> in
>> Maven 1 I was able to do ... eventhough pre / post goals are history in
>> Maven 2.
>>
>> Thanks already.
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/ANT-script-without-a-phase-binding--tf2891873s177.html#a8079266
>> 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
>>
>>
> 
> 
> -- 
> Eric Redmond
> http://codehaus.org/~eredmond
> 
> 

-- 
View this message in context: http://www.nabble.com/ANT-script-without-a-phase-binding--tf2891873s177.html#a8085605
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: ANT script without a phase binding?

Posted by Eric Redmond <er...@gmail.com>.
Yeah, you can run the "antrun:run" goal directly.

Eric

On 12/28/06, noon <ra...@gmail.com> wrote:
>
>
> I've successfully used the maven-antrun-plugin in maven2 projects. Thanks
> to
> the authors of this great plugin :)
>
> Is it possible to run ANT scripits so that they are NOT bind into any
> Maven
> phase? I would like to use ant scripts like it was in Maven 1 ... or to be
> more precise, I would like to make my own Maven (pre / post) goals like in
> Maven 1 I was able to do ... eventhough pre / post goals are history in
> Maven 2.
>
> Thanks already.
>
>
> --
> View this message in context:
> http://www.nabble.com/ANT-script-without-a-phase-binding--tf2891873s177.html#a8079266
> 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
>
>


-- 
Eric Redmond
http://codehaus.org/~eredmond