Can't see changes in .java file when starting Junit with Eclipse before installing mvn

I have a multi-mode maven project. The technologies I use are Spring and Struts. I created a test case and ran it as:

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:applicationContextSimpleTest.xml" })
public class CurrencySpeakerTest

Everything is fine ... until I make some changes in the source ... I can not see them until I run mvn installin the parent project. What's wrong? I tried to look into the debugging configuration, but I can’t find a place where, according to him, it will search for source code instead of files .java... I think this is the reason that junit runs files .classinstead of real ... somebody have an idea about this?


I have an application with 3 modules ... they are built with a parent module. The parent module is also an imported project in eclipse. I am making changes in one of the three modules in the test folder. I click update and I do the cleaning / building of the eclipse project manually (if I turn it on automatically, it will not change anything). I run the test as JUnit with the eclipse dialog. It seems that Eclipse does not see changes in the edited test file (.java).

Perhaps this is due to one major project, which includes other modules? It is strange that ... if I edit any other classes that are not in the test folder and run the web application with the tomcat plugin, will Eclipse see the changes there?


mvn clean mvn install, . Eclipse , Eclipse ... , System.out.println() - , , Eclipse , - ( .class)... , - ... ... , .class... ? / eclipse .

+4
3

, , . , ... ?

Class not found pl.erif.utils.CurrencySpeakerTest java.lang.ClassNotFoundException: pl.erif.utils.CurrencySpeakerTest at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:693) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:429) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

+2

mvn clean compile

java eclipse? , f5, . ( )

, build eclipse?

0

. - .classpath. .classpath .classpath . , , eclipse .

: Eclipse

0

Source: https://habr.com/ru/post/1785440/


All Articles