[jboss-as7-dev] Help adding a native Hibernate 3.x unit test

Scott Marlow smarlow at redhat.com
Fri Jul 15 01:19:44 EDT 2011


We already include org.hibernate:hibernate-core:jar:4.0.0.Beta1 and I 
want to test against org.hibernate:hibernate-core:jar:3.6.4.Final.

It is possible that the org.hibernate:hibernate-core:jar:3.6.4.Final 
artifact will not be in the local maven repo, when the unit test starts. 
  If the ShrinkWrap maven resolver would download it into the local 
maven cache, we should get good enough performance (similar to if the 
artifact was downloaded during the build).

If its easy, clean, fast to use the ShrinkWrap maven resolver, That 
sounds like the best solution (rather than having multiple versions of 
the same artifact in the build).

On 07/14/2011 06:59 PM, Stuart Douglas wrote:
>
> That scenario is possible with any maven artefact that the built relies on. AFAIK the ShrinkWrap maven resolver will use the version cached in the local repository, so it is no different to any other maven dependency.

That sounds encouraging for what I want to do...

> Stuart
>
> On 15/07/2011, at 4:16 AM, Jesper Pedersen wrote:
>
>> On Thursday, July 14, 2011 02:09:40 PM Jaikiran Pai wrote:
>>> I was writing a similar testcase sometime back which required a jar to
>>> be added to the deployment. But I wasn't too sure if it was a good idea
>>> to use the Maven resolver within the testcase. I haven't looked into how
>>> it's implemented, but trying to resolve via maven during each test run
>>> would probably slow down things a bit, isn't it?

I don't know the ShrinkWrap internals either.  It really depends on the 
implementation and whether it uses the local maven repo.

>>>
>>> On Thursday 14 July 2011 08:17 PM, Scott Marlow wrote:
>>>> Can someone help bring in the Maven extension to ShrinkWrap in AS7.1
>>>> testsuite?  I wanted to ask, before trying to hack it on my own.  I
>>>> think this would help us create better and more complete tests.
>>
>> Please, no.
>>
>> I see this:
>>
>> #1 Code gets committed
>> #2 You/Jenkins update

I'm not sure what you mean by #2.

>> #3 Nexus repo is down/can't be resolved/can't be accessed/...

If the repo is down, we won't make it to run the AS7 testsuite.  We will 
fail during the build (unless we aren't clearing the local maven repo 
and we might then get lucky for the test case also).

>> #4 ¤%"%#¤%"¤&"!%"!#¤%!"#!
>>
>> and having a Maven resolver running in the testsuite is just asking for
>> trouble.
>>
>> Just add the needed .jar's to the testsuite/ - we already have examples of
>> this.
>>
>> Best regards,
>> Jesper
>>
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
>
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev



More information about the jboss-as7-dev mailing list