Skip to main content
1-Visitor
September 4, 2016
Solved

Issue when deploying the "Weather Applications with Raspberry Pi tutorial" using mvn deploy

  • September 4, 2016
  • 3 replies
  • 2920 views

I am unable to deploy the jar on my raspberrypi using the "mvn deploy" command. I am getting error:

[ERROR] Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:1.0-beta-5:upload-single (upload-to-pi) on project temperature-thing: Unable to cr

eate a Wagon instance for scp://pi@raspberrypi/home/pi: Cannot connect. Reason: Algorithm negotiation fail -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:1.0-beta-5:upload-single (upload-t

o-pi) on project temperature-thing: Unable to create a Wagon instance for scp://pi@raspberrypi/home/pi

Can someone please suggest what might be wrong?

Thx/Debanjan

Best answer by rupadhyay

As discussed with you on Web Ex call , We are temporarily able to get rid of errors arising due to mvn deploy command (which is used to move  wars/jars from one machine to target machine ) by manually moving the jar to RPI.

Furthermore , we also noticed after moving the jar to RPI manually , there were errors while executing that jars which can be overcome by providing the IP of the machine rather than hostname. For example :


java -jar ./temperature-thing-jar-with-dependencies.jar ws://192.168.100.100:8080/Thingworx/WS c37370f8-2d92-40c3-bb69-f9f220215739  commands works and


java -jar ./temperature-thing-jar-with-dependencies.jar ws://dbose2l:8080/Thingworx/WS c37370f8-2d92-40c3-bb69-f9f220215739

commands does not works .



Furthermore, I also believe , that mvn deploy command is not able to push the jars on RPI , may be due to similar conflicts .

3 replies

1-Visitor
September 8, 2016

Debanjan Bose​, This issue "Unable to create a Wagon instance for scp://pi@raspberrypi/home/pi " is occurring because you might be running the maven command to deploy to raspberry which is not accessible from that machine.

So you need to Disable  Firewall which might be stopping it (in case you are able to access the raspberry pi through putty from the machine you are deploying )

rupadhyay1-VisitorAnswer
1-Visitor
September 12, 2016

As discussed with you on Web Ex call , We are temporarily able to get rid of errors arising due to mvn deploy command (which is used to move  wars/jars from one machine to target machine ) by manually moving the jar to RPI.

Furthermore , we also noticed after moving the jar to RPI manually , there were errors while executing that jars which can be overcome by providing the IP of the machine rather than hostname. For example :


java -jar ./temperature-thing-jar-with-dependencies.jar ws://192.168.100.100:8080/Thingworx/WS c37370f8-2d92-40c3-bb69-f9f220215739  commands works and


java -jar ./temperature-thing-jar-with-dependencies.jar ws://dbose2l:8080/Thingworx/WS c37370f8-2d92-40c3-bb69-f9f220215739

commands does not works .



Furthermore, I also believe , that mvn deploy command is not able to push the jars on RPI , may be due to similar conflicts .

1-Visitor
September 12, 2016

Right Ravi. I got it to work by explicitly using my machine IP instead of machine name in the TWX url.