我正在研究Liferay工作区项目。如何在某些外部文件(例如主文件夹中的gradle.properties)中设置Maven存储库的凭据,并在settings.gradle中使用它。我知道上面的设置适用于build.gradle,但我需要settings.gradle相同 目前,我的settings.gradle如下所示,
buildscript {
dependencies {
classpath group: "com.liferay", name: "com.liferay.gradle.plugins.workspace", version: "latest.release"
classpath group: "net.saliman", name: "gradle-properties-plugin", version: "1.4.6"
}
repositories {
maven {
credentials {
username 'user'
password 'pw'
}
url "https://<host>/<url>"
}
}
}
答案 0 :(得分:0)
没有太大区别,这是来自settings.gradle的示例 在此示例中,用户名和密码来自个人属性。
anagram$ wc /usr/share/dict/words
99171 99171 938848 /usr/share/dict/words
anagram$ time ./anagram.py < /usr/share/dict/words | tail
2 eeeprsw sweeper weepers
2 brsu burs rubs
2 aeegnrv avenger engrave
2 ddenoru redound rounded
3 aesy ayes easy yeas
2 gimnpu impugn umping
2 deeiinsst densities destinies
2 abinost bastion obtains
2 degilr girdle glider
2 orsttu trouts tutors
real 0m0.366s
user 0m0.357s
sys 0m0.012s