I know this is an old thread, but it looks like the Wagon plugin reads settings.xml (e.g. username) but doesn't use all the settings. I could not get it to stop asking for Kerberos username / password during scp. (It looks like plugins may be changed at the end of 2016 that affect this.) Just add this answer if it helps someone else.
The solution was even simpler for me: skip completely using 'settings.xml' and just specify โscpexeโ instead of โscpโ for the protocol (for example, in the distributionManagement pom.xml section). Then, the default SSH configuration for the computer is used (unix settings in ~ / .ssh).
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>wagon-maven-plugin</artifactId> <version>1.0</version> <executions> <execution> <id>upload-to-server</id> <phase>deploy</phase> <goals><goal>upload-single</goal></goals> <configuration> <fromFile>file-to-upload</fromfile> <url>scpexe://username@serverName/dirname-to-copy-to <toFile>file-to-upload</toFile> </configuration> </execution> </executions> </plugin>
lisarush
source share