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

Re: [m2] add resources to surefire execution

I've had the same problem. Just giving this a bump as there are no replies.


davidkarlsen wrote:
> 
> Hi List!
> 
> I got some resources for the testing phase that should exist on the 
> classpath while testing with surefire.
> 
> If I merely add
> 
> <testResources>
> 
> <testResource>							   <directory>${basedir}/src/test/config</directory>
> </testResource>
> 
> <testResource>										<directory>${basedir}/src/main/config</directory>
> </testResource>
> 
> </testResources>
> 
> The tests run fine - but as I don't want the resources added to the 
> attached tests (I jar the tests at testing phase) - I changed the 
> configuration of resources to place the resources in 
> target/test-resources with the targetPath element.
> 
> But now I have to add this directory to the classpath while executing 
> tests - but the classpath list for surefire is readonly.
> 
> Any tricks to get around this?
> 
> 
> 
> 
> -- 
> 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/-m2--add-resources-to-surefire-execution-tf2005090s177.html#a9119223
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: [m2] add resources to surefire execution

Posted by Haroon Rafique <ha...@utoronto.ca>.
On Friday at 8:03am, DT=>Dan Tran <da...@gmail.com> wrote:

DT> perhaps make a request to to surefire plugin to allow addition of classpath
DT> 
DT> -D
DT> 

Bug report exists already:

http://jira.codehaus.org/browse/SUREFIRE-118

Please vote for it.
--
Haroon Rafique
<ha...@utoronto.ca>


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


Re: [m2] add resources to surefire execution

Posted by Dan Tran <da...@gmail.com>.
perhaps make a request to to surefire plugin to allow addition of classpath

-D


On 2/23/07, Dan Tran <da...@gmail.com> wrote:
>
> build your test jar in a separate project, and run it in a test project
> with those resources
>
> -D
>
>
>  On 2/23/07, apill <ap...@dolby.co.uk> wrote:
> >
> >
> > I've had the same problem. Just giving this a bump as there are no
> > replies.
> >
> >
> > davidkarlsen wrote:
> > >
> > > Hi List!
> > >
> > > I got some resources for the testing phase that should exist on the
> > > classpath while testing with surefire.
> > >
> > > If I merely add
> > >
> > > <testResources>
> > >
> > >
> > <testResource>
> > <directory>${basedir}/src/test/config</directory>
> > > </testResource>
> > >
> > >
> > <testResource>                                                                                <directory>${basedir}/src/main/config</directory>
> >
> > > </testResource>
> > >
> > > </testResources>
> > >
> > > The tests run fine - but as I don't want the resources added to the
> > > attached tests (I jar the tests at testing phase) - I changed the
> > > configuration of resources to place the resources in
> > > target/test-resources with the targetPath element.
> > >
> > > But now I have to add this directory to the classpath while executing
> > > tests - but the classpath list for surefire is readonly.
> > >
> > > Any tricks to get around this?
> > >
> > >
> > >
> > >
> > > --
> > > 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/-m2--add-resources-to-surefire-execution-tf2005090s177.html#a9119223
> > Sent from the Maven - Users mailing list archive at Nabble.com<http://nabble.com/>
> > .
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: [m2] add resources to surefire execution

Posted by Dan Tran <da...@gmail.com>.
build your test jar in a separate project, and run it in a test project with
those resources

-D


On 2/23/07, apill <ap...@dolby.co.uk> wrote:
>
>
> I've had the same problem. Just giving this a bump as there are no
> replies.
>
>
> davidkarlsen wrote:
> >
> > Hi List!
> >
> > I got some resources for the testing phase that should exist on the
> > classpath while testing with surefire.
> >
> > If I merely add
> >
> > <testResources>
> >
> > <testResource>
> <directory>${basedir}/src/test/config</directory>
> > </testResource>
> >
> >
> <testResource>                                                                                <directory>${basedir}/src/main/config</directory>
> > </testResource>
> >
> > </testResources>
> >
> > The tests run fine - but as I don't want the resources added to the
> > attached tests (I jar the tests at testing phase) - I changed the
> > configuration of resources to place the resources in
> > target/test-resources with the targetPath element.
> >
> > But now I have to add this directory to the classpath while executing
> > tests - but the classpath list for surefire is readonly.
> >
> > Any tricks to get around this?
> >
> >
> >
> >
> > --
> > 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/-m2--add-resources-to-surefire-execution-tf2005090s177.html#a9119223
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>