3

Reading the deploy manual id like to specify a different port using

<sshArgs>-P 7221</sshArgs>

in the settings.xml.

But I get a

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy 
  (default-deploy) on project french-toast: Failed to retrieve remote metadata 
  com.foobar:french-toast:1.1.0-SNAPSHOT/maven-metadata.xml: Could not transfer metadata 
  com.foobar:french-toast:1.1.0-SNAPSHOT/maven-metadata.xml from/to french-id 
  (scpexe://[email protected]/): Exit code: 1 - ssh: connect to host www.french.com 
  port 22: Connection refused -> [Help 1]

The port 22 is used.

How to change the port? What did I miss?

9
  • Why would you like to change the port? ssh port is port 22 ? Can you do an ssh ... manually?
    – khmarbaise
    Mar 4, 2017 at 9:14
  • Can you share your pom.xml? And your settings.xml?
    – Adonis
    Mar 4, 2017 at 16:08
  • By the way, why not using the ssh syntax user@host:port ? (or have you already tried it?)
    – Adonis
    Mar 4, 2017 at 16:36
  • Take a look stackoverflow.com/a/1406397/1746118 might help.
    – Naman
    Mar 4, 2017 at 18:32
  • @kh Wegen der verfluchten hacker.
    – Grim
    Mar 5, 2017 at 17:59

2 Answers 2

1

Actually the ssh argument for a port is [-p port] (notice that your are using a capital P), see a man ssh page. Alternatively, you could also use the ssh syntax, i.e. user@host:port

0

*Go to your deploy profile inside pom and in the configuration tag add and specify the port.

<configuration>
               <user>serverusername</user>
                  <password>serverpass@$#</password>
                  <name>project.build.finalName</name>
                    <adminurl>localhost:7003</adminurl>      ---> Here is the answer                   
               <source>youdirectory/finalName.packaging</source>
</configuration>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.