Groovy
Enable grape dependency download logs:
Set groovy.grape.report.downloads
system property to true
and control ivy log level using ivy.message.logger.level
system property. Possible values of ivy.message.logger.level
are -1, 0, 1, 2, 3 and 4, with -1 for no ivy logs and 4 for all ivy logs
groovy -Dgroovy.grape.report.downloads=true -Divy.message.logger.level=3 -Dgrape.config=/path/to/custom/grapeConfig.xml -Dgrape.root=/path/to/custom/cache/.groovy someScript.groovy
Download grape dependencies from Jfrog artifactory with authorization:
Place below custom grapeConfig.xml
at ~/.groovy/grapeConfig.xml
or place it somewhere else and pass the path to the groovy command like groovy -Dgrape.config=/path/to/custom/grapeConfig.xml someScript.groovy
<ivysettings>
<settings defaultResolver="downloadGrapes"/>
<property name="artifactory.user" value="dummy" override="false"/>
<property name="artifactory.password" value="dummy" override="false"/>
<!-- realm has to be 'Artifactory Realm' for Jfrog Artifactory -->
<credentials host="my.jfrog.artifactory" realm="Artifactory Realm" username="${artifactory.user}" passwd="${artifactory.password}" />
<resolvers>
<chain name="downloadGrapes" returnFirst="true">
<filesystem name="cachedGrapes">
<ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
<artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision](-[classifier]).[ext]"/>
</filesystem>
<ibiblio name="localm2" root="${user.home.url}/.m2/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true"/>
<ibiblio name="chewy-artifactory" m2compatible="true" root="https://my.jfrog.artifactory/libs-release" />
<ibiblio name="ibiblio" m2compatible="true"/> <!-- Maven Central -->
</chain>
</resolvers>
</ivysettings>
Change path where grape dependencies are downloaded:
groovy -Dgrape.root=/path/to/custom/cache/.groovy someScript.groovy