Ok, I finally figured this out, and it was pretty dumb, but for the benefit
of anyone else, here's what happened.
First, I wrote a task to print the runtime classpath like this
task printCp {
println configurations.runtime.resolve().join('\n')
}
Using this task on both machines (the one on which the build was not working
is isolated/not-connected to any network--I probably should've mentioned
that before--sorry), I noticed the following difference. For the networked
machine, this task output
.../.gradle/cache/com.google.guava/guava/jars/guava-r09.jar
.../.gradle/cache/org.codehaus.groovy/groovy/jars/groovy-1.8.0.jar
.../.gradle/cache/antlr/antlr/jars/antlr-2.7.7.jar
.../.gradle/cache/asm/asm/jars/asm-3.2.jar
.../.gradle/cache/asm/asm-commons/jars/asm-commons-3.2.jar
.../.gradle/cache/asm/asm-tree/jars/asm-tree-3.2.jar
.../.gradle/cache/asm/asm-util/jars/asm-util-3.2.jar
.../.gradle/cache/asm/asm-analysis/jars/asm-analysis-3.2.jar
.../.gradle/cache/commons-cli/commons-cli/jars/commons-cli-1.2.jar
but for the isolated machine the task only output
<[email protected]>
.../.gradle/cache/com.google.guava/guava/jars/guava-r09.jar
.../.gradle/cache/org.codehaus.groovy/groovy/jars/groovy-1.8.0.jar
.../.gradle/cache/commons-cli/commons-cli/jars/commons-cli-1.2.jar
which of course explains my NoClassDefFoundErrors and points me in the
obvious direction--I'm not getting groovy's dependencies on my classpath.
The problem was that when I 'uploaded' groovy to the maven repo on my
isolated machine, I neglected to upload the correct pom with it (which
declares its dependencies). (My networked machine is just pointed at maven
central.) Once I corrected this everything worked fine.
So while there may not have been much chance of much help from this list (my
own fault), the trick for me (a Gradle newb) was figuring out how to see the
classpath that was being used.
Mark
On Thu, Jun 9, 2011 at 3:48 PM, Mark Drew <[email protected]> wrote:
> When I reinstalled (as Peter suggested), I noticed that the stacktrace was
> different the first time than each subsequent time, which reminded me that I
> was using the --daemon option. Omitting that option, I now get this
> consistently:
>
> org.gradle.api.tasks.TaskExecutionException: Execution failed for task
> ':compileGroovy'.
> at org.gradle
> .api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:71)
> ...many more lines...
> Caused by java.lang.NoClassDefFoundError: org/objectweb/asm/Opcodes
>
> at org.gradle.api.AntBuilder.<init>(AntBuilder.java:23)
> ...many more lines...
>
> Notice that though the stacktrace is almost the same as before, the message
> of the NoClassDefFoundError is different. Does this shed any light on this
> problem for any of you (unfortunately, it doesn't for me)?
>
> Thanks in advance!
> Mark
>
>
> On Sat, Jun 4, 2011 at 4:50 PM, Mark Drew <[email protected]> wrote:
>
>> I just installed it, but I can try reinstalling it on Monday.
>>
>> Thanks!
>> Mark
>>
>>
>>
>> On Fri, Jun 3, 2011 at 6:14 PM, Peter Niederwieser <[email protected]>wrote:
>>
>>>
>>> Mark Drew wrote:
>>> >
>>> > I have a Groovy project that builds just fine on one machine. However,
>>> I
>>> > just moved it to another machine, and now the :compileGroovy task
>>> fails.
>>> > The cause listed is
>>> >
>>> > Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
>>> >
>>>
>>> Have you tried to reinstall Gradle? Maybe the current installation got
>>> tampered with.
>>>
>>> --
>>> Peter Niederwieser
>>> Principal Engineer, Gradleware
>>> http://gradleware.com
>>> Creator, Spock Framework
>>> http://spockframework.org
>>> Blog: http://pniederw.wordpress.com
>>> Twitter: @pniederw
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://gradle.1045684.n5.nabble.com/Could-not-initialize-class-org-codehause-groovy-runtime-InvokerHelper-tp4452034p4452722.html
>>> Sent from the gradle-user mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>> http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>