Uploaded image for project: 'Maven Wagon'
  1. Maven Wagon
  2. WAGON-454

Settings.xml server configuration not inyected to wagon extension

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.8, 2.9, 2.10
    • None
    • None

    Description

      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:

      settings.xml
              <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>
      
      pom.xml
          <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>
      

      knownHostsProvider is not passed to wagon-ssh. It's always null.

      With wagon-ssh-external:

      settings.xml
              <server>
                  <id>ssh-server</id>
                  <username>sshuser</username>
                  <password>sshpassword</password>
                  <configuration>
                      <sshArgs>-o 'StrictHostKeyChecking=no' -o 'UserKnownHostsFile=/dev/null' </sshArgs>
                  </configuration>
              </server>
      
      pom.xml
          <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>
      

      sshArgs is not passed to wagon-ssh-external. It's always null.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rubensa Rubén Suárez Alvarez
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: