Maven issues with spring -data-jpa and querydsl

I have an Eclipse Maven project for spring -data-jpa and QueryDsl.

I seem to have a problem with maven-apt-plugin, where if I do mvn clean, followed by mvn installation, it tries to "process" files that reference the generated QueryDsl files, but these generated files have not yet been built so I get a few "can't find character" errors.

If you need to do another mvn installation, everything will be fine, as existing files now exist.

Does this maven-apt-plugin need to process every file in my project, or can I specify it in the specified directory?

Note: Im using JDK6, Eclipse Indigo, M2E 1.0.100

My POM ...

<project>
  ....
  <build>
    <plugins>
      <plugin>
        <groupId>com.mysema.maven</groupId>
        <artifactId>maven-apt-plugin</artifactId>
        <version>1.0.2</version>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>process</goal>
            </goals>
            <configuration>
              <outputDirectory>target/generated-sources</outputDirectory>
              <processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  ....
</project>
+5
3

, build-helper:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>build-helper-maven-plugin</artifactId>
    <version>1.7</version>
    <executions>
        <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>add-source</goal>
                <goal>add-test-source</goal>
            </goals>
            <configuration>
                <sources>
                    <source>target/generated-sources</source>
                    <source>src/main/java</source>
                </sources>
            </configuration>
        </execution>
    </executions>
</plugin>
+4

? true, .

APT, , , .

+1

" " ( ). .

https://github.com/mysema/maven-apt-plugin/issues/2

.

<logOnlyOnError>true</logOnlyOnError>
+1
source

All Articles