You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by fagfa <fa...@agfa.com> on 2006/08/02 21:50:04 UTC

resource file overriding/excluding for unit testing

Hi,

I'd like use different resource file (eg, persistence.xml for ejb3) for unit
testing and the problem is that "maven-surefire-plugin" always include
"target/classes" in the classpath and its sub dir "MATA-INF" contains my
resource file, which overrides the same file in "target/test-classes", which
is the one I'd like to use during unit testing. I could not find a way to
skip this recource file copying during test phase. Any advice? Thanks,

fagfa
-- 
View this message in context: http://www.nabble.com/resource-file-overriding-excluding-for-unit-testing-tf2041898.html#a5621014
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: resource file overriding/excluding for unit testing

Posted by fagfa <fa...@agfa.com>.
Can we also exclude some paths from test? For example, in my case, I want to
exclude "classes/META-INF/*.*" from my testing since I'm using
"test-classes/META-INF/*.*". Thanks,


davidkarlsen wrote:
> 
> fagfa wrote:
>> 
>> fagfa wrote:
>> 
>>>Hi,
>>>
>>>I'd like use different resource file (eg, persistence.xml for ejb3) for
>>>unit testing and the problem is that "maven-surefire-plugin" always
>>>include "target/classes" in the classpath and its sub dir "MATA-INF"
>>>contains my resource file, which overrides the same file in
>>>"target/test-classes", which is the one I'd like to use during unit
>>>testing. I could not find a way to skip this recource file copying during
>>>test phase. Any advice? Thanks,
> 
> 
> 
> See: http://jira.codehaus.org/browse/MSUREFIRE-153
> 
> 
> 
> -- 
> David J. M. Karlsen - +47 90 68 22 43
> http://www.davidkarlsen.com
> http://mp3.davidkarlsen.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/resource-file-overriding-excluding-for-unit-testing-tf2041898.html#a5635017
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: resource file overriding/excluding for unit testing

Posted by "David J. M. Karlsen" <da...@davidkarlsen.com>.
fagfa wrote:
> 
> fagfa wrote:
> 
>>Hi,
>>
>>I'd like use different resource file (eg, persistence.xml for ejb3) for
>>unit testing and the problem is that "maven-surefire-plugin" always
>>include "target/classes" in the classpath and its sub dir "MATA-INF"
>>contains my resource file, which overrides the same file in
>>"target/test-classes", which is the one I'd like to use during unit
>>testing. I could not find a way to skip this recource file copying during
>>test phase. Any advice? Thanks,



See: http://jira.codehaus.org/browse/MSUREFIRE-153



-- 
David J. M. Karlsen - +47 90 68 22 43
http://www.davidkarlsen.com
http://mp3.davidkarlsen.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: resource file overriding/excluding for unit testing

Posted by fagfa <fa...@agfa.com>.

fagfa wrote:
> 
> Hi,
> 
> I'd like use different resource file (eg, persistence.xml for ejb3) for
> unit testing and the problem is that "maven-surefire-plugin" always
> include "target/classes" in the classpath and its sub dir "MATA-INF"
> contains my resource file, which overrides the same file in
> "target/test-classes", which is the one I'd like to use during unit
> testing. I could not find a way to skip this recource file copying during
> test phase. Any advice? Thanks,
> 
> fagfa
> 

-- 
View this message in context: http://www.nabble.com/resource-file-overriding-excluding-for-unit-testing-tf2041898.html#a5632683
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org