>// The definition of "jpa" sourceSet WILL ONLY WORK IF the "main" is defined... is this Gradle bug?
What do you mean by "main defined" and what doesn't work if "main is not defined"? :) Cheers! On Tue, Jul 26, 2011 at 2:37 AM, marcellodesales <[email protected]> wrote: > Hey Merlyn, > > Just to keep it documented, I got it working!!! Man, Gradle is awesome! > thanks a lot for your help... Here's the complete code for processing Java 6 > Annotations with Javac compiler flags + dependencies expressed in Maven... > Is this a bug? > > // The definition of "jpa" sourceSet WILL ONLY WORK IF the "main" is > defined... is this Gradle bug? > > apply plugin: 'java' > > repositories { > mavenCentral() > mavenRepo urls: > "http://localhost:8081/nexus/content/repositories/snapshot", userName: > "admin", password: "welcome" > } > > configurations { > annotations > } > > dependencies { > annotations 'com.myapi:myapi:1.0-SNAPSHOT' > annotations 'javax.persistence:persistence-api:1.0' > annotations 'javax:javaee-api:6.0' > annotations 'org.hibernate:hibernate-annotations:3.3.1.GA' > } > > // the following definition of "jpa" source code directory will only work if > the "main" is defined... is this a Gradle bug? > sourceSets { > main { > java { > //srcDir 'src' > //exclude "**/osgi/*" > } > } > jpa { > java { > srcDir '/development/src/main/java' > include '**/domain/*' > } > } > } > > compileJpaJava { > options.compilerArgs = ["-processor", "com.myapi.CtfExtensionProcessor", > "-ActfBuildDir=/development/build/src/java", > "-ActfFieldsPackage=com.myapi.fields"] > classpath += configurations.annotations > } > > Hope this helps others in the future! > Marcello > > -- > View this message in context: > http://gradle.1045684.n5.nabble.com/Javac-Java-Annotation-Processor-Maven-classpath-dependencies-in-Gradle-tp4626751p4633029.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 > > > -- Szczepan Faber Principal engineer@gradleware Lead@mockito --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
