Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kaczynskid committed Nov 19, 2015
1 parent 2e4e3a2 commit 1ebb1b4
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
querydsl-groovy-maven
=====================

Sample using Querydsl APT Groovy and Maven
Sample using QueryDSL APT processing in a Groovy and Maven project.

Instructions:
`Foo` is an `@Entity`. `QFoo` is a QueryDSL query object for `Foo` generated with APT (JSR-269).
The annotation processor used is declared in `com.querydsl:querydsl-apt` in `META-INF/services/javax.annotation.processing.Processor`.
`QFoo` is also referenced by `FooRepository` to prove that it's generated and compiled on the fly
and can be safely used in other classes, even within the same project and source directory.
Also as an example `generatedSourcesDirectory` is changed in `groovy-eclipse-compiler` configuration
to prove that plugin configuration is applied to the annotation processor as well.

In order for this to work you'll need to patch the querydsl-apt-2.6.0.jar file and include [this](https://github.com/downloads/renataogarcia/querydsl-groovy-maven/javax.annotation.processing.Processor) to the META-INF/services directory.
Tested with:

```
$ mvn -version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T13:57:37+02:00)
Java version: 1.8.0_60, vendor: Oracle Corporation
```

0 comments on commit 1ebb1b4

Please sign in to comment.