Generated sources aren't compiled when using a Maven pom to initialize a Gradle build

When compiling OpenJPA using the Maven POM in the OpenJPA source control (subversion), generated sources are not compiled and therefore are not found in the classpath while compiling sources dependent on them.

To reproduce:

  1. svn checkout openjpa 2. cd openjpa 3. gradle init 4. gradle compileJava

Expected result: Build Successful

Actual result: Build Failed because JPQLTreeConstants could not be found.

JPQLTreeConstants is a generated source. As can be seen when performing a find after a mvn compile.

mvn compile

find . -name “JPQLTreeConstants*”




------------------------------------------------------------ Gradle 1.9-rc-4 ------------------------------------------------------------

Build time:

2013-11-18 09:32:42 UTC Build number: none Revision:



1.8.6 Ant:

Apache Ant™ version 1.9.2 compiled on July 8 2013 Ivy:

2.2.0 JVM:

1.7.0_10 (Oracle Corporation 23.6-b04) OS:

Mac OS X 10.9 x86_64

The maven import doesn’t support plugins outside the standard lifecycle. Projects that do code generation will need some further work after the import.