[
https://issues.apache.org/jira/browse/WAGON-454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15696806#comment-15696806
]
Dan Tran edited comment on WAGON-454 at 11/28/16 2:43 AM:
----------------------------------------------------------
https://github.com/mojohaus/wagon-maven-plugin/issues/8
was (Author: dantran):
see https://github.com/mojohaus/wagon-maven-plugin/issues/7
> Settings.xml server configuration not inyected to wagon extension
> -----------------------------------------------------------------
>
> Key: WAGON-454
> URL: https://issues.apache.org/jira/browse/WAGON-454
> Project: Maven Wagon
> Issue Type: Bug
> Components: wagon-ssh, wagon-ssh-external
> Affects Versions: 2.8, 2.9, 2.10
> 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)