You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Silberman, Nathan" <NS...@doubleclick.com> on 2007/11/27 18:01:59 UTC
Adding a folder to the surefire classpath
Is there away to add a resource or config folder to the surefire
classpath? I want to ensure that my src/main/config folder is on the
classpath but I cannot find any documentation that would support this
requirement
Re: Adding a folder to the surefire classpath
Posted by Doug Douglass <do...@gmail.com>.
Similar to what Trent described...
We add src/main/webapp as a test resource in the parent pom of all our web
applications so we can render our view templates (Freemarker) via unit tests
-- very, very handy!
You could do something similar in your pom:
...
<build>
...
<testResources>
<testResource>
<directory>src/main/config</directory>
</testResource>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
...
</build>
HTH,
Doug
On Nov 27, 2007 10:16 AM, Trent Rosenbaum <tr...@gmail.com>
wrote:
> Hi Nathan,
>
> I had a similar issue when I wanted to run seam integration tests from
> within Maven. I needed to add the web.xml file onto the classpath.
> In the end I configured up the maven antrun plugin to copy my seam
> configuration files to the test-classes directory under target. I
> bound this plugin to run on one of the test lifecycle phases. I was
> then able to run the tests as shown within the seam documentation.
>
> Trent
>
>
> On 27/11/2007, Silberman, Nathan <NS...@doubleclick.com> wrote:
> > Is there away to add a resource or config folder to the surefire
> > classpath? I want to ensure that my src/main/config folder is on the
> > classpath but I cannot find any documentation that would support this
> > requirement
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: Adding a folder to the surefire classpath
Posted by Trent Rosenbaum <tr...@gmail.com>.
Hi Nathan,
I had a similar issue when I wanted to run seam integration tests from
within Maven. I needed to add the web.xml file onto the classpath.
In the end I configured up the maven antrun plugin to copy my seam
configuration files to the test-classes directory under target. I
bound this plugin to run on one of the test lifecycle phases. I was
then able to run the tests as shown within the seam documentation.
Trent
On 27/11/2007, Silberman, Nathan <NS...@doubleclick.com> wrote:
> Is there away to add a resource or config folder to the surefire
> classpath? I want to ensure that my src/main/config folder is on the
> classpath but I cannot find any documentation that would support this
> requirement
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org