2

我想使用 Nexus 3 的嵌入式 groovy 而不是安装安装 openjdk java 的 groovy 包。是否有捷径可寻?

我想使用嵌入式 groovy 运行这个命令:

groovy addUpdateScript.groovy -u "admin" -p "admin123" -n "raw" -f "rawRepositories.groovy" -h "http://localhost:8081"

这是为 Nexus3 Chef 食谱添加 groovy 脚本支持: https ://supermarket.chef.io/cookbooks/nexus3

4

2 回答 2

3

嵌入在 Nexus Repository Manager 中的 groovy 在应用程序的类路径中完全可用。安装客户端 groovy 系统或使用使用简单 bash 命令的 shell 脚本上传 groovy 脚本会更容易。示例也是脚本示例的一部分。您可以在https://github.com/sonatype/nexus-book-examples/tree/nexus-3.x/scripting/simple-shell-example的示例存储库中找到它们

我还在http://www.sonatype.org/nexus/2016/06/08/integrating-nexus-repository-3/上整理了一篇博文和视频演示

我希望这会有所帮助。

于 2016-08-02T04:39:27.157 回答
1

在 Nexus 3.10 中,您可以免费获得 Groovy 2.4.11,在$NEXUS_HOME/nexus-3.10.0-04/system/org/codehaus/groovy/groovy-all/2.4.11

你可以写一个测试脚本:

println "hello world"

并执行它

java -jar groovy-all-2.4.11.jar printme.groovy

当然你仍然需要一个 JDK/JRE ...

于 2018-10-15T15:03:48.190 回答