[M2] Problem deploying with maven 2 and Ant

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[M2] Problem deploying with maven 2 and Ant

Leo L
Hi all!
I´m using Jboss4.0.2  and i still get an errorcan you help how can i
configure my build.xml.
I followed what a maven list fellow said about packing with maven and deploy
with ant, and just worry how maven works with ant.
I get that, but i have a problem in my build.xml, i saw many examples and i
couldn´t success yet...
Can anyone help me saying what´s wrong to my .xml´s ????
Here are my pom.xml and my build.xml

pom.xml
...
        <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>compile</phase>
            <configuration>
              <tasks>
                     <echo message="Efetuando o deploy..."/>
                     <ant antfile="build.xml" target="deploy"
inheritAll="true"/>
                     <echo message="Deploy complete"/>

              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
       </plugin>
 ....


my build.xml

<project name="buildDeploy">
  <target name="deploy-live">
    <property name="live.server" value="user@server"/>
    <property name="live.jboss" value="/opt/jboss-4.0.1sp1
/server/default/deploy"/>
    <property name="live.ppa" value="C:/Projects/App/ear/target/EAR-1.0.ear
"/>
    <exec dir="." executable="scp">
       <arg line="${live.ppa} ${live.server}:${live.jboss}/PPAEAR-1.0.ear"
/>
    </exec>
  </target>
  <target name="deploy" depends="deploy-live" />
</project>


The Exception i received:
...

