Possibiliy to exclude packages and classes in the APT process

Bug #751557 reported by Lars Neumann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Querydsl
Fix Released
Undecided
Unassigned

Bug Description

There is currently no way to configure the maven apt plugin so that it does not generate query types that match a configurable list of packages and/or classes. The problem is that if there are multiple projects that each import a project A, the query types for entities in A are generated for every project importing A. This leads to duplicate classes in the overall build.

An (untested) patch suggestion is attached. The configuration for the maven plugin should then look like the following:

...
<configuration>
        <outputDirectory>target/generated-sources/java</outputDirectory>
        <processor>com.mysema.query.apt.hibernate.HibernateAnnotationProcessor</processor>
        <options>
           <querydsl.excludedPackages>com.excluded.packagename</querydsl.excludedPackages>
 <querydsl.excludedClasses>com.excluded.ClassName,com.another.ExcludedClass</querydsl.excludedClasses>
        </options>
</configuration>
...

Revision history for this message
Lars Neumann (lars.neumann) wrote :
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Thanks for the bug report and patch. In Querydsl we use four spaces for indentation, otherwise the patch was fine.

Changed in querydsl:
status: New → Fix Committed
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Released in 2.2.0-beta3

summary: - Possibiliy to exclude packages and classes in the Maven plugin
+ Possibiliy to exclude packages and classes in the APT process
Changed in querydsl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.