0
手動給出了這樣的例子使用Nexus 3如何上傳多行腳本?
{ "name": "maven", "type": "groovy", "content": "repository.createMavenHosted('private')" }
但是,如果內容是多行代碼那麼這個失敗。如何重新格式化上傳更復雜的內容?
手動給出了這樣的例子使用Nexus 3如何上傳多行腳本?
{ "name": "maven", "type": "groovy", "content": "repository.createMavenHosted('private')" }
但是,如果內容是多行代碼那麼這個失敗。如何重新格式化上傳更復雜的內容?
對您帖子的評論是點上,你可以使用:
丙氨酸:groovy addUpdateScript.groovy -u admin -p admin123 -f scriptFile.groovy [-n explicitName] [-h nx3Url]
應該讓你的東西更容易一點。
爲子孫後代着想用簡單的例子,加入另一行你必須:
{
"name": "mavenandnpm",
"type": "groovy",
"content": "repository.createMavenHosted('private'); repository.createNpmProxy('npmjs-org','https://registry.npmjs.org');"
}
你有沒有嘗試 - https://github.com/sonatype/nexus-book-examples/tree/nexus-3 .X /腳本/複雜的腳本? –