[Mifos-developer] mock struts test cannot find web.xml when run from Eclipse

13 views
Skip to first unread message

Adam Monsen

unread,
Nov 22, 2009, 7:49:04 PM11/22/09
to Developer
Anyone know why I can't run mock struts tests from within Eclipse? For
instance, trying FeeActionStrutsTest gives this error: "The
/WEB-INF/web.xml was not found." I'm trying to run it using Run As →
JUnit Test. Full error (as seen in Eclipse Java console) attached.

The test can be run from the command line like so:
$ cd application
$ mvn test -Dtest=FeeActionStrutsTest

full_error.txt

Keith Woodlock

unread,
Nov 22, 2009, 8:46:27 PM11/22/09
to Mifos software development
is WEB-INF a source folder on eclipse Adam? if not it would need to be
to pick it up on the classpath so you can run the test straight from
eclipse.

> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july

Udai Gupta

unread,
Nov 23, 2009, 12:41:02 AM11/23/09
to Mifos software development
Hi,

> /WEB-INF/web.xml was not found."

It happens when test do not find resources in place.
I do this application directory
"mvn clean install -Dmaven.test.skip=true"
it will process resources, then again try from eclipse to run this test.

Udai
 

Adam Monsen

unread,
Nov 23, 2009, 1:19:04 AM11/23/09
to Mifos Developer Discussions
Keith W. wrote:
> is WEB-INF a source folder on eclipse Adam?

No, good call. But a parent folder is, and I'm not sure how Eclipse
handles nested source folders.

The attached patch allows me to run mock struts tests in Eclipse. I'm
running the test suite now before committing it to the trunk.

Udai wrote:
> I do this application directory
> "mvn clean install -Dmaven.test.skip=true"
> it will process resources, then again try from eclipse
> to run this test.

Also a good idea. I tried that (and various other cleanup-y steps) to no
avail.

fix_mock_struts_tests_in_eclipse.diff
signature.asc
Reply all
Reply to author
Forward
0 new messages