Eclipse + Maven + Querydsl not removing generated Q-types on removing entities

500 views
Skip to first unread message

Luis Fernando Planella Gonzalez

unread,
Jun 5, 2014, 8:45:38 AM6/5/14
to Querydsl
I've been using the Querydsl apt maven plugin, which was automatically
integrated on Eclipse by m2e.
However, I noticed that when removing an entity, the old Q-type stays
there, and needs to be manually removed.
Is there a tip or configuration on this?
The relevant part in the pom.xml is:

<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.0.9</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources/java</outputDirectory>
<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
<options>
<querydsl.entityAccessors>true</querydsl.entityAccessors>
<defaultOverwrite>true</defaultOverwrite>
</options>
</configuration>
</execution>
</executions>
</plugin>

Best regards,
--
Luis Fernando Planella Gonzalez

timowest

unread,
Jun 5, 2014, 2:03:36 PM6/5/14
to quer...@googlegroups.com
Hi.

There is no switch for that and the annotation processor doesn't have control over it.

Do you use the latest versions of m2e and Querydsl?

Timo

Luis Fernando Planella Gonzalez

unread,
Jun 6, 2014, 8:00:13 AM6/6/14
to quer...@googlegroups.com
I'm using Eclipse Kepler 4.3 with all updates applied.
m2e version is 1.4.0.20130601-0317 (the one bundled with Kepler).
Querydsl is 3.3.3 (will upgrade soon to 3.3.4, but didn't see any changes related to APT on it).

The point is I think it was not like that before we migrated to Maven. From what I recall, removed entities had their Q-types removed.
Even a project > clean doesn't remove those.

Michael Glauche

unread,
Jun 30, 2014, 5:05:23 AM6/30/14
to quer...@googlegroups.com
I'm having the same problem with Eclipse Luna and m2e 1.5, the mysema apt-maven-plugin and the m2e extension for querydsl.
This is quite some headache for us, because after switching branches we have stale Q-Classes in our classpath that won't go away with eclipse-clean, you'll need to run a mvn clean to fix it.

I belive the main culprit would be the m2e extension, that should hook into eclipse's clean.

Kind regards,
Michael
Reply all
Reply to author
Forward
0 new messages