Hum.... I can't think of anything on top of my head at the moment
either Wayne. Perhaps one way would help if we simply add
hibernate-annotations as depended by hibernate-entitymanager in it's
pom. We get error if we don't have hibernate-entitymanager when using
jpaconfiguration in hiberante-tools implementation.

-Z

On 9/24/07, Wayne Fay <[EMAIL PROTECTED]> wrote:
> How would you propose that the hibernate3 plugin possibly know that
> you didn't include the annotations dependency when you should have?
>
> Can you describe (in pseudo-code) how the plugin should behave? I'd
> have trouble describing it, much less implementing it. Its one of
> those "do what I mean, not what I said" kind of things that computers
> aren't very good at.
>
> Wayne
>
> On 9/24/07, thebugslayer <[EMAIL PROTECTED]> wrote:
> > Thanks for helping guys, but I finally figured out.
> >
> > My problem is I didn't have hibernate-annotations as dependency added!
> > But as I stated in the first email, there is not ERROR reported!
> > Everything runs and reported as SUCCESSFUL. Maybe the hibernate3
> > plugin developer should check for this and give a gentle error
> > instead?
> >
> > So, for me, these are the basic file & settings needed to get a
> > Hibernate JPA + Mysql project started with Maven. I hope this help
> > other when they look for it.
> >
> > pom.xml
> > http://snipplr.com/view/3767/maven2-pomxml-for-hibernatejpamysqlhibernatetools/
> >
> > src/main/resources/META-INF/persistence.xml:
> > http://snipplr.com/view/3770/persistentxml-for-hibernate-vendor/
> >
> > this is my model class for testing: src/main/java/deng/myhibernatejpa
> > http://snipplr.com/view/3769/jpa-annotatedpersistent-class/
> >
> > Now you can run:
> > mvn hibernate3:hbm2ddl
> >
> > -Z
> >
> > On 9/24/07, mraible <[EMAIL PROTECTED]> wrote:
> > >
> > > It works in AppFuse - maybe it'd help to look at our configuration.
> > >
> > > Archetype creation commands  @
> > > http://appfuse.org/display/APF/AppFuse+QuickStart
> > >
> > > Change from Hibernate to JPA:
> > > http://appfuse.org/display/APF/Using+JPA#UsingJPA-setup
> > >
> > > HTH,
> > >
> > > Matt
> > >
> > >
> > > thebugslayer wrote:
> > > >
> > > > Hi,
> > > > Can someone please help me see why I do not see my database table
> > > > created after I ran $ mvn hibernate3:hbm2ddl? I don't have any errors,
> > > > just database wasn't updated.
> > > >
> > > > This is my partial pom.xml
> > > >              <plugin>
> > > >                 <groupId>org.codehaus.mojo</groupId>
> > > >                 <artifactId>hibernate3-maven-plugin</artifactId>
> > > >                 <version>2.0-alpha-2</version>
> > > >                 <configuration>
> > > >                     <components>
> > > >                         <component>
> > > >                             <name>hbm2ddl</name>
> > > >                         </component>
> > > >                     </components>
> > > >                     <componentProperties>
> > > >
> > > > <implementation>jpaconfiguration</implementation>
> > > >                         <drop>true</drop>
> > > >                         <create>true</create>
> > > >                         <export>true</export>
> > > >                         <jdk5>true</jdk5>
> > > >                         <persistenceunit>default</persistenceunit>
> > > >                     </componentProperties>
> > > >                 </configuration>
> > > >                 <dependencies>
> > > >                     <dependency>
> > > >                         <groupId>mysql</groupId>
> > > >                         <artifactId>mysql-connector-java</artifactId>
> > > >                         <version>5.0.5</version>
> > > >                     </dependency>
> > > >                 </dependencies>
> > > >             </plugin>
> > > >
> > > > Here is my persistence.xml
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <persistence xmlns="http://java.sun.com/xml/ns/persistence";
> > > >              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > > >              xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
> > > > http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";
> > > >              version="1.0">
> > > >
> > > >     <persistence-unit name="default">
> > > >         <provider>org.hibernate.ejb.HibernatePersistence</provider>
> > > >         <properties>
> > > >             <!-- Auto detect annotation model classes -->
> > > >             <property name="hibernate.archive.autodetection"
> > > > value="class"/>
> > > >
> > > >             <!-- Datasource -->
> > > >             <property name="hibernate.dialect"
> > > > value="org.hibernate.dialect.MySQLDialect"/>
> > > >             <property name="hibernate.connection.driver_class"
> > > > value="com.mysql.jdbc.Driver"/>
> > > >             <property name="hibernate.connection.username" 
> > > > value="root"/>
> > > >             <property name="hibernate.connection.password" value=""/>
> > > >             <property name="hibernate.connection.url"
> > > > value="jdbc:mysql://localhost/auction_dev"/>
> > > >
> > > >         </properties>
> > > >     </persistence-unit>
> > > > </persistence>
> > > >
> > > > Here is my mvn output:
> > > > [INFO] [hibernate3:hbm2ddl]
> > > > 04:40:52,707  INFO org.hibernate.ejb.Version - Hibernate EntityManager
> > > > 3.2.0.GA
> > > > 04:40:52,723  INFO org.hibernate.cfg.annotations.Version - Hibernate
> > > > Annotations 3.2.0.GA
> > > > 04:40:52,730  INFO org.hibernate.cfg.Environment - Hibernate 3.2.0.cr5
> > > > 04:40:52,734  INFO org.hibernate.cfg.Environment -
> > > > hibernate.properties not found
> > > > 04:40:52,735  INFO org.hibernate.cfg.Environment - Bytecode provider
> > > > name : cglib
> > > > 04:40:52,740  INFO org.hibernate.cfg.Environment - using JDK 1.4
> > > > java.sql.Timestamp handling
> > > > [DEBUG] basedir: /Users/zemian/Desktop/projects/auction
> > > > [INFO] src/main/resources/hibernate.cfg.xml not found within the
> > > > project. Trying absolute path.
> > > > [INFO] No hibernate configuration file loaded.
> > > > [INFO] src/main/resources/database.properties not found within the
> > > > project. Trying absolute path.
> > > > [INFO] No hibernate properties file loaded.
> > > > 04:40:53,067  INFO org.hibernate.dialect.Dialect - Using dialect:
> > > > org.hibernate.dialect.MySQLDialect
> > > > 04:40:53,108  INFO org.hibernate.tool.hbm2ddl.SchemaExport - Running
> > > > hbm2ddl schema export
> > > > 04:40:53,109  INFO org.hibernate.tool.hbm2ddl.SchemaExport - exporting
> > > > generated schema to database
> > > > 04:40:53,112  INFO
> > > > org.hibernate.connection.DriverManagerConnectionProvider - Using
> > > > Hibernate built-in connection pool (not for production use!)
> > > > 04:40:53,112  INFO
> > > > org.hibernate.connection.DriverManagerConnectionProvider - Hibernate
> > > > connection pool size: 20
> > > > 04:40:53,112  INFO
> > > > org.hibernate.connection.DriverManagerConnectionProvider - autocommit
> > > > mode: true
> > > > 04:40:53,116  INFO
> > > > org.hibernate.connection.DriverManagerConnectionProvider - using
> > > > driver: com.mysql.jdbc.Driver at URL:
> > > > jdbc:mysql://localhost/auction_dev
> > > > 04:40:53,116  INFO
> > > > org.hibernate.connection.DriverManagerConnectionProvider - connection
> > > > properties: {user=root, password=****, autocommit=true,
> > > > release_mode=auto}
> > > > 04:40:53,329  INFO org.hibernate.tool.hbm2ddl.SchemaExport - schema
> > > > export complete
> > > > 04:40:53,330  INFO
> > > > org.hibernate.connection.DriverManagerConnectionProvider - cleaning up
> > > > connection pool: jdbc:mysql://localhost/auction_dev
> > > > [INFO]
> > > > ------------------------------------------------------------------------
> > > > [INFO] BUILD SUCCESSFUL
> > > > [INFO]
> > > > ------------------------------------------------------------------------
> > > >
> > > > And finally here is one of my entity class:
> > > > package deng.auction.data.model;
> > > >
> > > > import javax.persistence.*;
> > > >
> > > > @Entity
> > > > @Table(name="category")
> > > > public class Category {
> > > >     @Id
> > > >     @GeneratedValue
> > > >     @Column(name="id")
> > > >     private Short id;
> > > >
> > > >     @Column(name="name")
> > > >       private String name;
> > > >
> > > >     public Short getId() {
> > > >         return id;
> > > >     }
> > > >
> > > >     public void setId(Short id) {
> > > >         this.id = id;
> > > >     }
> > > >
> > > >     public String getName() {
> > > >         return name;
> > > >     }
> > > >
> > > >     public void setName(String name) {
> > > >         this.name = name;
> > > >     }
> > > >
> > > > }
> > > >
> > > > Thanks
> > > > --
> > > > /bugslayer
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > >
> > > --
> > > View this message in context: 
> > > http://www.nabble.com/running-hibernate3-plugin-with-jpaconfiguration-tf4503567s177.html#a12863736
> > > Sent from the Maven - Users mailing list archive at Nabble.com.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > /bugslayer
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
/bugslayer

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to