You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by vpalle <vp...@daimi.au.dk> on 2009/05/26 13:09:21 UTC

maven, ant, antrun:run

When executing 'mvn antrun:run' my tasks are not run.. I have an echo task,
but no output is shown.. When running the phases that the tasks are bound
to, they do get executed..
-- 
View this message in context: http://www.nabble.com/maven%2C-ant%2C-antrun%3Arun-tp23720986p23720986.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: maven, ant, antrun:run

Posted by vpalle <vp...@daimi.au.dk>.
Thank you for the answer. I'm using this specific ant task to deploy an axis
webservice ( with a program called AdminClient). I can only deploy it after
my container ( in this case jetty:run ) has started.. So which phase would
be relevant?


Wayne Fay wrote:
> 
>>                    <execution>
>>                        <id>Ant: deleting
>> EDepotServiceBindingImpl.java</id>
>>                        <phase>generate-sources</phase>
> ...
>>                    <execution>
>>                        <id>Ant: Deploying service with axis-admin</id>
>>                        <phase>pre-integration-test</phase>
> ...
>> As I understand, I should be able to execute my ant tasks, embedded in
>> the
>> above executions, with 'mvn ant:run'... But the message <echo
>> message="Running axis-admin" /> is not shown in the output.. Seems lilke
>> the
>> tasks are not run.
> 
> Since you bound both executions of the plugin to various phases of
> your build's lifecycle, Maven will automatically execute the plugin
> with those configuration values at the proper time of the lifecycle
> during your build -- you do not (and should not) need to type "mvn
> ant:run" -- instead just type "mvn package" or whatever lifecycle you
> wish to execute. Read more here:
> http://maven.apache.org/plugins/maven-antrun-plugin/
> 
> Wayne
> 
> ---------------------------------------------------------------------
> 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/maven%2C-ant%2C-antrun%3Arun-tp23720986p23737664.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: maven, ant, antrun:run

Posted by Wayne Fay <wa...@gmail.com>.
>                    <execution>
>                        <id>Ant: deleting EDepotServiceBindingImpl.java</id>
>                        <phase>generate-sources</phase>
...
>                    <execution>
>                        <id>Ant: Deploying service with axis-admin</id>
>                        <phase>pre-integration-test</phase>
...
> As I understand, I should be able to execute my ant tasks, embedded in the
> above executions, with 'mvn ant:run'... But the message <echo
> message="Running axis-admin" /> is not shown in the output.. Seems lilke the
> tasks are not run.

Since you bound both executions of the plugin to various phases of
your build's lifecycle, Maven will automatically execute the plugin
with those configuration values at the proper time of the lifecycle
during your build -- you do not (and should not) need to type "mvn
ant:run" -- instead just type "mvn package" or whatever lifecycle you
wish to execute. Read more here:
http://maven.apache.org/plugins/maven-antrun-plugin/

Wayne

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


Re: maven, ant, antrun:run

Posted by vpalle <vp...@daimi.au.dk>.
Alright.. This is how the relevant parts of my pom, looks like:

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.2</version>
                <executions>
                    <execution>
                        <id>Ant: deleting EDepotServiceBindingImpl.java</id>
                        <phase>generate-sources</phase>
                        <configuration>
                            <tasks>
                                <delete
file="${generated.source.server.dir}/dk/statsbiblioteket/v20051201/EDepotServiceBindingImpl.java"/>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>

                    <!-- Deploying webservice via axis adminservice servlet
                         , ant task xml must probably be further down than
jetty!
                    -->
                    <execution>
                        <id>Ant: Deploying service with axis-admin</id>
                        <phase>pre-integration-test</phase>
                            <configuration>
                            <tasks>

                                <!-- "import" custom task -->
                                <taskdef name="axis-admin"
classname="org.apache.axis.tools.ant.axis.AdminClientTask"
                                        
classpathref="maven.plugin.classpath">
                                </taskdef>
                                <echo message="Running axis-admin" />
                                <axis-admin
                                        port="8080"
                                        hostname="localhost"
                                        failonerror="true"
                                       
servletpath="EDepotServicePort/services/AdminService"
                                        debug="true"
                                       
xmlfile="${generated.source.server.dir}/dk/statsbiblioteket/v20051201/deploy.wsdd"/>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.axis</groupId>
                        <artifactId>axis-ant</artifactId>
                        <version>1.4</version>
                    </dependency>
                    <dependency>
                        <groupId>axis</groupId>
                        <artifactId>axis</artifactId>
                        <version>1.4</version>
                    </dependency>
                </dependencies>
            </plugin>

As I understand, I should be able to execute my ant tasks, embedded in the
above executions, with 'mvn ant:run'... But the message <echo
message="Running axis-admin" /> is not shown in the output.. Seems lilke the
tasks are not run.



Roman Kournjaev wrote:
> 
> I am sure you ll get a lot of feedback on that one. It has so much details
> about our problem.
> 
> On Tue, May 26, 2009 at 2:09 PM, vpalle <vp...@daimi.au.dk> wrote:
> 
>>
>> When executing 'mvn antrun:run' my tasks are not run.. I have an echo
>> task,
>> but no output is shown.. When running the phases that the tasks are bound
>> to, they do get executed..
>> --
>> View this message in context:
>> http://www.nabble.com/maven%2C-ant%2C-antrun%3Arun-tp23720986p23720986.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
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/maven%2C-ant%2C-antrun%3Arun-tp23720986p23721286.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: maven, ant, antrun:run

Posted by Roman Kournjaev <ko...@gmail.com>.
I am sure you ll get a lot of feedback on that one. It has so much details
about our problem.

On Tue, May 26, 2009 at 2:09 PM, vpalle <vp...@daimi.au.dk> wrote:

>
> When executing 'mvn antrun:run' my tasks are not run.. I have an echo task,
> but no output is shown.. When running the phases that the tasks are bound
> to, they do get executed..
> --
> View this message in context:
> http://www.nabble.com/maven%2C-ant%2C-antrun%3Arun-tp23720986p23720986.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
>
>