我启动并运行了一个Sonatype Nexus实例,需要编写一个脚本来手动下载特定的工件.
我尝试使用REST API和wget:
wget --user=username --password=password http://<ip>:<port>/nexus/service/local/artifact/maven/content?g=<group>&a=<artifact>&v=<version>&r=snapshots
Resolving <ip stuff>
Connecting to <ipv6 stuff>... failed: Connection refused.
Connecting to <ipv4 stuff>... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Reusing existing connection to <ip>:<port>.
HTTP request sent, awaiting response... 400 Bad Request
2014-05-11 20:17:01 ERROR 400: Bad Request.
Run Code Online (Sandbox Code Playgroud)
有谁知道,如何使这个工作?
编辑:我可以使用我的浏览器下载工件(并登录到Web界面)
我正在尝试将由Maven 3创建的.jar复制到另一个位置.目前,我正在使用Ant的复制任务,但Maven根本不会复制该文件.
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>install</phase>
<configuration>
<tasks>
<copy file="target/myfile.jar" tofile="D:/Bukkit/plugins/myfile.jar"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)