26

Is there a way to print Ivy output when using Groovy Grape.

when I use Grape, it's just hanging there till finishes downloading all dependencies. I would like to know what it's happening and what it's downloading.

Thanks,

M. Justin
  • 14,487
  • 7
  • 91
  • 130
Federico
  • 5,438
  • 5
  • 39
  • 47

4 Answers4

29

Looks like this might be in Groovy 1.7.6

https://issues.apache.org/jira/browse/GROOVY-4014

i.e. -Dgroovy.grape.report.downloads=true in JAVA_OPTS or on the command line

Lifeweaver
  • 986
  • 8
  • 29
tim_yates
  • 167,322
  • 27
  • 342
  • 338
  • 1
    The download report is useful. It would be better to get true verbose output that includes the repos it's searching – Chip McCormick Dec 19 '12 at 16:38
  • this is nice but only if it reported why it freezes after this line.. `Preparing to download artifact javax.servlet#servlet-api;2.4!servlet-api.jar` – akostadinov Jul 08 '13 at 11:32
25

tim_yates answer is good but if you need to debug a problem with Grapes, then this might be useful:

-Divy.message.logger.level=4

source: http://theholyjava.wordpress.com/2012/04/02/groovy-grape-troubleshooting-failed-download/

akostadinov
  • 17,364
  • 6
  • 77
  • 85
12

For full debugging, you need to use both of these settings exported via JAVA_OPTS when running in a Groovy script.

export JAVA_OPTS='-Divy.message.logger.level=4 -Dgroovy.grape.report.downloads=true'
./myScript.groovy
Valdis R
  • 2,095
  • 1
  • 18
  • 36
0

windows set JAVA_OPTS="-Dgroovy.grape.report.downloads=true -Divy.message.logger.level=4 %JAVA_OPTS%" unix export JAVA_OPTS="-Dgroovy.grape.report.downloads=true -Divy.message.logger.level=4 $JAVA_OPTS"

Gabriel Wu
  • 1,938
  • 18
  • 30