So at first, with adding your plugin declaration, I get this error:
*[INFO] [hibernate3:hbm2ddl {execution: hbm2ddl}]
[myproject] INFO [main] Version.<clinit>(15) | Hibernate EntityManager
3.2.0.GA
[myproject] INFO [main] Version.<clinit>(15) | Hibernate Annotations
3.2.0.GA
[myproject] INFO [main] Environment.<clinit>(500) | Hibernate 3.2.0.cr5
[myproject] INFO [main] Environment.<clinit>(533) | hibernate.properties not
found
[myproject] INFO [main] Environment.buildBytecodeProvider(667) | Bytecode
provider name : cglib
[myproject] INFO [main] Environment.<clinit>(584) | using JDK 1.4
java.sql.Timestamp handling
[myproject] DEBUG [main] Ejb3Configuration.configure(194) | Look up for
persistence unit: ejb3test
[myproject] DEBUG [main] Ejb3Configuration.configure(206) | Analyse of
persistence.xml: file:/C:/opt/temp/appfuse/myproject/core/target/classes/M
ETA-INF/persistence.xml
[myproject] DEBUG [main] DTDEntityResolver.resolveEntity(38) | trying to
resolve system-id [http://java.sun.com/xml/ns/persistence/persistence_1_
0.xsd]
[myproject] DEBUG [main] EJB3DTDEntityResolver.resolveEntity(49) |
recognized EJB3 ORM namespace; attempting to resolve on classpath under
org/hi
bernate/ejb
[myproject] DEBUG [main] EJB3DTDEntityResolver.resolveEntity(58) | located [
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd] in classp
ath
[myproject] DEBUG [main] PersistenceXmlLoader.parsePersistenceUnit(115) |
Persistent Unit name from persistence.xml: ApplicationEntityManager
[myproject] DEBUG [main] Ejb3Configuration.configure(213) |
PersistenceMetadata [
        name: ApplicationEntityManager
        jtaDataSource: null
        nonJtaDataSource: null
        transactionType: RESOURCE_LOCAL
        provider: org.hibernate.ejb.HibernatePersistence
        classes[
                com.baselogic.domain.VersionedObject
com.baselogic.domain.IdentifiedObject           com.baselogic.domain.User
com.baselogic.domain.Role               com.baselogic.domain.Address    ]
        packages[
        ]
        mappingFiles[
        ]
        jarFiles[
        ]
        hbmfiles: 0
        properties[
                hibernate.hbm2ddl.auto: create
        ]]
[myproject] DEBUG [main] Ejb3Configuration.getDetectedArtifacts(522) |
Detect class: true; detect hbm: true
[myproject] DEBUG [main] JarVisitor.unqualify(192) | Searching mapped
entities in jar/par: file:/C:/opt/temp/appfuse/myproject/core/target/classe
s
[ERROR] Persistence unit not found: 'ejb3test'.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Couldn't create Configuration object
[INFO]
------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Couldn't create
Configuration object
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Couldn't create
Configuration object
        at
org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfiguration.getConfiguration(AbstractComponentConfiguration.java:38)
        at
org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute(Hbm2DDLExporterMojo.java:87)
        at
org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExporterMojo.java:140)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        ... 16 more

*

Here is my persistence.xml:

    *<persistence-unit name="ApplicationEntityManager"
transaction-type="RESOURCE_LOCAL">

        <provider>org.hibernate.ejb.HibernatePersistence</provider>

        <class>com.baselogic.domain.VersionedObject</class>
        <class>com.baselogic.domain.IdentifiedObject</class>

        <class>com.baselogic.domain.User</class>
        <class>com.baselogic.domain.Role</class>
        <class>com.baselogic.domain.Address</class>


        <!--<class>com.baselogic.domain.addHeree</class>-->

        <properties>
            <property name="hibernate.hbm2ddl.auto" value="create"/>
        </properties>

    </persistence-unit>

*




On Tue, Apr 29, 2008 at 10:13 AM, Johann Reyes <[EMAIL PROTECTED]>
wrote:

> k.  I created a sample project that does what you want to do:
>
>
> http://fisheye.codehaus.org/browse/mojo/trunk/mojo/hibernate3/hibernate3-maven-plugin/src/it/jpa-configuration-hsql
>
> Let me know if this helps you or not.
>
> Regards
>
>
> Johann Reyes
>



-- 
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.linkedin.com/in/mickknutson
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/BLiNCMagazine
http://tahoe.baselogic.com
---

Reply via email to