maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte" <>
Subject Re: How to copy unversioned test resources during release:perform?
Date Sat, 04 Jan 2014 21:56:25 GMT
Op Sat, 04 Jan 2014 21:29:02 +0100 schreef Markus Malkusch  

> Robert Scholte:
>> In short: release:perform is the same as
>> cd target/checkout
>> mvn deploy (apart from some release specific arguments/configuration,
>> if  these are there)
> I thought release:perform is doing a checkout from the last vcs tag which
> was created by release:prepare.
Sure, checking out is the first step, but the next step is less magic then  
most users think.

> Anyways, something is doing a checkout of the latest tag. My test  
> resources
> are not included in the vcs (as they have credentials). But that's all  
> fine
> and the way I want it.
> I just need a way to copy those unversioned files from
> src/test/resources/ to target/checkout/target/test-classes/ before
> mvn:release is running test.
>> For that reason: how are these test-resources retrieved during a normal  
>>  build?
> They're in src/test/resources/ and everything works as usual. I guess  
> those
> resources are somewhere in maven's super pom defined.

Ok, so they are placed there manual, not really the Maven way.
This means that a co-worker cannot check out the sources and run the tests  
without getting the test-resources from...?
Depending on your requirements I would suggest putting the test-sources  
under a common folder like ${user.home}/myproject/test-resources and copy  
them during process-test-resources[1] or use filtering[2].

I'm just not a fan of a different build during release. There are too much  
things that can go wrong.



or go for the quick solution of Stephen

>> Stephens answer should work as well
> I'll try that. I forgot that I already posted here and didn't subscribe
> so I read today the first time about it.
> Markus
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message