Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

m2e usage

timowest edited this page Sep 10, 2012 · 8 revisions

The apt-maven-plugin needs to be configured slightly differently if it is to be used with m2e.

The following example illustrates how to use plugin with Queydsl JPA.

<plugin>
    <groupId>com.mysema.maven</groupId>
    <artifactId>apt-maven-plugin</artifactId>
    <version>1.0.5</version>
    <executions>
        <execution>
            <goals>
                <goal>process</goal>
            </goals>
            <configuration>
                <outputDirectory>target/generated-sources/java</outputDirectory>
                <processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
            </configuration>
        </execution>
        </executions>
        <dependencies>
            <dependency>
                <groupId>com.mysema.querydsl</groupId>
                <artifactId>querydsl-apt</artifactId>
                <version>${querydsl.version}</version>
            </dependency>
            <dependency>
                <groupId>com.mysema.querydsl</groupId>
                <artifactId>querydsl-jpa</artifactId>
                <classifier>apt</classifier>
                <version>${querydsl.version}</version>
            </dependency>
        </dependencies>
    </plugin>

The querydsl-apt dependency contains the general apt logic of Querydsl and querydsl-jpa with the apt classifier contains the necessary JPA dependencies and the APT service descriptor for the JPAAnnotationProcessor.

Clone this wiki locally