querydsl / apt-maven-plugin

Maven APT plugin
Apache License 2.0
79 stars 41 forks source link

cannot remove default Q prefix using apt-maven-plugin #19

Closed rveguilla closed 11 years ago

rveguilla commented 11 years ago

Configuring the apt-maven-plugin with the option:

<querydsl.prefix></querydsl.prefix>

to remove the Q prefix results in classes prefixed with the word null.

Example: For a class named 'com.package.MyBean' it will generated a query type class named 'com.package.nullMyBean'.

timowest commented 11 years ago

Could you file this as a Querydsl bug, since this an issue in the AnnotationProcessor, not the Maven plugin.

rveguilla commented 11 years ago

Hmm... I will, but I'm not sure this is a problem with the AnnoationProcessor.

Looking at the querydsl-codegen source code I can see that I should be able to override the prefix by setting the prefix to "". The problem is that the empty querydsl.prefix tag that I set in the plugin produces "querydsl.prefix=null" instead of "querydsl.prefix=" when building the compiler options (AbstractProcessorMojo.java:182). https://github.com/mysema/apt-maven-plugin/blob/master/src/main/java/com/mysema/maven/apt/AbstractProcessorMojo.java#L182

timowest commented 11 years ago

Yes, you are right about that, this seems to be an issue with the apt-maven-plugin instead.

timowest commented 11 years ago

Fixed in 1.1.0, but the null value handling needs also to be fixed on the Querydsl side