You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Maruf Aytekin <ma...@aspone.co.uk> on 2007/02/14 17:30:36 UTC

How do I run scp optional task from inside maven 2 ?

I am trying to run scp optional task from inside maven 2 to deploy  a 
maven 2 artifact. I keep getting the following error:


[ERROR] BUILD ERROR
[INFO] 
------------------------------------------------------------------------
[INFO] Error executing ant tasks

Embedded error: Could not create task or type of type: scp.

Ant could not find the task or a class this task relies upon.


I know that scp optional task is in    jsch.x.y.z jar. I couldn't find 
the the ant maven uses. It doesn't use command line ant I couldn't find 
a way to get maven to see this jar. What should I do?


pom.xml

 <artifactId>maven-antrun-plugin</artifactId>
          <executions>
            <execution>
                <id>install</id>
              <phase>install</phase>
              <configuration>
                <tasks>
                    <scp 
file="C:\myproject\customer\target\baydonline-1.0-SNAPSHOT.war"    
                        
todir="username:password@testserver:/cygdrive/c/jboss-4.0.5.GA/server/default/deploy"
                        trust="true"/>
                </tasks>
              </configuration>
              <goals>
                <goal>run</goal>
              </goals>
            </execution>
          </executions>
        </plugin>       

Any idea would be appreciated.

Maruf



Re: How do I run scp optional task from inside maven 2 ?

Posted by Maruf Aytekin <aa...@gmail.com>.
Thanks Wayne, It worked.
I have been trying with jsch instead of ant-jsch.

Maruf


Wayne Fay wrote:
> Add this to the bottom of your plugin node:
>
>           </executions>
>           <dependencies>
>             <dependency>
>               <groupId>ant</groupId>
>               <artifactId>ant-optional</artifactId>
>               <version>1.5.3-1</version>
>             </dependency>
>             <dependency>
>               <groupId>ant</groupId>
>               <artifactId>ant-jsch</artifactId>
>               <version>1.6.5</version>
>             </dependency>
>           </dependencies>
>         </plugin>
>
> Wayne
>
> On 2/14/07, Maruf Aytekin <ma...@aspone.co.uk> wrote:
>> I am trying to run scp optional task from inside maven 2 to deploy  a
>> maven 2 artifact. I keep getting the following error:
>>
>>
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Error executing ant tasks
>>
>> Embedded error: Could not create task or type of type: scp.
>>
>> Ant could not find the task or a class this task relies upon.
>>
>>
>> I know that scp optional task is in    jsch.x.y.z jar. I couldn't find
>> the the ant maven uses. It doesn't use command line ant I couldn't find
>> a way to get maven to see this jar. What should I do?
>>
>>
>> pom.xml
>>
>>  <artifactId>maven-antrun-plugin</artifactId>
>>          <executions>
>>            <execution>
>>                <id>install</id>
>>              <phase>install</phase>
>>              <configuration>
>>                <tasks>
>>                    <scp
>> file="C:\myproject\customer\target\baydonline-1.0-SNAPSHOT.war"
>>
>> todir="username:password@testserver:/cygdrive/c/jboss-4.0.5.GA/server/default/deploy" 
>>
>>                        trust="true"/>
>>                </tasks>
>>              </configuration>
>>              <goals>
>>                <goal>run</goal>
>>              </goals>
>>            </execution>
>>          </executions>
>>        </plugin>
>>
>> Any idea would be appreciated.
>>
>> Maruf
>>
>>
>>
>
> ---------------------------------------------------------------------
> 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


Re: How do I run scp optional task from inside maven 2 ?

Posted by Wayne Fay <wa...@gmail.com>.
Add this to the bottom of your plugin node:

           </executions>
           <dependencies>
             <dependency>
               <groupId>ant</groupId>
               <artifactId>ant-optional</artifactId>
               <version>1.5.3-1</version>
             </dependency>
             <dependency>
               <groupId>ant</groupId>
               <artifactId>ant-jsch</artifactId>
               <version>1.6.5</version>
             </dependency>
           </dependencies>
         </plugin>

Wayne

On 2/14/07, Maruf Aytekin <ma...@aspone.co.uk> wrote:
> I am trying to run scp optional task from inside maven 2 to deploy  a
> maven 2 artifact. I keep getting the following error:
>
>
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
>
> Embedded error: Could not create task or type of type: scp.
>
> Ant could not find the task or a class this task relies upon.
>
>
> I know that scp optional task is in    jsch.x.y.z jar. I couldn't find
> the the ant maven uses. It doesn't use command line ant I couldn't find
> a way to get maven to see this jar. What should I do?
>
>
> pom.xml
>
>  <artifactId>maven-antrun-plugin</artifactId>
>          <executions>
>            <execution>
>                <id>install</id>
>              <phase>install</phase>
>              <configuration>
>                <tasks>
>                    <scp
> file="C:\myproject\customer\target\baydonline-1.0-SNAPSHOT.war"
>
> todir="username:password@testserver:/cygdrive/c/jboss-4.0.5.GA/server/default/deploy"
>                        trust="true"/>
>                </tasks>
>              </configuration>
>              <goals>
>                <goal>run</goal>
>              </goals>
>            </execution>
>          </executions>
>        </plugin>
>
> Any idea would be appreciated.
>
> Maruf
>
>
>

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