[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
     [echo] Efetuando o deploy...

deploy-live:
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error executing ant tasks

Embedded error: The following error occurred while executing this line:
C:\Projetos\ReportPronim4\ear\build.xml:6: Execute failed:
java.io.IOException:
CreateProcess: scp scp C:/Projetos/ReportPronim4/ear/target/PPAEAR-1.0.earcetil
@ptplinux:/opt/jboss-4.0.1sp1/server/default/deploy/PPAEAR-1.0.ear error=2
[INFO]
------------------------------------------------------------------------
...

what Am i doing wrong????

Regards,

Leo
Reply | Threaded
Open this post in threaded view
|

Re: [M2] Problem deploying with maven 2 and Ant

Wayne Fay
1. Does it work in ant only ie "ant buildDeploy"? Until this works,
there's really no need to test in Maven.

2. Is the command "scp" available on the command line, in your system
path? Type "scp" and make sure it works.

Wayne

On 5/30/06, Leo L <[hidden email]> wrote:

> Hi all!
> I´m using Jboss4.0.2  and i still get an errorcan you help how can i
> configure my build.xml.
> I followed what a maven list fellow said about packing with maven and deploy
> with ant, and just worry how maven works with ant.
> I get that, but i have a problem in my build.xml, i saw many examples and i
> couldn´t success yet...
> Can anyone help me saying what´s wrong to my .xml´s ????
> Here are my pom.xml and my build.xml
>
> pom.xml
> ...
>         <plugin>
>         <artifactId>maven-antrun-plugin</artifactId>
>         <executions>
>           <execution>
>             <phase>compile</phase>
>             <configuration>
>               <tasks>
>                      <echo message="Efetuando o deploy..."/>
>                      <ant antfile="build.xml" target="deploy"
> inheritAll="true"/>
>                      <echo message="Deploy complete"/>
>
>               </tasks>
>             </configuration>
>             <goals>
>               <goal>run</goal>
>             </goals>
>           </execution>
>         </executions>
>        </plugin>
>  ....
>
>
> my build.xml
>
> <project name="buildDeploy">
>   <target name="deploy-live">
>     <property name="live.server" value="user@server"/>
>     <property name="live.jboss" value="/opt/jboss-4.0.1sp1
> /server/default/deploy"/>
>     <property name="live.ppa" value="C:/Projects/App/ear/target/EAR-1.0.ear
> "/>
>     <exec dir="." executable="scp">
>        <arg line="${live.ppa} ${live.server}:${live.jboss}/PPAEAR-1.0.ear"
> />
>     </exec>
>   </target>
>   <target name="deploy" depends="deploy-live" />
> </project>
>
>
> The Exception i received:
> ...
>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
>      [echo] Efetuando o deploy...
>
> deploy-live:
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
>
> Embedded error: The following error occurred while executing this line:
> C:\Projetos\ReportPronim4\ear\build.xml:6: Execute failed:
> java.io.IOException:
> CreateProcess: scp scp C:/Projetos/ReportPronim4/ear/target/PPAEAR-1.0.earcetil
> @ptplinux:/opt/jboss-4.0.1sp1/server/default/deploy/PPAEAR-1.0.ear error=2
> [INFO]
> ------------------------------------------------------------------------
> ...
>
> what Am i doing wrong????
>
> Regards,
>
> Leo
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [M2] Problem deploying with maven 2 and Ant

Roland Asmann
Or just forget about the ant-part and use the jboss-maven-plugin! (See also this thread: Unable to locate local repo in Mac-OSX(how to call ant from maven))

<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jboss-maven-plugin</artifactId>
        <configuration>
                <jbossHome>/path/to/jboss</jbossHome>
        </configuration>
</plugin>

And then run one of its goals (deploy / harddeploy)


Roland



On Tuesday 30 May 2006 21:14, Wayne Fay wrote:

> 1. Does it work in ant only ie "ant buildDeploy"? Until this works,
> there's really no need to test in Maven.
>
> 2. Is the command "scp" available on the command line, in your system
> path? Type "scp" and make sure it works.
>
> Wayne
>
> On 5/30/06, Leo L <[hidden email]> wrote:
> > Hi all!
> > I´m using Jboss4.0.2  and i still get an errorcan you help how can i
> > configure my build.xml.
> > I followed what a maven list fellow said about packing with maven and
> > deploy with ant, and just worry how maven works with ant.
> > I get that, but i have a problem in my build.xml, i saw many examples and
> > i couldn´t success yet...
> > Can anyone help me saying what´s wrong to my .xml´s ????
> > Here are my pom.xml and my build.xml
> >
> > pom.xml
> > ...
> >         <plugin>
> >         <artifactId>maven-antrun-plugin</artifactId>
> >         <executions>
> >           <execution>
> >             <phase>compile</phase>
> >             <configuration>
> >               <tasks>
> >                      <echo message="Efetuando o deploy..."/>
> >                      <ant antfile="build.xml" target="deploy"
> > inheritAll="true"/>
> >                      <echo message="Deploy complete"/>
> >
> >               </tasks>
> >             </configuration>
> >             <goals>
> >               <goal>run</goal>
> >             </goals>
> >           </execution>
> >         </executions>
> >        </plugin>
> >  ....
> >
> >
> > my build.xml
> >
> > <project name="buildDeploy">
> >   <target name="deploy-live">
> >     <property name="live.server" value="user@server"/>
> >     <property name="live.jboss" value="/opt/jboss-4.0.1sp1
> > /server/default/deploy"/>
> >     <property name="live.ppa"
> > value="C:/Projects/App/ear/target/EAR-1.0.ear "/>
> >     <exec dir="." executable="scp">
> >        <arg line="${live.ppa}
> > ${live.server}:${live.jboss}/PPAEAR-1.0.ear" />
> >     </exec>
> >   </target>
> >   <target name="deploy" depends="deploy-live" />
> > </project>
> >
> >
> > The Exception i received:
> > ...
> >
> > [INFO] [antrun:run {execution: default}]
> > [INFO] Executing tasks
> >      [echo] Efetuando o deploy...
> >
> > deploy-live:
> > [INFO]
> > ------------------------------------------------------------------------
> > [ERROR] BUILD ERROR
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Error executing ant tasks
> >
> > Embedded error: The following error occurred while executing this line:
> > C:\Projetos\ReportPronim4\ear\build.xml:6: Execute failed:
> > java.io.IOException:
> > CreateProcess: scp scp
> > C:/Projetos/ReportPronim4/ear/target/PPAEAR-1.0.earcetil
> > @ptplinux:/opt/jboss-4.0.1sp1/server/default/deploy/PPAEAR-1.0.ear
> > error=2 [INFO]
> > ------------------------------------------------------------------------
> > ...
> >
> > what Am i doing wrong????
> >
> > Regards,
> >
> > Leo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [M2] Problem deploying with maven 2 and Ant

Leo L
But, for a remote deploy is also that configuration like local????

<jbossHome>/path/to/jboss</jbossHome>  ????

... and the protocol, user, server ???

Regards,
Leo





2006/5/30, Roland Asmann <[hidden email]>:

>
> Or just forget about the ant-part and use the jboss-maven-plugin! (See
> also this thread: Unable to locate local repo in Mac-OSX(how to call ant
> from maven))
>
> <plugin>
>        <groupId>org.codehaus.mojo</groupId>
>        <artifactId>jboss-maven-plugin</artifactId>
>        <configuration>
>                <jbossHome>/path/to/jboss</jbossHome>
>        </configuration>
> </plugin>
>
> And then run one of its goals (deploy / harddeploy)
>
>
> Roland
>
>
>
> On Tuesday 30 May 2006 21:14, Wayne Fay wrote:
> > 1. Does it work in ant only ie "ant buildDeploy"? Until this works,
> > there's really no need to test in Maven.
> >
> > 2. Is the command "scp" available on the command line, in your system
> > path? Type "scp" and make sure it works.
> >
> > Wayne
> >
> > On 5/30/06, Leo L <[hidden email]> wrote:
> > > Hi all!
> > > I´m using Jboss4.0.2  and i still get an errorcan you help how can i
> > > configure my build.xml.
> > > I followed what a maven list fellow said about packing with maven and
> > > deploy with ant, and just worry how maven works with ant.
> > > I get that, but i have a problem in my build.xml, i saw many examples
> and
> > > i couldn´t success yet...
> > > Can anyone help me saying what´s wrong to my .xml´s ????
> > > Here are my pom.xml and my build.xml
> > >
> > > pom.xml
> > > ...
> > >         <plugin>
> > >         <artifactId>maven-antrun-plugin</artifactId>
> > >         <executions>
> > >           <execution>
> > >             <phase>compile</phase>
> > >             <configuration>
> > >               <tasks>
> > >                      <echo message="Efetuando o deploy..."/>
> > >                      <ant antfile="build.xml" target="deploy"
> > > inheritAll="true"/>
> > >                      <echo message="Deploy complete"/>
> > >
> > >               </tasks>
> > >             </configuration>
> > >             <goals>
> > >               <goal>run</goal>
> > >             </goals>
> > >           </execution>
> > >         </executions>
> > >        </plugin>
> > >  ....
> > >
> > >
> > > my build.xml
> > >
> > > <project name="buildDeploy">
> > >   <target name="deploy-live">
> > >     <property name="live.server" value="user@server"/>
> > >     <property name="live.jboss" value="/opt/jboss-4.0.1sp1
> > > /server/default/deploy"/>
> > >     <property name="live.ppa"
> > > value="C:/Projects/App/ear/target/EAR-1.0.ear "/>
> > >     <exec dir="." executable="scp">
> > >        <arg line="${live.ppa}
> > > ${live.server}:${live.jboss}/PPAEAR-1.0.ear" />
> > >     </exec>
> > >   </target>
> > >   <target name="deploy" depends="deploy-live" />
> > > </project>
> > >
> > >
> > > The Exception i received:
> > > ...
> > >
> > > [INFO] [antrun:run {execution: default}]
> > > [INFO] Executing tasks
> > >      [echo] Efetuando o deploy...
> > >
> > > deploy-live:
> > > [INFO]
> > >
> ------------------------------------------------------------------------
> > > [ERROR] BUILD ERROR
> > > [INFO]
> > >
> ------------------------------------------------------------------------
> > > [INFO] Error executing ant tasks
> > >
> > > Embedded error: The following error occurred while executing this
> line:
> > > C:\Projetos\ReportPronim4\ear\build.xml:6: Execute failed:
> > > java.io.IOException:
> > > CreateProcess: scp scp
> > > C:/Projetos/ReportPronim4/ear/target/PPAEAR-1.0.earcetil
> > > @ptplinux:/opt/jboss-4.0.1sp1/server/default/deploy/PPAEAR-1.0.ear
> > > error=2 [INFO]
> > >
> ------------------------------------------------------------------------
> > > ...
> > >
> > > what Am i doing wrong????
> > >
> > > Regards,
> > >
> > > Leo
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [M2] Problem deploying with maven 2 and Ant

Wayne Fay
In reply to this post by Roland Asmann
I'm really not sure why you can't have a "maven solution" to the
problem and an "ant solution" to the problem that both work but don't
depend on one another.

They are different "products" -- yes you can call Ant from Maven but
obviously its not perfect.

I would give up this "pointless" goal and just write a build.xml
"solution" and a pom.xml "solution" and just keep them separate,
personally. But I prefer to be pragmatic as much as possible.

Wayne

On 5/30/06, Roland Asmann <[hidden email]> wrote:

> Or just forget about the ant-part and use the jboss-maven-plugin! (See also this thread: Unable to locate local repo in Mac-OSX(how to call ant from maven))
>
> <plugin>
>        <groupId>org.codehaus.mojo</groupId>
>        <artifactId>jboss-maven-plugin</artifactId>
>        <configuration>
>                <jbossHome>/path/to/jboss</jbossHome>
>        </configuration>
> </plugin>
>
> And then run one of its goals (deploy / harddeploy)
>
>
> Roland
>
>
>
> On Tuesday 30 May 2006 21:14, Wayne Fay wrote:
> > 1. Does it work in ant only ie "ant buildDeploy"? Until this works,
> > there's really no need to test in Maven.
> >
> > 2. Is the command "scp" available on the command line, in your system
> > path? Type "scp" and make sure it works.
> >
> > Wayne
> >
> > On 5/30/06, Leo L <[hidden email]> wrote:
> > > Hi all!
> > > I´m using Jboss4.0.2  and i still get an errorcan you help how can i
> > > configure my build.xml.
> > > I followed what a maven list fellow said about packing with maven and
> > > deploy with ant, and just worry how maven works with ant.
> > > I get that, but i have a problem in my build.xml, i saw many examples and
> > > i couldn´t success yet...
> > > Can anyone help me saying what´s wrong to my .xml´s ????
> > > Here are my pom.xml and my build.xml
> > >
> > > pom.xml
> > > ...
> > >         <plugin>
> > >         <artifactId>maven-antrun-plugin</artifactId>
> > >         <executions>
> > >           <execution>
> > >             <phase>compile</phase>
> > >             <configuration>
> > >               <tasks>
> > >                      <echo message="Efetuando o deploy..."/>
> > >                      <ant antfile="build.xml" target="deploy"
> > > inheritAll="true"/>
> > >                      <echo message="Deploy complete"/>
> > >
> > >               </tasks>
> > >             </configuration>
> > >             <goals>
> > >               <goal>run</goal>
> > >             </goals>
> > >           </execution>
> > >         </executions>
> > >        </plugin>
> > >  ....
> > >
> > >
> > > my build.xml
> > >
> > > <project name="buildDeploy">
> > >   <target name="deploy-live">
> > >     <property name="live.server" value="user@server"/>
> > >     <property name="live.jboss" value="/opt/jboss-4.0.1sp1
> > > /server/default/deploy"/>
> > >     <property name="live.ppa"
> > > value="C:/Projects/App/ear/target/EAR-1.0.ear "/>
> > >     <exec dir="." executable="scp">
> > >        <arg line="${live.ppa}
> > > ${live.server}:${live.jboss}/PPAEAR-1.0.ear" />
> > >     </exec>
> > >   </target>
> > >   <target name="deploy" depends="deploy-live" />
> > > </project>
> > >
> > >
> > > The Exception i received:
> > > ...
> > >
> > > [INFO] [antrun:run {execution: default}]
> > > [INFO] Executing tasks
> > >      [echo] Efetuando o deploy...
> > >
> > > deploy-live:
> > > [INFO]
> > > ------------------------------------------------------------------------
> > > [ERROR] BUILD ERROR
> > > [INFO]
> > > ------------------------------------------------------------------------
> > > [INFO] Error executing ant tasks
> > >
> > > Embedded error: The following error occurred while executing this line:
> > > C:\Projetos\ReportPronim4\ear\build.xml:6: Execute failed:
> > > java.io.IOException:
> > > CreateProcess: scp scp
> > > C:/Projetos/ReportPronim4/ear/target/PPAEAR-1.0.earcetil
> > > @ptplinux:/opt/jboss-4.0.1sp1/server/default/deploy/PPAEAR-1.0.ear
> > > error=2 [INFO]
> > > ------------------------------------------------------------------------
> > > ...
> > >
> > > what Am i doing wrong????
> > >
> > > Regards,
> > >
> > > Leo
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [M2] Problem deploying with maven 2 and Ant

Roland Asmann
In reply to this post by Leo L
For a remote deploy you might give the cargo-project a go: http://cargo.codehaus.org/

I'm afraid I can't give you any examples for this, since I'm not using it for remote deployment...

Roland



On Tuesday 30 May 2006 21:49, Leo L wrote:

> But, for a remote deploy is also that configuration like local????
>
> <jbossHome>/path/to/jboss</jbossHome>  ????
>
> ... and the protocol, user, server ???
>
> Regards,
> Leo
>
> 2006/5/30, Roland Asmann <[hidden email]>:
> > Or just forget about the ant-part and use the jboss-maven-plugin! (See
> > also this thread: Unable to locate local repo in Mac-OSX(how to call ant
> > from maven))
> >
> > <plugin>
> >        <groupId>org.codehaus.mojo</groupId>
> >        <artifactId>jboss-maven-plugin</artifactId>
> >        <configuration>
> >                <jbossHome>/path/to/jboss</jbossHome>
> >        </configuration>
> > </plugin>
> >
> > And then run one of its goals (deploy / harddeploy)
> >
> >
> > Roland
> >
> > On Tuesday 30 May 2006 21:14, Wayne Fay wrote:
> > > 1. Does it work in ant only ie "ant buildDeploy"? Until this works,
> > > there's really no need to test in Maven.
> > >
> > > 2. Is the command "scp" available on the command line, in your system
> > > path? Type "scp" and make sure it works.
> > >
> > > Wayne
> > >
> > > On 5/30/06, Leo L <[hidden email]> wrote:
> > > > Hi all!
> > > > I´m using Jboss4.0.2  and i still get an errorcan you help how can i
> > > > configure my build.xml.
> > > > I followed what a maven list fellow said about packing with maven and
> > > > deploy with ant, and just worry how maven works with ant.
> > > > I get that, but i have a problem in my build.xml, i saw many examples
> >
> > and
> >
> > > > i couldn´t success yet...
> > > > Can anyone help me saying what´s wrong to my .xml´s ????
> > > > Here are my pom.xml and my build.xml
> > > >
> > > > pom.xml
> > > > ...
> > > >         <plugin>
> > > >         <artifactId>maven-antrun-plugin</artifactId>
> > > >         <executions>
> > > >           <execution>
> > > >             <phase>compile</phase>
> > > >             <configuration>
> > > >               <tasks>
> > > >                      <echo message="Efetuando o deploy..."/>
> > > >                      <ant antfile="build.xml" target="deploy"
> > > > inheritAll="true"/>
> > > >                      <echo message="Deploy complete"/>
> > > >
> > > >               </tasks>
> > > >             </configuration>
> > > >             <goals>
> > > >               <goal>run</goal>
> > > >             </goals>
> > > >           </execution>
> > > >         </executions>
> > > >        </plugin>
> > > >  ....
> > > >
> > > >
> > > > my build.xml
> > > >
> > > > <project name="buildDeploy">
> > > >   <target name="deploy-live">
> > > >     <property name="live.server" value="user@server"/>
> > > >     <property name="live.jboss" value="/opt/jboss-4.0.1sp1
> > > > /server/default/deploy"/>
> > > >     <property name="live.ppa"
> > > > value="C:/Projects/App/ear/target/EAR-1.0.ear "/>
> > > >     <exec dir="." executable="scp">
> > > >        <arg line="${live.ppa}
> > > > ${live.server}:${live.jboss}/PPAEAR-1.0.ear" />
> > > >     </exec>
> > > >   </target>
> > > >   <target name="deploy" depends="deploy-live" />
> > > > </project>
> > > >
> > > >
> > > > The Exception i received:
> > > > ...
> > > >
> > > > [INFO] [antrun:run {execution: default}]
> > > > [INFO] Executing tasks
> > > >      [echo] Efetuando o deploy...
> > > >
> > > > deploy-live:
> > > > [INFO]
> >
> > ------------------------------------------------------------------------
> >
> > > > [ERROR] BUILD ERROR
> > > > [INFO]
> >
> > ------------------------------------------------------------------------
> >
> > > > [INFO] Error executing ant tasks
> > > >
> > > > Embedded error: The following error occurred while executing this
> >
> > line:
> > > > C:\Projetos\ReportPronim4\ear\build.xml:6: Execute failed:
> > > > java.io.IOException:
> > > > CreateProcess: scp scp
> > > > C:/Projetos/ReportPronim4/ear/target/PPAEAR-1.0.earcetil
> > > > @ptplinux:/opt/jboss-4.0.1sp1/server/default/deploy/PPAEAR-1.0.ear
> > > > error=2 [INFO]
> >
> > ------------------------------------------------------------------------
> >
> > > > ...
> > > >
> > > > what Am i doing wrong????
> > > >
> > > > Regards,
> > > >
> > > > Leo
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [M2] Problem deploying with maven 2 and Ant

Roland Asmann
In reply to this post by Wayne Fay
Sure, both should work... But the 'problem' is that using the 'exec'-task in Ant depends on your OS and
availability from the commands you want to issue... Therefor, you should either try to use some Ant-tasks
that are ALWAYS available or completely forget about Ant und do it with Maven.

Just to clarify, I'm not saying it can't be done in Ant, just to be carefull that some tasks are not portable
between OS'es!

Roland



On Tuesday 30 May 2006 21:51, Wayne Fay wrote:

> I'm really not sure why you can't have a "maven solution" to the
> problem and an "ant solution" to the problem that both work but don't
> depend on one another.
>
> They are different "products" -- yes you can call Ant from Maven but
> obviously its not perfect.
>
> I would give up this "pointless" goal and just write a build.xml
> "solution" and a pom.xml "solution" and just keep them separate,
> personally. But I prefer to be pragmatic as much as possible.
>
> Wayne
>
> On 5/30/06, Roland Asmann <[hidden email]> wrote:
> > Or just forget about the ant-part and use the jboss-maven-plugin! (See
> > also this thread: Unable to locate local repo in Mac-OSX(how to call ant
> > from maven))
> >
> > <plugin>
> >        <groupId>org.codehaus.mojo</groupId>
> >        <artifactId>jboss-maven-plugin</artifactId>
> >        <configuration>
> >                <jbossHome>/path/to/jboss</jbossHome>
> >        </configuration>
> > </plugin>
> >
> > And then run one of its goals (deploy / harddeploy)
> >
> >
> > Roland
> >
> > On Tuesday 30 May 2006 21:14, Wayne Fay wrote:
> > > 1. Does it work in ant only ie "ant buildDeploy"? Until this works,
> > > there's really no need to test in Maven.
> > >
> > > 2. Is the command "scp" available on the command line, in your system
> > > path? Type "scp" and make sure it works.
> > >
> > > Wayne
> > >
> > > On 5/30/06, Leo L <[hidden email]> wrote:
> > > > Hi all!
> > > > I´m using Jboss4.0.2  and i still get an errorcan you help how can i
> > > > configure my build.xml.
> > > > I followed what a maven list fellow said about packing with maven and
> > > > deploy with ant, and just worry how maven works with ant.
> > > > I get that, but i have a problem in my build.xml, i saw many examples
> > > > and i couldn´t success yet...
> > > > Can anyone help me saying what´s wrong to my .xml´s ????
> > > > Here are my pom.xml and my build.xml
> > > >
> > > > pom.xml
> > > > ...
> > > >         <plugin>
> > > >         <artifactId>maven-antrun-plugin</artifactId>
> > > >         <executions>
> > > >           <execution>
> > > >             <phase>compile</phase>
> > > >             <configuration>
> > > >               <tasks>
> > > >                      <echo message="Efetuando o deploy..."/>
> > > >                      <ant antfile="build.xml" target="deploy"
> > > > inheritAll="true"/>
> > > >                      <echo message="Deploy complete"/>
> > > >
> > > >               </tasks>
> > > >             </configuration>
> > > >             <goals>
> > > >               <goal>run</goal>
> > > >             </goals>
> > > >           </execution>
> > > >         </executions>
> > > >        </plugin>
> > > >  ....
> > > >
> > > >
> > > > my build.xml
> > > >
> > > > <project name="buildDeploy">
> > > >   <target name="deploy-live">
> > > >     <property name="live.server" value="user@server"/>
> > > >     <property name="live.jboss" value="/opt/jboss-4.0.1sp1
> > > > /server/default/deploy"/>
> > > >     <property name="live.ppa"
> > > > value="C:/Projects/App/ear/target/EAR-1.0.ear "/>
> > > >     <exec dir="." executable="scp">
> > > >        <arg line="${live.ppa}
> > > > ${live.server}:${live.jboss}/PPAEAR-1.0.ear" />
> > > >     </exec>
> > > >   </target>
> > > >   <target name="deploy" depends="deploy-live" />
> > > > </project>
> > > >
> > > >
> > > > The Exception i received:
> > > > ...
> > > >
> > > > [INFO] [antrun:run {execution: default}]
> > > > [INFO] Executing tasks
> > > >      [echo] Efetuando o deploy...
> > > >
> > > > deploy-live:
> > > > [INFO]
> > > > ---------------------------------------------------------------------
> > > >--- [ERROR] BUILD ERROR
> > > > [INFO]
> > > > ---------------------------------------------------------------------
> > > >--- [INFO] Error executing ant tasks
> > > >
> > > > Embedded error: The following error occurred while executing this
> > > > line: C:\Projetos\ReportPronim4\ear\build.xml:6: Execute failed:
> > > > java.io.IOException:
> > > > CreateProcess: scp scp
> > > > C:/Projetos/ReportPronim4/ear/target/PPAEAR-1.0.earcetil
> > > > @ptplinux:/opt/jboss-4.0.1sp1/server/default/deploy/PPAEAR-1.0.ear
> > > > error=2 [INFO]
> > > > ---------------------------------------------------------------------
> > > >--- ...
> > > >
> > > > what Am i doing wrong????
> > > >
> > > > Regards,
> > > >
> > > > Leo
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [M2] Problem deploying with maven 2 and Ant

Stefan Arentz-2
In reply to this post by Roland Asmann
On 5/30/06, Roland Asmann <[hidden email]> wrote:

> Or just forget about the ant-part and use the jboss-maven-plugin! (See also this thread: Unable to locate local repo in Mac-OSX(how to call ant from maven))
>
> <plugin>
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>jboss-maven-plugin</artifactId>
>         <configuration>
>                 <jbossHome>/path/to/jboss</jbossHome>
>         </configuration>
> </plugin>
>
> And then run one of its goals (deploy / harddeploy)

I'm using this plugin too. It kind of works. What I really don't like
is that I have to do a mvn install in my project's top level directory
and then a jboss:deploy in the ear module directory. Is there any way
around that?

 S.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [M2] Problem deploying with maven 2 and Ant

Roland Asmann
Bind it to a certain phase in your ear so that it gets run automatically, eg:

<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jboss-maven-plugin</artifactId>
        <inherited>true</inherited>
        <configuration>
                <jbossHome>${appserver.home}</jbossHome>
        </configuration>
        <executions>
                <execution>
                        <id>deploy</id>
                        <phase>verify</phase>
                        <goals>
                                <goal>harddeploy</goal>
                        </goals>
                </execution>
        </executions>
</plugin>

Roland



On Friday 02 June 2006 15:00, Stefan Arentz wrote:

> On 5/30/06, Roland Asmann <[hidden email]> wrote:
> > Or just forget about the ant-part and use the jboss-maven-plugin! (See
> > also this thread: Unable to locate local repo in Mac-OSX(how to call ant
> > from maven))
> >
> > <plugin>
> >         <groupId>org.codehaus.mojo</groupId>
> >         <artifactId>jboss-maven-plugin</artifactId>
> >         <configuration>
> >                 <jbossHome>/path/to/jboss</jbossHome>
> >         </configuration>
> > </plugin>
> >
> > And then run one of its goals (deploy / harddeploy)
>
> I'm using this plugin too. It kind of works. What I really don't like
> is that I have to do a mvn install in my project's top level directory
> and then a jboss:deploy in the ear module directory. Is there any way
> around that?
>
>  S.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]