Is there any way to generate the JPA 2.0 metamodel via maven without having a persistence.xml file. I'm using eclipselink.
In my Java EE-projects I'm doing something like the following wich works fine because in that case I have a persistence.xml.
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>2.0.5</version>
<executions>
<execution>
<id>process</id>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<!-- there must no line break between the two compiler arguments! -->
<compilerArguments>-Aeclipselink.persistencexml=${basedir}/src/main/resources/META-INF/persistence.xml</compilerArguments>
<processors>
<processor>org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor</processor>
</processors>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>2.0.3</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.modelgen</artifactId>
<version>2.3.2</version>
</dependency>
</dependencies>
</plugin>
Now I have a spring project which configures the jpa via spring context. Is the only way to create the metamodel to create a persistence.xml or can I somehow stay with the configuration in the spring context?