You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by merlin <ga...@gmail.com> on 2007/06/04 10:53:31 UTC

maven antrun plugin

dans la documentation maven j ai trouvé le plugin suivant qui me permet de
copier quelques fichiers ds un repertoire cible.

de la maniere suivante:

                <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                                  <executions>
                                    <execution>
                                      <phase>install</phase>
                                      <configuration>
                                        <tasks>
                                          <echo>${exo.directory.base}</echo>
                                          <echo>${exo.directory.v2.x}</echo>
                                         
<echo>${exo.directory.working}</echo>
                                          <copy
todir="${exo.directory.working}/exo-tomcat/webapps">
                                            <fileset
dir="${exo.directory.v2.x}/geoserver/web/target">
                                              <include name="**/*.war"/>
                                            </fileset>
                                          </copy>
                                        </tasks>
                                      </configuration>
                                      <goals>
                                        <goal>run</goal>
                                      </goals>
                                    </execution>
                                  </executions>
            </plugin>

cela marche tres bien tel quel ("mvn install" entraine la copie des fichiers
et se termine avec succes ) sauf que je souhaite que ca se fasse pendant la
phase de deploiement. or si je change <phase>install</phase> par
<phase>deploy</phase> ,  lors du "mvn deploy " j obtiens alors un msg d
erreur. 

est ce que quelqun en connaitrait la cause?
-- 
View this message in context: http://www.nabble.com/maven-antrun-plugin-tf3863830s177.html#a10945960
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 antrun plugin

Posted by Jo Vandermeeren <jo...@gmail.com>.
On 6/4/07, merlin <ga...@gmail.com> wrote:
>
> [WARNING] repository metadata for: 'snapshot
> org.geoserver:web:1.6-SNAPSHOT'
> could not be retrieved from repository: codehaus.org due to an
> error: Unsupported Protocol: 'dav': Cannot find wagon which supports the
> requested protocol: dav
>
> [INFO] Error deploying artifact: Unsupported Protocol: 'dav': Cannot find
> wagon which supports the requested protocol: dav
>

This has nothing to do with binding the antrun plugin to the deploy phase.
The error you get is because webdav deployment is not configured correctly.

Add this extension to your pom to make your project aware of the fact that
you want to use WebDAV:

<project>
   ...
   <build>
      ...
      <extensions>
         <extension>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-webdav</artifactId>
            <version>1.0-beta-2</version>
         </extension>
      </extensions>
   </build>
   ...
</project>


Then try a "mvn deploy" without any extra plugin executions bound to the
deploy phase.
If that works, the extra plugin execution should work as well.

Cheers
Jo

Re: maven antrun plugin

Posted by merlin <ga...@gmail.com>.
sorry for the mistake ... I 've just forgotten to write in english..

So  the problem is that:

if I bind this plugin to the install phase , it 's ok , the files are
copyied and the process ends with success,
but if I bind it to the deploy phase , I 've got an error , I don't know
why..

here is the error details:

[INFO] [deploy:deploy]
altDeploymentRepository = null
[INFO] Retrieving previous build number from codehaus.org
[WARNING] repository metadata for: 'snapshot org.geoserver:web:1.6-SNAPSHOT'
could not be retrieved from repository: codehaus.org due to an
error: Unsupported Protocol: 'dav': Cannot find wagon which supports the
requested protocol: dav
[INFO] Repository 'codehaus.org' will be blacklisted
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error deploying artifact: Unsupported Protocol: 'dav': Cannot find
wagon which supports the requested protocol: dav

Component descriptor cannot be found in the component repository:
org.apache.maven.wagon.Wagondav.


thanks for your help.



