You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Leo L <le...@gmail.com> on 2006/05/26 20:39:55 UTC

[M2] Deploy with maven-antrun-plugin on Maven2... a deploy task example

Hi!
I want to copy my ear file from my local machine to a remote one.
I realised that is possible using the maven-antrun-plugin but i don´t know
how to configure my task for deploy... i must configure the remote machine,
the destination directory, username, password...

Anyway.... i need help... can anyone help ???

my pom.xml is like this:
...
<plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>deploy</phase>
            <configuration>
              <tasks>
                  <target>
                     <artifact:install-provider artifactId="wagon-ssh"
version="1.0-alpha-5"/>

                     <artifact:deploy file="target/maven-
artifact-ant-2.0-alpha-3.jar">
                     <remoteRepository url="scp://ptplinux/opt/jboss-
4.0.1sp1/server/default">
                             <authentication username="****" privateKey="${
user.home}/.ssh/id_dsa"/>
                     </remoteRepository>
                     <pom refid="maven.project"/>
                     </artifact:deploy>
                     <echo message="Deploy complete"/>
                  </target>
            </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
       </plugin>
...

When i run "mvn install"  the ear is created but not deployed to the remote
machine...
What am i doing wrong???

If anyone has a pom.xml  with this kind of configuration, send me plz... so
i can see how to do it...

Regards,
Leo

Re: [M2] Deploy with maven-antrun-plugin on Maven2... a deploy task example

Posted by Wayne Fay <wa...@gmail.com>.
Also, you are specifying that the deploy should happen in the "deploy"
phase (execution->phase), but then complain when you run "mvn install"
it does not get deployed... As you hopefully know, install happens
before deploy in the Maven lifecycle, so this is "proper" behavior on
the part of Maven.

What happens when you run "mvn deploy" ??

Wayne

On 5/26/06, Wayne Fay <wa...@gmail.com> wrote:
> My approach for making things work with the antrun plugin is as follows:
>
> 1. Build your package with Maven.
> 2. Get the antrun stuff working in ant with a build.xml file by
> calling a simple "ant <target>" command.
> 3. *THEN* worry about copying it into a pom.xml and making it work in Maven.
>
> Wayne
>
> On 5/26/06, Leo L <le...@gmail.com> wrote:
> > Hi!
> > I want to copy my ear file from my local machine to a remote one.
> > I realised that is possible using the maven-antrun-plugin but i don´t know
> > how to configure my task for deploy... i must configure the remote machine,
> > the destination directory, username, password...
> >
> > Anyway.... i need help... can anyone help ???
> >
> > my pom.xml is like this:
> > ...
> > <plugin>
> >         <artifactId>maven-antrun-plugin</artifactId>
> >         <executions>
> >           <execution>
> >             <phase>deploy</phase>
> >             <configuration>
> >               <tasks>
> >                   <target>
> >                      <artifact:install-provider artifactId="wagon-ssh"
> > version="1.0-alpha-5"/>
> >
> >                      <artifact:deploy file="target/maven-
> > artifact-ant-2.0-alpha-3.jar">
> >                      <remoteRepository url="scp://ptplinux/opt/jboss-
> > 4.0.1sp1/server/default">
> >                              <authentication username="****" privateKey="${
> > user.home}/.ssh/id_dsa"/>
> >                      </remoteRepository>
> >                      <pom refid="maven.project"/>
> >                      </artifact:deploy>
> >                      <echo message="Deploy complete"/>
> >                   </target>
> >             </tasks>
> >             </configuration>
> >             <goals>
> >               <goal>run</goal>
> >             </goals>
> >           </execution>
> >         </executions>
> >        </plugin>
> > ...
> >
> > When i run "mvn install"  the ear is created but not deployed to the remote
> > machine...
> > What am i doing wrong???
> >
> > If anyone has a pom.xml  with this kind of configuration, send me plz... so
> > i can see how to do it...
> >
> > Regards,
> > Leo
> >
> >
>

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


Re: [M2] Deploy with maven-antrun-plugin on Maven2... a deploy task example

Posted by Wayne Fay <wa...@gmail.com>.
My approach for making things work with the antrun plugin is as follows:

1. Build your package with Maven.
2. Get the antrun stuff working in ant with a build.xml file by
calling a simple "ant <target>" command.
3. *THEN* worry about copying it into a pom.xml and making it work in Maven.

Wayne

On 5/26/06, Leo L <le...@gmail.com> wrote:
> Hi!
> I want to copy my ear file from my local machine to a remote one.
> I realised that is possible using the maven-antrun-plugin but i don´t know
> how to configure my task for deploy... i must configure the remote machine,
> the destination directory, username, password...
>
> Anyway.... i need help... can anyone help ???
>
> my pom.xml is like this:
> ...
> <plugin>
>         <artifactId>maven-antrun-plugin</artifactId>
>         <executions>
>           <execution>
>             <phase>deploy</phase>
>             <configuration>
>               <tasks>
>                   <target>
>                      <artifact:install-provider artifactId="wagon-ssh"
> version="1.0-alpha-5"/>
>
>                      <artifact:deploy file="target/maven-
> artifact-ant-2.0-alpha-3.jar">
>                      <remoteRepository url="scp://ptplinux/opt/jboss-
> 4.0.1sp1/server/default">
>                              <authentication username="****" privateKey="${
> user.home}/.ssh/id_dsa"/>
>                      </remoteRepository>
>                      <pom refid="maven.project"/>
>                      </artifact:deploy>
>                      <echo message="Deploy complete"/>
>                   </target>
>             </tasks>
>             </configuration>
>             <goals>
>               <goal>run</goal>
>             </goals>
>           </execution>
>         </executions>
>        </plugin>
> ...
>
> When i run "mvn install"  the ear is created but not deployed to the remote
> machine...
> What am i doing wrong???
>
> If anyone has a pom.xml  with this kind of configuration, send me plz... so
> i can see how to do it...
>
> Regards,
> Leo
>
>

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