[hibernate-dev] org.hibernate.jpa.test.packaging.PackagingTestCase

Hardy Ferentschik hardy at hibernate.org
Fri Aug 24 06:07:02 EDT 2012


On 23 Jan 2012, at 11:01 PM, Steve Ebersole wrote:

> Ok, so it does do some filtering.  However...
> 
> task copyBundleResources (type: Copy) {
> 	ext.bundlesTargetDir = file( "${buildDir}/bundles" )
>   from file('src/test/bundles')
>   into bundlesTargetDir
>   filter(ReplaceTokens, tokens: [
>           buildDirName: buildDir.absolutePath,
>           'db.dialect': 'org.hibernate.dialect.H2Dialect',
>           'jdbc.driver': 'org.h2.Driver',
>           'jdbc.user': 'sa',
>           'jdbc.pass': '',
>           'jdbc.url': 'jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE',
>   ]);
>   doFirst {
>       bundlesTargetDir.mkdirs()
>   }
> }
> 
> It always filters to a static set of values.  Meaning, those values could be put directly in the resource(s) being filtered.  Or even handled via ${propName} handling.

Static except of buildDirName which is used bundles/explicitpar/persistence.xml. The river settings could indeed be put in directly. Not sure how you want to get the
fully qualified path into <jar-file>@buildDirName@/packages/externaljar.jar</jar-file> without filtering.

--Hardy


More information about the hibernate-dev mailing list