-1

我们的团队正在使用不同版本的 Maven 测试wagon-maven-plugin,因为我们计划从Java 8迁移到Java 11。我们也想升级 Maven 和 Tycho 版本。新版本的 Maven 是否与插件兼容?

目标“download-single”和“download”挂在 Maven 3.6.3 和 Maven 3.8.4 上。我们使用wagon-maven-plugin 版本 2.0.2。我们用不同的版本进行了测试,但没有任何成功。上传按预期工作。文件下载开始但无法完成。下载只是挂起,我们只破坏了部分下载的文件。它与 Maven 3.5.4 一起工作。

示例 pom.xml:

<project>
    [...]
    <build>
        [...]
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh</artifactId>
                <version>3.5.1</version>
            </extension>
        </extensions>

        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>wagon-maven-plugin</artifactId>
                <version>2.0.2</version>
                <executions>
                    <execution>
                        <id>upload-javadoc</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>upload</goal>
                        </goals>
                        <configuration>
                            <fromDir>local.dir</fromDir>
                            <includes>*</includes>
                            <excludes>pom.xml</excludes>
                            <url>scp://your.remote.host/</url>
                            <toDir>remote.dir</toDir>
                            <optimize>true</optimize>
                            <serverId>remote.server.id</serverId>
                        </configuration>
                    </execution>
                    <execution>
                        <id>download-test-data</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>download</goal>
                        </goals>
                        <configuration>
                            <serverId>remote.server.id</serverId>
                            <url>scp://your.remote.host/</url>
                            <fromDir>remote.dir</fromDir>
                            <includes>**/*</includes>
                            <toDir>local.dir</toDir>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    [...]
</project>
4

0 回答 0