Jo Vandermeeren wrote:
> 
> First off, this is an English speaking mailing list..
> So ask your questions in plain English.
> 
> You can indeed bind a plugin execution to a certain phase.
> What is the content of the error message you mentioned?
> 
> Cheers
> Jo
> 
> On 6/4/07, merlin < garcia.jeremie@gmail.com> wrote:
>>
>>
>> dans la documentation maven j ai trouvé le plugin suivant qui me permet
>> de
>> copier quelques fichiers ds un repertoire cible.
>>
>> de la maniere suivante:
>>
>>                 <plugin>
>>                 <groupId> org.apache.maven.plugins</groupId>
>>                 <artifactId>maven-antrun-plugin</artifactId>
>>                                   <executions>
>>                                     <execution>
>>                                       <phase>install</phase>
>>                                       <configuration>
>>                                         <tasks>
>>                                           <echo>${ exo.directory.base
>> }</echo>
>>                                           <echo>${exo.directory.v2.x
>> }</echo>
>>
>> <echo>${exo.directory.working}</echo>
>>                                           <copy
>> todir="${exo.directory.working}/exo-tomcat/webapps">
>>                                             <fileset
>> dir="${exo.directory.v2.x}/geoserver/web/target">
>>                                               <include name="**/*.war"/>
>>                                             </fileset>
>>                                           </copy>
>>                                         </tasks>
>>                                       </configuration>
>>                                       <goals>
>>                                         <goal>run</goal>
>>                                       </goals>
>>                                     </execution>
>>                                   </executions>
>>             </plugin>
>>
>> cela marche tres bien tel quel ("mvn install" entraine la copie des
>> fichiers
>> et se termine avec succes ) sauf que je souhaite que ca se fasse pendant
>> la
>> phase de deploiement. or si je change <phase>install</phase> par
>> <phase>deploy</phase> ,  lors du "mvn deploy " j obtiens alors un msg d
>> erreur.
>>
>> est ce que quelqun en connaitrait la cause?
>> --
>> View this message in context:
>> http://www.nabble.com/maven-antrun-plugin-tf3863830s177.html#a10945960
>>
>> 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-antrun-plugin-tf3863830s177.html#a10946557
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 antrun plugin

Posted by Jo Vandermeeren <jo...@gmail.com>.
First off, this is an English speaking mailing list..
So ask your questions in plain English.

You can indeed bind a plugin execution to a certain phase.
What is the content of the error message you mentioned?

Cheers
Jo

On 6/4/07, merlin < garcia.jeremie@gmail.com> wrote:
>
>
> dans la documentation maven j ai trouvé le plugin suivant qui me permet de
> copier quelques fichiers ds un repertoire cible.
>
> de la maniere suivante:
>
>                 <plugin>
>                 <groupId> org.apache.maven.plugins</groupId>
>                 <artifactId>maven-antrun-plugin</artifactId>
>                                   <executions>
>                                     <execution>
>                                       <phase>install</phase>
>                                       <configuration>
>                                         <tasks>
>                                           <echo>${ exo.directory.base
> }</echo>
>                                           <echo>${exo.directory.v2.x
> }</echo>
>
> <echo>${exo.directory.working}</echo>
>                                           <copy
> todir="${exo.directory.working}/exo-tomcat/webapps">
>                                             <fileset
> dir="${exo.directory.v2.x}/geoserver/web/target">
>                                               <include name="**/*.war"/>
>                                             </fileset>
>                                           </copy>
>                                         </tasks>
>                                       </configuration>
>                                       <goals>
>                                         <goal>run</goal>
>                                       </goals>
>                                     </execution>
>                                   </executions>
>             </plugin>
>
> cela marche tres bien tel quel ("mvn install" entraine la copie des
> fichiers
> et se termine avec succes ) sauf que je souhaite que ca se fasse pendant
> la
> phase de deploiement. or si je change <phase>install</phase> par
> <phase>deploy</phase> ,  lors du "mvn deploy " j obtiens alors un msg d
> erreur.
>
> est ce que quelqun en connaitrait la cause?
> --
> View this message in context: http://www.nabble.com/maven-antrun-plugin-tf3863830s177.html#a10945960
>
> 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
>
>