简体   繁体   中英

Eclipse Launched Maven project not using classes in the \target folder

I have a project which I am converting from plain Java to Maven.

I used the "Configure -> Convert to Maven Project" option in eclipse.

I removed all jars in the classpath and referenced them in my POM file and built the project

My new classes are built in project/target but when I launch from eclipse, (using the original launcher) , the old classes are in project\\bin folder are used.

How do I reconfigure this to use the correct classes ?

Seems that the configuration for output files in eclipse has not change. Try to change the output of generated files in eclipse manually:

  1. Right click in project -> Properties.
  2. Select "Java build path" and tab "Sources".
  3. At bottom you have a field named "Default output folder". Change it for: <your-project>/target/classes

For example:

在此处输入图片说明 Hope it works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM