Would be nice to have example in documentation for how to use it with overlay
builds
------------------------------------------------------------------------------------
Key: MHIBERNATE-99
URL: http://jira.codehaus.org/browse/MHIBERNATE-99
Project: Maven 2.x Hibernate Plugin
Issue Type: Improvement
Components: jpaconfiguration
Affects Versions: 2.2
Reporter: Gary S. Weaver
Assignee: Johann Reyes
The hibernate3-maven-plugin works very well in the main project where JPA
annotations are used, like this:
{code}
<plugin>
<!-- outputs to target/hibernate3/sql/schema.ddl -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<phase>process-test-resources</phase>
<goals>
<goal>hbm2ddl</goal>
</goals>
</execution>
</executions>
<configuration>
<components>
<component>
<name>hbm2ddl</name>
<implementation>jpaconfiguration</implementation>
</component>
</components>
<componentProperties>
<jdk5>true</jdk5>
<propertyfile>src/main/resources/datasource.properties</propertyfile>
<!-- set this to whatever was set in persistence.xml -->
<persistenceunit>mailPersistence</persistenceunit>
<outputfilename>schema.ddl</outputfilename>
<drop>false</drop>
<create>true</create>
<export>false</export>
<format>true</format>
</componentProperties>
</configuration>
</plugin>
{code}
However, I have an "overlay" war build that depends on the former war build,
like this:
{code}
<build>
<finalName>mailportlet</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>exploded</goal>
</goals>
<configuration>
<webappDirectory>target</webappDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- outputs to target/hibernate3/sql/schema.ddl -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>hbm2ddl</goal>
</goals>
</execution>
</executions>
<configuration>
<components>
<component>
<name>hbm2ddl</name>
<implementation>jpaconfiguration</implementation>
</component>
</components>
<componentProperties>
<jdk5>true</jdk5>
<propertyfile>src/main/resources/datasource.properties</propertyfile>
<!-- set this to whatever was set in persistence.xml -->
<persistenceunit>mailPersistence</persistenceunit>
<outputfilename>schema.ddl</outputfilename>
<drop>false</drop>
<create>true</create>
<export>false</export>
<format>true</format>
</componentProperties>
</configuration>
</plugin>
</plugins>
</build>
{code}
Basically what I'm trying to do is to overlay the war (part of which modifies
the hibernate.dialect), then explode it so that the Maven 2.x Hibernate Plugin
could in-theory access the JPA configuration and the JPA annotated model
classes. However, this doesn't work.
Any ideas about how I could accomplish this? It would be great to have an
example of this type of usage in the documentation as well, if it is possible,
and if it isn't possible, it would be a great enhancement to somehow allow this
type of use.
Thanks in advance for any help,
Gary
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email