I have a Maven project set up that has a parent and two child modules:
parent
business
support
All of my JPA entities are in the support module. I've decided I want to use JPA metamodel classes to provide type safety when I use the Criteria API. I made changes to the pom.xml for the support module (see below) and the metamodel classes are being created correctly in support/target/metamodel
when I build from the command line using mvn clean install
. Builds work and deployable artifacts work when deployed.
The issue is that when I follow the instructions here (which mirrors many other places) on how to set up Eclipse to build the metamodel classes, Eclipse doesn't seem to do anything. It creates the support/target/metamodel directory but there's never anything in it. I've cleaned inside Eclipse, from the command line using mvn clean
, done Maven->Update Project multiple times but nothing seems to work.
What am I missing?
Here's what my support project's properties look like.
The relavant section of my support module's pom.xml is:
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<executions>
<execution>
<id>process</id>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<!-- source output directory -->
<outputDirectory>target/metamodel</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.12</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>target/metamodel</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Version information:
Red Hat JBoss Developer Studio Version: 10.2.0.GA Build id: GA-v20161125-1418-B55 Build date: 20161125-1418
Java 1.8.0_112
Maven (command line): 3.3.9
Maven (Eclipse - m2e): 1.7.120161104-1805 embedded version 3.3.9