You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Pablo <pa...@tiger.com.pl> on 2005/11/09 13:45:29 UTC
testing webapp with surefire
Hi there
I'm trying to perform several tests (StrutsTestCase) on my web
application using M2.
The StrutsTestCase requires /WEB-INF/web.xml to be in the classpath.
When tests are run in a default way m2 says: The /WEB-INF/web.xml was
not found.
I've found one configuration parameter called "|classpathElements|" to
be helpful (as its name suggests).
However when I add this to the configuration:
<plugin>
<configuration>
..
<classpathElements>
<classpathElement>src/webapp</classpathElement>
</classpathElements>
..
</configuration>
</plugin>
M2 writes the following message:
[INFO] Error configuring:
org.apache.maven.plugins:maven-surefire-plugin. Reason: ERROR: Cannot
override read-only parameter: classpathElements in goal: surefire:test
Therefore I have a question. What should I set in pom.xml file to make
StrutsTestCase's tests work?
Thanks in advance
Cheers
Pablo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: testing webapp with surefire
Posted by Brett Porter <br...@gmail.com>.
I think it is necessary to:
a) file a request for an "additionalClasspathElements" field for the
plugin, and/or,
b) copy the file(s) to target/test-classes
- Brett
On 11/9/05, Pablo <pa...@tiger.com.pl> wrote:
> Hi there
>
> I'm trying to perform several tests (StrutsTestCase) on my web
> application using M2.
> The StrutsTestCase requires /WEB-INF/web.xml to be in the classpath.
> When tests are run in a default way m2 says: The /WEB-INF/web.xml was
> not found.
> I've found one configuration parameter called "|classpathElements|" to
> be helpful (as its name suggests).
> However when I add this to the configuration:
> <plugin>
> <configuration>
> ..
> <classpathElements>
> <classpathElement>src/webapp</classpathElement>
> </classpathElements>
> ..
> </configuration>
> </plugin>
> M2 writes the following message:
>
> [INFO] Error configuring:
> org.apache.maven.plugins:maven-surefire-plugin. Reason: ERROR: Cannot
> override read-only parameter: classpathElements in goal: surefire:test
>
> Therefore I have a question. What should I set in pom.xml file to make
> StrutsTestCase's tests work?
>
> Thanks in advance
> Cheers
> Pablo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org