将 Maven Wagon 插件强制为 POST 而不是 PUT
Force Maven Wagon plugin to POST instead of PUT
我们正在尝试使用 Nexus APT 插件,但向其发送工件需要 POSTed 而不是 PUTed。默认的 Wagon 实现想要 HTTP 看起来,因为我们返回 405 错误。
有没有办法告诉 wagon POST 而不是 PUT?我在文档中找不到它。
谢谢!
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<executions>
<execution>
<id>upload-deb-to-nexus</id>
<phase>deploy</phase>
<goals>
<goal>upload-single</goal>
</goals>
<configuration>
<serverId>xxx-nexus-apt</serverId>
<fromFile>${project.build.directory}/${jdeb.name}</fromFile>
<url>https://xxx.xxx.com/repository/xxx-nexus-apt</url>
</configuration>
</execution>
</executions>
</plugin>
查看了 Wagon http 提供商的代码,PUT
是硬编码的。
我们正在尝试使用 Nexus APT 插件,但向其发送工件需要 POSTed 而不是 PUTed。默认的 Wagon 实现想要 HTTP 看起来,因为我们返回 405 错误。
有没有办法告诉 wagon POST 而不是 PUT?我在文档中找不到它。
谢谢!
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<executions>
<execution>
<id>upload-deb-to-nexus</id>
<phase>deploy</phase>
<goals>
<goal>upload-single</goal>
</goals>
<configuration>
<serverId>xxx-nexus-apt</serverId>
<fromFile>${project.build.directory}/${jdeb.name}</fromFile>
<url>https://xxx.xxx.com/repository/xxx-nexus-apt</url>
</configuration>
</execution>
</executions>
</plugin>
查看了 Wagon http 提供商的代码,PUT
是硬编码的。