Marcello,

I was wrong about compile.jvmarg, you add them via compile.options.compilerArg. See the Gradle DSL documentation for compile:

http://www.gradle.org/releases/1.0-milestone-3/docs/dsl/org.gradle.api.tasks.compile.Compile.html

Hope that helps,
Merlyn

On Jul 24, 2011, at 2:17 PM, marcellodesales wrote:

After a few more attempts, I passed from the sourceSets block... The only way
I could get it working was by adding the "main" block before the "jpa"
one... So, I went to the annotations project where I first used the
sourceSets and added the jpa block... Guess what? It worked over there...
But, the interesting part of the name of the jpa task for compiling...
"compileJpaJava"... So, I guess it follows the convention of the block
"compileBLOCKNAMEJava"...

[mdesales@cu096 saturn]$ vim tools/annotations/build.gradle
[mdesales@cu096 saturn]$ cd tools/annotations/
[mdesales@cu096 annotations]$ gradle jpa
:compileJpaJava UP-TO-DATE
:processJpaResources UP-TO-DATE
:jpaClasses UP-TO-DATE

I have added the following to the source code I posted before...

sourceSets {
   main {
       java {
           //srcDir 'src'
           //exclude "**/osgi/*"
       }
   }
   jpa {
       java {
           srcDir
'/u1/SRC/ctf/apps/collabnet-core/tsunami/core/src/main/java'
           include '**/domain/*'
       }
   }
}

New problem: jvmArgs not working


Still can't compile script... I have tried multiple "jvmArg", "jvmArgs"...

compileJpaJava {
   jvmArgs ['-processor',
'com.collabnet.tf.annotation.extension.CtfExtensionProcessor', '-s', '/tmp']
   classpath += configurations.annotations.asPath
}

Runtime error


[mdesales@cu096 saturn]$ gradle tasks

FAILURE: Build failed with an exception.

* Where:
Build file '/u1/SRC/ctf/build.gradle' line: 37

* What went wrong:
A problem occurred evaluating root project 'saturn'.
Cause: Could not find property 'jvmArgs' on task ':compileJpaJava'.

Thanks and I appreciate any help...

Marcello

--
View this message in context: 
http://gradle.1045684.n5.nabble.com/Javac-Java-Annotation-Processor-Maven-classpath-dependencies-in-Gradle-tp4626751p4628814.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




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to