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

Steve Ebersole steve at hibernate.org
Thu Aug 23 17:01:32 EDT 2012


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.


On Thu 16 Aug 2012 09:12:53 AM CDT, Steve Ebersole wrote:
> Not in the one I looked at.  But good point, I'll look at the others.
>
> On Thu 16 Aug 2012 03:18:30 AM CDT, Hardy Ferentschik wrote:
>> Does it not do some filtering as well when the copy occurs. That's
>> the only thing I can think which would prevent us to use the src/test
>> bundles.
>>
>> --hardy
>>
>>
>>
>> On 15 Aug 2012, at 19:50, Steve Ebersole <steve at hibernate.org> wrote:
>>
>>> Forgot to mention, the reason I am asking is that the current set up
>>> makes it more difficult to test in IDE.  If you change one of these
>>> src/test/bundles files, you have to switch to command line, run gradle
>>> compilation (because it is a custom gradle task that copies the files
>>> over) before I can run those tests in IDE.
>>>
>>> On Wed 15 Aug 2012 12:46:48 PM CDT, Steve Ebersole wrote:
>>>> org.hibernate.jpa.test.packaging.PackagingTestCase uses ShrinkWrap to
>>>> facilitate "packaged" JPA tests.  It uses metadata from
>>>> src/test/bundles, BUT it gets the copies moved over to target/bundles.
>>>>
>>>> I am curious why it uses the target/bundles copy rather than the
>>>> src/test/bundles original?
>>>>
>>>>
>>>>
>>>
>>> --
>>> steve at hibernate.org
>>> http://hibernate.org
>>> _______________________________________________
>>> hibernate-dev mailing list
>>> hibernate-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
> --
> steve at hibernate.org
> http://hibernate.org

--
steve at hibernate.org
http://hibernate.org


More information about the hibernate-dev mailing list