My problem is if I move a custom task class defined build.gradle from lines 54 to 407 of
where compileGroovy works into a custom class defined in java_stix/buildSrc/src/main/groovy/org/mitre/stix/
I’m getting
gradle compileGroovy
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: gradle.org/docs/2.3/userguide/gradle_daemon.html.
:buildSrc:compileJava UP-TO-DATE
:buildSrc:compileGroovy FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileGroovy'.
> org/eclipse/core/runtime/Plugin
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 4.451 secs
I posted this problem to the previous forum and received a response from Luke directing me to move the custom task classes dependencies out of buildsript->dependencies straight into dependencies.
I had tried this earlier going against the advice of “Gradle in Action”, page 198, where it tells you to add the dependency for a custom task to the buildscript->dependencies as classpath entries versus adding them straight to dependency. Maybe conflicting later with page 204.
But I gave it another try, I moving
classpath "org.eclipse.core:org.eclipse.core.runtime:3.10.0.v20140318-2214"
classpath "org.eclipse:org.eclipse.osgi:3.10.0.v20140606-1445"
classpath "org.eclipse.core:org.eclipse.core.contenttype:3.4.200.v20140207-1251"
classpath "org.eclipse.equinox:org.eclipse.equinox.common:3.6.200.v20130402-1505"
classpath "org.eclipse:org.eclipse.text:3.5.300.v20130515-1451"
classpath "org.eclipse.core:org.eclipse.core.jobs:3.6.0.v20140424-0053"
classpath "org.eclipse.equinox:org.eclipse.equinox.preferences:3.5.200.v20140224-1527"
classpath "org.eclipse.core:org.eclipse.core.resources:3.9.0.v20140514-1307"
classpath "org.eclipse.jdt:org.eclipse.jdt.core:3.10.0.v20140604-1726"
classpath "org.eclipse.equinox:org.eclipse.equinox.registry:3.5.400.v20140428-1507"
out of buildscript -> dependencies
into
dependencies
changing classpath to compile for each line like so:
compile "org.eclipse.core:org.eclipse.core.runtime:3.10.0.v20140318-2214"
compile "org.eclipse:org.eclipse.osgi:3.10.0.v20140606-1445"
compile "org.eclipse.core:org.eclipse.core.contenttype:3.4.200.v20140207-1251"
compile "org.eclipse.equinox:org.eclipse.equinox.common:3.6.200.v20130402-1505"
compile "org.eclipse:org.eclipse.text:3.5.300.v20130515-1451"
compile "org.eclipse.core:org.eclipse.core.jobs:3.6.0.v20140424-0053"
compile "org.eclipse.equinox:org.eclipse.equinox.preferences:3.5.200.v20140224-1527"
compile "org.eclipse.core:org.eclipse.core.resources:3.9.0.v20140514-1307"
compile "org.eclipse.jdt:org.eclipse.jdt.core:3.10.0.v20140604-1726"
compile "org.eclipse.equinox:org.eclipse.equinox.registry:3.5.400.v20140428-1507"
adding
mavenLocal()
to
repositories
and I’m still getting
gradle compileGroovy
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: gradle.org/docs/2.3/userguide/gradle_daemon.html.
:buildSrc:compileJava UP-TO-DATE
:buildSrc:compileGroovy FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileGroovy'.
> org/eclipse/core/runtime/Plugin
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 4.451 secs
The thing is the eclipse runtime plugin is a dependency of those classes imported into the task. So, my thought is it
What am I doing wrong?
-Michael