Rolf Suurd wrote:
> 
> Hey,
> 
> My schemaExport task (that creates an SQL file, rather then directly
> adjusts the 
> database) looks like this:
> 
> task schemaExport (dependsOn: compileJava) << {
>     description='Exports the SQL needed to create the database schema'
> 
>     ant.taskdef(name: 'schemaexport', classname: 
> 'org.hibernate.tool.hbm2ddl.SchemaExportTask', classpath: 
> configurations.tool.asPath)
> 
>     ant.schemaexport (properties:
> 'src/main/resources/hibernate.properties', 
> quiet: 'no', text: 'yes', delimiter: ';', output: 'schema-export.sql') {
>         fileset (dir: rootProject.projectDir, includes: 
> '**/src/main/resources/**/*.hbm.xml')
>     }
> }
> 

'description' needs to be set in the configuration phase, e.g.:

task schemaExport (dependsOn: compileJava, description: 'Exports the SQL
needed to create the database schema') << {
    ant.taskdef(...)
    ant.schemaexport(...)
}

Otherwise, this looks good.

--
Peter Niederwieser
Principal Engineer, Gradleware 
http://gradleware.com
Creator, Spock Framework 
http://spockframework.org
Twitter: @pniederw




--
View this message in context: 
http://gradle.1045684.n5.nabble.com/Gonna-Try-This-Again-Hibernate-Classpath-and-SchemaGen-tp4661005p4661940.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to