maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wayne Fay <>
Subject Re: How to compile QueryDSL sources from post-processed .class files in Maven?
Date Wed, 24 Apr 2013 15:09:37 GMT
> I'm using aspectj to introduce fields into my persistent entities, then
> using QueryDSL's querydsl-maven-plugin's jpa-export goal to produce the
> QueryDSL Q-classes during Maven's process-classes phase, since that's the
> earliest point at which I can ensure that the persistent entities have been
> fully woven.

First off, always check with the plugin author(s) when it comes to
special use cases like this so they can consider tweaking their plugin
to better support your needs. And it appears you have done that, good.

> After querydsl-maven-plugin's jpa-export goal runs, I have new sources in
> target/generated-sources/querydsl and need to compile them to
> target/classes.  I tried configuring the maven-compiler-plugin to achieve
> the compile goal during the process-classes phase, but it keeps thinking
> that everything is up to date and that there's nothing to compile, because
> the maven-compiler-plugin's compileSourceRoots is read-only and is
> src/main/java.  Even if I use build-helper-maven-plugin to add another
> source directory (target/generated-sources/querydsl), the javac compilation
> fails because src/main/java contains classes that are receiving aspectj
> introductions and I can't remove src/main/java from the compileSourceRoots
> (I can only add via build-helper-maven-plugin).

Eventually you simply cannot solve every problem in one module. You
may need to make another module, depend on the first one's output,
perhaps unpack it somewhere, run tools against those classes or
sources, and produce the real "final" output you require out of this
new module.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message