You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Adrian Pillinger <ap...@dolby.co.uk> on 2007/02/23 11:56:21 UTC

Add test resource outside of target/test-classes?

How can I add a directory to my test classpath without putting it in  
the target/test-classes directory?

Basically I have a conf directory for bootstrapping embedded jboss in  
my JUnit test. Then I deploy the target/test-classes directory to  
jboss to deploy my code. If the conf files for jboss exist in target/ 
test-classes jboss attempts to re-deploy the conf files again!

I have tried setting

<testResource>
	<directory>${baseDir}/src/test/resources/jbossconf</directory>
	<targetPath>../jbossconf</targetPath>
</testResource>

This puts the conf files in target/jbossconf instead of in target/ 
test-classes/jbossconf but NOT on the classpath :(

Any help would be much appreciated.

Adrian

-----------------------------------------
This message (including any attachments) may contain confidential
information intended for a specific individual and purpose.  If you
are not the intended recipient, delete this message.  If you are
not the intended recipient, disclosing, copying, distributing, or
taking any action based on this message is strictly prohibited.

Re: Add test resource outside of target/test-classes?

Posted by "David J. M. Karlsen" <da...@davidkarlsen.com>.
Adrian Pillinger wrote:
> How can I add a directory to my test classpath without putting it in 
> the target/test-classes directory?
>
> Basically I have a conf directory for bootstrapping embedded jboss in 
> my JUnit test. Then I deploy the target/test-classes directory to 
> jboss to deploy my code. If the conf files for jboss exist in 
> target/test-classes jboss attempts to re-deploy the conf files again!
>
> I have tried setting
>
> <testResource>
>     <directory>${baseDir}/src/test/resources/jbossconf</directory>
>     <targetPath>../jbossconf</targetPath>
> </testResource>
>
> This puts the conf files in target/jbossconf instead of in 
> target/test-classes/jbossconf but NOT on the classpath :(
>
> Any help would be much appreciated.
http://jira.codehaus.org/browse/SUREFIRE-180 addresses this issue.

-- 
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