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:[EMAIL PROTECTED]:/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 <[EMAIL PROTECTED]>:
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 <[EMAIL PROTECTED]>:
> > > 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:[EMAIL PROTECTED]:/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: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]