Hey,
So the hbm2ddl goal creates the ddl sql script.
But what does the schema-update & schema-export goals do?
They should then execute the sql script on the database but that don't seem
to work for me. It just creates the sql script. Anybody have any ideas?
The build just succeeds but no database changes present.
Here is my configuration.
I run the command mvn install.
What is the objective:
1) create the sql file in the src/main/resources (this it does but not in
the correct folder ????)
2) execute the schema to the db
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<executions>
<execution><phase>install</phase>
<goals>
<goal>hbm2ddl</goal>
<goal>schema-export</goal>
</goals>
</execution>
</executions>
<configuration>
<hibernate><configurationFile>/src/main/resources/hibernate.cfg.xml</configu
rationFile></hibernate>
<outputDirectory>
<hbm2dll>src/main/resources</hbm2dll>
</outputDirectory>
<outputFile>dbcreate.sql</outputFile>
<update>true</update>
<drop>true</drop>
<format>false</format>
</configuration>
</plugin>
-----Oorspronkelijk bericht-----
Van: Charles Harvey III [mailto:[EMAIL PROTECTED]
Verzonden: vrijdag 20 oktober 2006 16:59
Aan: Maven Users List
Onderwerp: Re: How do i use the hibernate3 plugin from codehause
I'll be damned. I had <outputFile> setup before and it never did
anything. Maybe
because I had it as a .txt file. I don't care, as long as it is working
now I
feel much better.
Sorry that I said it did not work correctly.
Charlie
Johann Reyes said the following on 10/20/2006 10:10 AM:
> Hello Charles
>
> To output to a file, you just need to check that you have configured the
following parameter "outputFile" as described here:
http://mojo.codehaus.org/hibernate3-maven-plugin/hbm2ddl-mojo.html
>
> Once the plugin sees that you have specified that parameter, it won't
attempt to write in the database, instead it would do it in the file just
specified.
>
> *note* Just specify a filename like "dll-schema.sql" not a file path.
>
> Regards
>
> Johann Reyes
>
> -----Original Message-----
> From: Charles Harvey III [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 20, 2006 10:01 AM
> To: Maven Users List
> Subject: Re: How do i use the hibernate3 plugin from codehause
>
> You have been able to generate DDL files? See, I think I was mislead by
what hibernate3:hbm2ddl is supposed to do. I wanted it to generate a bunch
of text files with a bunch of CREATE statements. Instead, it connects to my
database and creates the tables for me. I can't stop it from doing that.
If I don't put in a connection URL to the database, it fails.
>
> And I have setup the <outputDirectory> correctly in the <plugin> setup,
still nothing. Can someone send me their exact setup so that I can try this
again.
>
> And, just to be sure. Is this possible? I do NOT want to have the tables
created automatically. I just want text files.
>
>
> Thanks.
>
>
> Charlie
>
>
> Stefan Hübner said the following on 10/19/2006 1:34 PM:
>
>> Hi Yves,
>>
>> 2006/10/19, Yves Van Steen <[EMAIL PROTECTED]>:
>>
>>> I want to create ddl sql files from my hbm files but none of the
>>> goals of the hibernate3 plugin actually works?
>>>
>>> Is this plugin useable or still in development?
>>>
>>>
>> I'm using it quite successfully to generate ddl-files with
>> hibernate3:hbm2ddl. I was also trying to get hbm2doc running, but that
>> one is not working as of now, because the Hibernate-libraries are not
>> stable yet. Apperently there are some screwed up dependencies.
>>
>> It's in development (1.0-SNAPSHOT). There was an attempt to publish
>> 1.0, but that process got stuck a while ago. there are still some bugs
>> left - like your one. you might want to keep track of
>> http://jira.codehaus.org/browse/MOJO-515.
>>
>> I think, whenever the Hibernate guys publish their 3.2 release, this
>> plugin will be fixed. Even now it does a great job.
>>
>> jm2c
>> -Stefan
>>
>> ---------------------------------------------------------------------
>> 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]
>
>
> !DSPAM:4538d73c241851913645530!
>
>
>
>
> ---------------------------------------------------------------------
> 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]
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.8/489 - Release Date: 20/10/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.8/489 - Release Date: 20/10/2006
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]