You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Rubén Suárez Alvarez (JIRA)" <ji...@apache.org> on 2016/05/03 11:25:12 UTC
[jira] [Created] (MNG-6015) Settings.xml server configuration not
inyected to wagon extension
Rubén Suárez Alvarez created MNG-6015:
-----------------------------------------
Summary: Settings.xml server configuration not inyected to wagon extension
Key: MNG-6015
URL: https://issues.apache.org/jira/browse/MNG-6015
Project: Maven
Issue Type: Bug
Components: core
Affects Versions: 3.3.3
Reporter: Rubén Suárez Alvarez
I'm trying to pass configuration settings from _settings.xml_ to wagon extensions for _wagon-maven-plugin_.
_Configuration_ properties from _server_ tag seems not to be passed anymore (I think those where passed on maven 2.x).
I tried with _wagon-ssh_ and _wagon-ssh-external_ extensions.
With _wagon-ssh_:
{code:xml|title=settings.xml|borderStyle=solid}
<server>
<id>ssh-server</id>
<username>sshuser</username>
<password>sshpassword</password>
<configuration>
<knownHostsProvider
implementation="org.apache.maven.wagon.providers.ssh.knownhost.NullKnownHostProvider">
<hostKeyChecking>no</hostKeyChecking>
</knownHostsProvider>
</configuration>
</server>
{code}
{code:xml|title=pom.xml|borderStyle=solid}
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.10</version>
</extension>
</extensions>
...
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>upload-javadoc</id>
<phase>install</phase>
<goals>
<goal>upload</goal>
</goals>
<configuration>
<fromDir>${basedir}/target</fromDir>
<includes>
${project.artifactId}*
</includes>
<excludes>pom.xml</excludes>
<url>scp://192.168.3.174</url>
<toDir>/opt/doc</toDir>
<serverId>ssh-server</serverId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
{code}
*knownHostsProvider* is not passed to _wagon-ssh_. It's always *null*.
With _wagon-ssh-external_:
{code:xml|title=settings.xml|borderStyle=solid}
<server>
<id>ssh-server</id>
<username>sshuser</username>
<password>sshpassword</password>
<configuration>
<sshArgs>-o 'StrictHostKeyChecking=no' -o 'UserKnownHostsFile=/dev/null' </sshArgs>
</configuration>
</server>
{code}
{code:xml|title=pom.xml|borderStyle=solid}
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh-external</artifactId>
<version>2.10</version>
</extension>
</extensions>
...
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>upload-javadoc</id>
<phase>install</phase>
<goals>
<goal>upload</goal>
</goals>
<configuration>
<fromDir>${basedir}/target</fromDir>
<includes>
${project.artifactId}*
</includes>
<excludes>pom.xml</excludes>
<url>scpexe://192.168.3.174</url>
<toDir>/opt/doc</toDir>
<serverId>ssh-server</serverId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
{code}
*sshArgs* is not passed to _wagon-ssh-external_. It's always *null*.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)