• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Wagon-ssh with Maven 2.2

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I want to use wagon-ssh (1.0-beta-7) plugin to deploy my assembled (via assembly:assembly) application to another server using SSH. It failed with a fatal error,

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin descriptor for the plugin Plugin [org.apache.maven.wagon:wagon-ssh] was not found. Please verify that the plugin JAR /Users/sshark/.m2/repository/org/apache/maven/wagon/wagon-ssh/1.0-beta-7/wagon-ssh-1.0-beta-7.jar is intact.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.IllegalStateException: The plugin descriptor for the plugin Plugin [org.apache.maven.wagon:wagon-ssh] was not found. Please verify that the plugin JAR /Users/sshark/.m2/repository/org/apache/maven/wagon/wagon-ssh/1.0-beta-7/wagon-ssh-1.0-beta-7.jar is intact.

My maven and OS versions are stated below. Can anyone help me as of why the wagon plug in is not intact? Does it require maven 3? Thanks

Apache Maven 2.2.1 (r801777; 2009-08-07 03:16:01+0800)
Java version: 1.6.0_24
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x" version: "10.6.8" arch: "x86_64" Family: "mac"


/lim/
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use wagon-ssh all the time. I am currently using Maven 3.0.3 but I am fairly certain that I used it with 2.2.1 a while back. Things I would try:

a) Delete /Users/sshark/.m2/repository/org/apache/maven/wagon/wagon-ssh/ and all of its contents and let Maven download wagon-ssh again.

b) Try an earlier version of wagon-ssh.

Also, please post your pom.xml, at least the part the mentions wagon-ssh. Perhaps it is not correctly defined. (I suspect you defined it as a plugin rather than as an extension).
 
T H Lim
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am guilty of including it as a plugin. How do i I make it as extension? Here is part of my pom.xml. Thanks

 
T H Lim
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I modified my pom.xml to include extension but it still didn't work

 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You now have the extension declared correctly, but you have to remove the plugin (delete lines 26-45)

You have read the docs, right?
http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploy-ssh-external.html
 
T H Lim
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have read the document but it didn't cross my mind there is an "extension" in addition to plugins. I read the article and it was meant to deploy to the repository via SSH. how do I copy an assembled JAR file (not include pom.xml & sources) to another host via SSH? Meanwhile I will reread the docs.

Thanks

/lim/
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

TH Lim wrote:how do I copy an assembled JAR file (not include pom.xml & sources) to another host via SSH?


First, you have to configure the server to use ssh. You need to google to find out how: "configure ssh xxx" - replace xxx with the OS name of the remote machine that you are going to ssh into.

Then you need the scp command. Don't know if OSx comes with that or not, but even if it doesn't there should be one available on the net.

Then run:

scp /path/to/your/.jar remoteusername@remotehostname/path/on/host

Essentially, this is what the Wagon extension does.
 
T H Lim
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Finally, I nailed the problem with this. Thank you for your advise.

 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, so you used the Wagon plugin instead of the Deploy plugin. That's fine, glad you got it working! And thank you for posting your solution.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic