Source directory for the maven-apt-plugin plugin

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Source directory for the maven-apt-plugin plugin

stephaneeybert
This post has NOT been accepted by the mailing list yet.
I'm trying to use a plugin that should generate some source code.

But when I run the Maven build with the mvn generate-sources command, it gives the following error:

[ERROR] Failed to execute goal com.mysema.maven:maven-apt-plugin:1.0.4:process (default) on project learnintouch: basedir /home/stephane/dev/java/projects/learnintouch/src/main/java does not exist

Here is the plugin configuration:

      <plugin>
        <groupId>com.mysema.maven</groupId>
        <artifactId>maven-apt-plugin</artifactId>
        <version>1.0.4</version>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>process</goal>
            </goals>
            <configuration>
              <processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
            </configuration>
          </execution>
        </executions>
      </plugin>

My parent project sits in the /home/stephane/dev/java/projects/learnintouch directory.

There is only one child module, in the /home/stephane/dev/java/projects/learnintouch/core directory.

The two pom.xml files are:

/home/stephane/dev/java/projects/learnintouch/pom.xml
/home/stephane/dev/java/projects/learnintouch/core/pom.xml

The plugin configuration is sitting the /home/stephane/dev/java/projects/learnintouch/pom.xml file.

I'm then trying to specify a source directory, with the following:

<sourceDirectory>${basedir}/core/src/main/java/com/thalasoft/learnintouch/core/jpa/domain</sourceDirectory>

But it gives the error:

[ERROR] Failed to execute goal com.mysema.maven:maven-apt-plugin:1.0.4:process (default) on project learnintouch-core: basedir /home/stephane/dev/java/projects/learnintouch/core/core/src/main/java/com/thalasoft/learnintouch/core/jpa/domain does not exist

We can see in the above error the core/core/ doubling of the directory name.

If I then remove the core/ directory from the configuration as in:

<sourceDirectory>${basedir}/src/main/java/com/thalasoft/learnintouch/core/jpa/domain</sourceDirectory>

[ERROR] Failed to execute goal com.mysema.maven:maven-apt-plugin:1.0.4:process (default) on project learnintouch-core: basedir /home/stephane/dev/java/projects/learnintouch/core/core/src/main/java/com/thalasoft/learnintouch/core/jpa/domain does not exist

then, not one core/ directory, but two core/core/ directories are removed  in the error message.

Puzzling...