Hi Merlyn,
I guess I might be close to get this done :D I hope... I'm getting the error
"Cause: Could not find method jpa() for arguments
[build_1p49ceo95d1og4v8njdbovf6g0$_run_closure4_closure7@9e4585] on root
project 'saturn'." I have defined the sourceSets as you described... I tried
removing the ";", using "include", "includes", and I even tried adding
"java" as an the parent of "srcDir"... Do I have to define "jpa" somewhere?
As I found in the documentation: "To define a new source set, you simply
reference it in the sourceSets { } block. When you define a source set, the
Java plugin adds a number of tasks which assemble the classes for the source
set, as shown in Table 20.2, “Java plugin - source set tasks”. For example,
if you add a source set called intTest, the Java plugin adds
compileIntTestJava, processIntTestResources and intTestClasses tasks."
Is there something missing in the documentation? Anything wrong?
Attempts
sourceSets {
jpa {
java {
srcDir
'/u1/SRC/ctf/apps/collabnet-core/tsunami/core/src/main/java';
includes '**/domain/*'
}
}
}
sourceSets {
jpa {
srcDir '/u1/SRC/ctf/apps/collabnet-core/tsunami/core/src/main/java';
includes '**/domain/*'
}
}
Here's the entire code... I removed the import of my ANT script that I was
importing to get this done first independently...
build.gradle
apply plugin: 'java'
repositories {
mavenCentral()
mavenRepo urls:
"http://cu134.cloud.sp.collab.net:8081/nexus/content/repositories/collabnet-snapshot",
userName: "admin", password: "welcome"
}
configurations {
annotations
}
dependencies {
annotations
'com.collabnet.teamforge:teamforge-annotations:6.1.1.jpa-SNAPSHOT'
annotations 'javax.persistence:persistence-api:1.0'
annotations 'org.hibernate:hibernate-annotations:3.3.1.GA'
}
sourceSets {
jpa {
srcDir '/u1/SRC/ctf/apps/collabnet-core/tsunami/core/src/main/java';
includes '**/domain/*'
}
}
jpaCompile {
jvmarg '-processor'
jvmarg 'com.collabnet.tf.annotation.extension.CtfExtensionProcessor'
jvmarg '-s'
jvmarg '/tmp'
classpath += configurations.annotations.asPath
}
Runtime error
[mdesales@cu096 ctf]$ gradle jC
FAILURE: Build failed with an exception.
* Where:
Build file '/u1/SRC/ctf/build.gradle' line: 22
* What went wrong:
A problem occurred evaluating root project 'saturn'.
Cause: Could not find method jpa() for arguments
[build_1p49ceo95d1og4v8njdbovf6g0$_run_closure4_closure6@7aa187] on root
project 'saturn'.
* 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: 2.34 secs
--
View this message in context:
http://gradle.1045684.n5.nabble.com/Javac-Java-Annotation-Processor-Maven-classpath-dependencies-in-Gradle-tp4626751p4628771.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