Possibiliy to exclude packages and classes in the APT process

Bug #751557 reported by Lars Neumann on 2011-04-05
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>
...

Lars Neumann (lars.neumann) 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

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  Edit
Everyone can see this information.

Other bug subscribers