maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo L" <leo.ma...@gmail.com>
Subject Re: [M2] Deploy success with ant, but it can improve!
Date Thu, 01 Jun 2006 14:05:38 GMT
Hi Vicent!

Yeah, you already told me about cargo´s plugin for a remote deploy!
For now, i must do the remote deploy, it´s urgent.
But later on, i´ll try some way to colaborate with cargo´s plugin for a
remote deploy.
I goal for now is just copy a file to my local machine for a remote one.
I don´t need stop my jboss, reestart it, no hot deploy...
anyway, just copy the file.
I´m trying that.

I appreciate very much your help Vicent, and i´ll colaborate with this task.
;-)

Thx,
Leo



2006/6/1, Leo L <leo.maven@gmail.com>:
>
>  Yes Roland, i saw that (Use 'inheritRef=true' in your ant-call!
> ), and change, but sorry... i still get the same error.
> It seems that maven ignore my  system classpath, i explicit declare on my
> classpath the jsch.jar that i need.
> When i run only the ant command "ant deploy" works, but with maven, don´t
> work...
>
> Thx anyway, i´ll try to find out a solution for that.
>
> my build.xml
>  <project name="buildDeploy" basedir=".">
>   <target name="deploy">
>  <scp file="theFile.ear" todir="user:password@host:/jboss/instalation"
> knownhosts="${ user.home}/ssh/known_hosts"/>
>         <antlr>
>
>            <classpath refid="maven.plugin.classpath"/>
>         </antlr>
>   </target>
> </project>
>
> pom.xml
> ...
>   <plugin>
>         <artifactId>maven-antrun-plugin</artifactId>
>         <executions>
>           <execution>
>             <phase>install</phase>
>             <configuration>
>               <tasks>
>                   <echo message="Efetuando o deploy..."/>
>                   <ant antfile="build.xml" inheritRefs="true">
>                      <target name="deploy"/>
>                   </ant>
>
>                   <echo message="Deploy complete"/>
>               </tasks>
>             </configuration>
>             <goals>
>               <goal>run</goal>
>             </goals>
>           </execution>
>         </executions>
>         <dependencies>
>           <dependency>
>             <groupId>ant</groupId>
>             <artifactId>ant-antlr</artifactId>
>             <version>1.6.5</version>
>           </dependency>
>           <dependency>
>             <groupId>antlr</groupId>
>             <artifactId>antlrall</artifactId>
>             <version>2.7.4</version>
>           </dependency>
>
>           <dependency>
>             <groupId>jsch</groupId>
>             <artifactId>jsch</artifactId>
>             <version>0.1.28</version>
>           </dependency>
>         </dependencies>
>        </plugin>
> ...
>
> Thx,
>  Leo
>
>
> 2006/6/1, Roland Asmann <Roland.Asmann@cfc.at>:
> >
> > Don't know what's wrong with me today... Copied the wrong part again!
> >
> > Use 'inheritRef=true' in your ant-call!
> >
> > Roland
> >
> >
> >
> > On Thursday 01 June 2006 15:27, Roland Asmann wrote:
> > > Hi Leo,
> > >
> > > According to this page
> > > ( http://maven.apache.org/plugins/maven-antrun-plugin/classpaths.html)
> > it
> > > should... I see only one difference though, you should add '<classpath
> > > refid="maven.plugin.classpath"/>' to the '<ant>'-part. I believe I
> > forgot
> > > to mention that, so blame it on me if you want... ;-)
> > >
> > > Roland
> > >
> > > On Thursday 01 June 2006 15:15, Leo L wrote:
> > > > Hi Roland!
> > > > Thx for the tip, but didn´t work :(
> > > > ...
> > > >      <plugin>
> > > >         <artifactId>maven-antrun-plugin</artifactId>
> > > >          <dependencies>
> > > >           <dependency>
> > > >             <groupId>jsch</groupId>
> > > >             <artifactId>jsch</artifactId>
> > > >             <version>0.1.28</version>
> > > >           </dependency>
> > > >         </dependencies>
> > > >         <executions>
> > > >           <execution>
> > > >             <phase>install</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>
> > > > ...
> > > >
> > > > Still get the same error:
> > > >
> > > >
> > > > [INFO] [antrun:run {execution: default}]
> > > > [INFO] Executing tasks
> > > >      [echo] Efetuando o deploy...
> > > >
> > > > deploy:
> > > > [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:3: Could not create task or
> > type
> > > > of type
> > > >
> > > > : scp.
> > > >
> > > > Ant could not find the task or a class this task relies upon.
> > > >
> > > > This is common and has a number of causes; the usual
> > > > solutions are to read the manual pages then download and
> > > > install needed JAR files, or fix the build file:
> > > >  - You have misspelt 'scp'.
> > > >    Fix: check your spelling.
> > > >  - The task needs an external JAR file to execute
> > > >      and this is not found at the right place in the classpath.
> > > >    Fix: check the documentation for dependencies.
> > > >    Fix: declare the task.
> > > >  - The task is an Ant optional task and the JAR file and/or
> > libraries
> > > >      implementing the functionality were not found at the time you
> > > >      yourself built your installation of Ant from the Ant sources.
> > > >    Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to
> > the
> > > >      task and make sure it contains more than merely a
> > > > META-INF/MANIFEST.MF. If all it contains is the manifest, then
> > rebuild
> > > > Ant with the needed libraries present in ${ant.home}/lib/optional/ ,
> > or
> > > > alternatively, download a pre-built release version from apache.org- The
> > > > build file was written for a later version of Ant
> > > >    Fix: upgrade to at least the latest release version of Ant
> > > >  - The task is not an Ant core or optional task
> > > >      and needs to be declared using <taskdef>.
> > > >  - You are attempting to use a task defined using
> > > >     <presetdef> or <macrodef> but have spelt wrong or not
> > > >    defined it at the point of use
> > > >
> > > > Remember that for JAR files to be visible to Ant tasks implemented
> > > > in ANT_HOME/lib, the files must be in the same directory or on the
> > > > classpath
> > > >
> > > > Please neither file bug reports on this problem, nor email the
> > > > Ant mailing lists, until all of these causes have been explored,
> > > > as this is not an Ant bug.
> > > > [INFO]
> > > >
> > ------------------------------------------------------------------------
> > > > [INFO] For more information, run Maven with the -e switch
> > > > [INFO]
> > > >
> > ------------------------------------------------------------------------
> > > >
> > > >
> > > > Thx anyway,
> > > >  Leo
> > > >
> > > > 2006/6/1, Roland Asmann < Roland.Asmann@cfc.at>:
> > > > > Try giving the plugin some <dependency>-elements for your jar.
> > This
> > > > > should add it to the classpath.
> > > > >
> > > > > Roland
> > > > >
> > > > > On Thursday 01 June 2006 14:41, Leo L wrote:
> > > > > > Hi!
> > > > > >
> > > > > > I obtained success to deploy my App. It´s a remote deploy that
i
> > use
> > > > >
> > > > > maven
> > > > >
> > > > > > to packaging and
> > > > > > ant to copy my .ear file to a remote machine. Works fine, but
> > > > >
> > > > > separately.
> > > > >
> > > > > > First i run "mvn install" from command line, then i run "ant
> > deploy".
> > > > > > I tried to run all with maven, using maven-antrun-plugin and
> > calling
> > > > > > my ant´s build.xml inside my pom, but not success. This because
> > my
> > > > > > target
> > > > >
> > > > > on
> > > > >
> > > > > > build.xml needs the file jsch.jar in classpath and is there,
> > it´s
> > > > > > configured right, but when i run maven, seemed that maven don´t
> > > > >
> > > > > recognized
> > > > >
> > > > > > the system classpath configuration and don´t find the jsch.jarfile.
> > > > > > When i run only the ant command at command line "ant deploy"
> > works
> > > > > > fine, ant get the classpath configuration.
> > > > > >
> > > > > > I wondering if inside my pom.xml i can configure the classpath
> > for
> > > > > > that jsch.jar, so my ant´s script can run with maven.
> > > > > >
> > > > > > Here is a part of my pom.xml:
> > > > > >
> > > > > > ...
> > > > > >   <plugin>
> > > > > >         <artifactId>maven-antrun-plugin</artifactId>
> > > > > >         <executions>
> > > > > >           <execution>
> > > > > >             <phase>install</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" basedir=".">
> > > > > >   <target name="deploy">
> > > > > >  <scp file="myFile.ear" todir="user:password@host
> > :/myJboss/deploy"
> > > > > > knownhosts="${user.home}/ssh/known_hosts"/>
> > > > > >   </target>
> > > > > > </project>
> > > > > >
> > > > > >
> > > > > > I got what i needed, but it can improve!!! :)
> > > > > >
> > > > > > Regards,
> > > > > >
> > > > > > Leo
> > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message