Hi.  Maven newbie here.

We are starting a new project with Maven2, Struts, Hibernate, and
Spring.  I would like to test Struts with a test framework such as
StrutsTestCase.  I would like to use the MockStrutsTestCase so that I
don't need a running container.  

mvn gives a failing test and the following error in the surefire
reports.  When running mvn -X clean install, the target/project folder
containing the WEB-INF folder does not yet exist.  I also see that the
test classpath points to target/classes and target/test-classes (and the
dependencies) but not target/project-name (where WEB-INF resides).
These explain the error.  How do I resolve this?

Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.328
sec <<< FAILURE!
test(com.carlson.cwt.contactrecording.struts.HomeActionTest)  Time
elapsed: 2.297 sec  <<< FAILURE!
junit.framework.AssertionFailedError: The /WEB-INF/web.xml was not
found.
        at
servletunit.struts.MockStrutsTestCase.getActionServlet(MockStrutsTestCas
e.java:344)
        at
servletunit.struts.MockStrutsTestCase.tearDown(MockStrutsTestCase.java:1
30)
        at junit.framework.TestCase.runBare(TestCase.java:130)
... <a bunch of stuff> ...
        at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Suref
ireBooter.java:225)
        at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java
:747)




I understand that I still have a dependency on Cactus.

Do I need the cactus-maven-1.7 plugin?  I don't think I do since its
description says it is for starting and stopping containers to run the
tests and I want to avoid that.

Any help for this newbie is appreciated.  Thanks in advance.

Andrew Small

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to