Closed paulvi closed 8 years ago
It's been a while since I used Eclipse, but doesn't the Maven Eclipse plugin solve that?
mvn eclipse:eclipse
?
mvn eclipse:eclipse
does not generate correct eclipse files for current m2e plugin.
Usage of mvn eclipse:eclipse
has been discouraged for several years now.
I think it is similar to gradle build eclipse
generate Eclipse files as general project, that may be OK for a look but not for work. Anyways, I feel there should be extra things in pom.xml like maven-helper-plugin
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/java/</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
It works.
Wiki updated https://github.com/querydsl/apt-maven-plugin/wiki/m2e-usage
Thanks for verifying that and writing about it, much appreciated.
I have followed https://github.com/querydsl/apt-maven-plugin/wiki/m2e-usage
mvn package
build passed, with sources generatedbut I have to manually add classpathentry in Eclipse
Should this
target/generated-sources/java
folder automatically be added in Eclipse on import?I guess some extra pom.xml configuration is needed.