You're right, gen-model is completely broken. I tried doing the following:
1. Added configuration elements to pom.xml:
<configuration>
<genericCore>${amp.genericCore}</genericCore>
<fullSource>${amp.fullSource}</fullSource>
<components>
<component>
<name>gen-model</name>
<implementation>jdbcconfiguration</implementation>
</component>
<componentProperties>
<configurationfile>target/classes/hibernate.cfg.xml</configurationfile>
<ejb3>true</ejb3>
</componentProperties>
</components>
</configuration>
2. Added properties to hibernate.cfg.xml:
<property name="hibernate.dialect">${hibernate.dialect}</property>
<property
name="hibernate.connection.driver_class">${jdbc.driverClassName}</property>
<property
name="hibernate.connection.username">${jdbc.username}</property>
<property
name="hibernate.connection.password">${jdbc.password}</property>
<property name="hibernate.connection.url">${jdbc.url}</property>
3. When I run gen-model, I get:
[INFO] Failed to configure plugin parameters for:
org.codehaus.mojo:appfuse-maven-plugin:2.0-m5-SNAP
SHOT
Cause: Error loading class 'org.appfuse.mojo.exporter.ComponentProperties'
I was able to get tests passing in the plugin using hsqldb, but I
didn't try to execute this plugin from the command line. Apparently,
there's quite a few issues we need to solve here. Sorry for telling
folks this was a usable feature.
Matt
On 5/25/07, fadhli <
[hidden email]> wrote:
> Here's the table schema
>
> CREATE TABLE `kaakdb`.`product` (
> `product_id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
> `product_name` VARCHAR(45) NOT NULL,
> `product_serial_no` VARCHAR(45) NOT NULL,
> `product_description` VARCHAR(45) NOT NULL,
> PRIMARY KEY (`product_id`)
> )
> ENGINE = InnoDB;
>
>
> On 5/25/07, Matt Raible <
[hidden email] > wrote:
> >
> > Can you send me your create table SQL so I can try to reproduce?
> >
> > Thanks,
> >
> > Matt
> >
> > On 5/24/07, fadhli <
[hidden email]> wrote:
> > > Still no file generated from my "product" table. Do I have to configure
> some
> > > files to make it work right?
> > >
> > >
> > > On 5/25/07, Matt Raible <
[hidden email]> wrote:
> > > > Also, make sure "product" still exists in your database.
> > > >
> > > > On 5/24/07, Matt Raible <
[hidden email]> wrote:
> > > > > Try running "mvn compile" first.
> > > > >
> > > > > On 5/24/07, fadhli <
[hidden email]> wrote:
> > > > > > Yest but only Address, Role & User object files are generated. I
> > > earlier
> > > > > > created an additonal table name product but no object created for
> > > product.
> > > > > >
> > > > > >
> > > > > > On 5/25/07, Matt Raible <
[hidden email]> wrote:
> > > > > > >
> > > > > > > Did the files get generated in target/appfuse?
> > > > > > >
> > > > > > > On 5/24/07, fadhli <
[hidden email]> wrote:
> > > > > > > > Hi, i just run the appfuse:gen-model plugin. The codes are
> > > successfully
> > > > > > > > generated from the table. But in the message stack trace, it
> tells
> > > me
> > > > > > that
> > > > > > > > it's looking for a database.properties file. The only file i
> see
> > > in that
> > > > > > > > folder is jdbc.properties. So is there some configuration
> that I
> > > need
> > > > > > to
> > > > > > > > do?
> > > > > > > >
> > > > > > > > [INFO] [appfuse:gen-model]
> > > > > > > > [INFO] Configuration XML file loaded:
> > > > > > > >
> > > > > >
> > >
> D:\projects\mystruts2project\src\main\resources\hibernate.cfg.xml
> > > > > > > > [INFO] Configuration XML file loaded:
> > > > > > > >
> > > > > >
> > >
> D:\projects\mystruts2project\src\main\resources\hibernate.cfg.xml
> > > > > > > > [INFO] src/main/resources/database.properties
> not
> > > found
> > > > > > > > within the project. Trying absolute path.
> > > > > > > > [INFO] No hibernate properties file loaded.
> > > > > > > > [INFO]
> > > > > > > >
> > > > > >
> > >
> ------------------------------------------------------------------------
> > > > > > > > [INFO] BUILD SUCCESSFUL
> > > > > > > > [INFO]
> > > > > > > >
> > > > > >
> > >
> ------------------------------------------------------------------------
> > > > > > > > [INFO] Total time: 27 seconds
> > > > > > > > [INFO] Finished at: Fri May 25 11:54:10 SGT 2007
> > > > > > > > [INFO] Final Memory: 16M/29M
> > > > > > > > [INFO]
> > > > > > > >
> > > > > >
> > >
> ------------------------------------------------------------------------
> > > > > > > >
> > > > > > > > --
> > > > > > > > /fadhli
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > >
http://raibledesigns.com> > > > > > >
> > > > > > >
> > > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
> > > > > >
[hidden email]
> > > > > > > For additional commands, e-mail:
[hidden email]
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > /fadhli
> > > > >
> > > > >
> > > > > --
> > > > >
http://raibledesigns.com> > > > >
> > > >
> > > >
> > > > --
> > > >
http://raibledesigns.com> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > >
[hidden email]
> > > > For additional commands, e-mail:
[hidden email]
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > /fadhli
> >
> >
> > --
> >
http://raibledesigns.com> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
>
[hidden email]
> > For additional commands, e-mail:
[hidden email]
> >
> >
>
>
>
> --
> /fadhli
--
http://raibledesigns.com---------------------------------------------------------------------
To unsubscribe, e-mail:
[hidden email]
For additional commands, e-mail:
[hidden email]