[
https://jira.codehaus.org/browse/MGWT-304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=274378#comment-274378
]
Chuck Irvine commented on MGWT-304:
-----------------------------------
A workaround is to:
1) open the junit run configuration.
2) select the classpath tab.
3) select user entries
4) click advanced button
5) select "Add folders" radio button
6) click ok button
7) add folder src/main/webapp/WEB-INF/classes
Its not a *great* workaround since you have to do this with every test case run
configuration.
> JUnit tests in /src/test/java don't see class changes in /src/main/java
> -----------------------------------------------------------------------
>
> Key: MGWT-304
> URL: https://jira.codehaus.org/browse/MGWT-304
> Project: Maven 2.x GWT Plugin
> Issue Type: Bug
> Affects Versions: 2.3.0-1
> Environment: GPE 2.3 / GWT 2.3
> Reporter: Chuck Irvine
>
> Given that you have a JUnit test case class in /src/test/java/**/FooTest.java
> and a tested class /src/main/java/**/Foo.java. If you make changes to
> Foo.java the changes are visible in an Eclipse editing session of
> FooTest.java. However, if you attempt run your test case in FooTest.java you
> will get a runtime error indicating that FooTest doesn't have access to the
> modified Foo.class file.
> Steps to reproduce.
> 1) Generate a GWT project using the gwt-maven-plugin archetype.
> 2) Import the project into Eclipse using new->Existing Projects into
> Workspace.
> 3) Create class Foo.java in /src/main/java/**/client.
> 4) Define a simple test method in Foo.java "public hello(){return "hello"}"
> 5) Create class FooTest.java in /src/test/java/**/client.
> 6) Define a test in FooTest.java:
> "@Test public void testFooTest() {Foo foo = new Foo();
> assertEquals("hello", foo.hello());}
> 7) Run the test case method. You will get a runtime message complaining that
> Foo can't be found.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email