1
votes

I am trying to convert maven project to Eclipse project, I have run this command, mvn eclipse:clean eclipse:eclipse , it did generate .project and .classpath file, .project looks like correct, but .classpath file is wrong, it didn't add source folder and third-party library.

Thanks

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
    <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
    <classpathentry kind="output" path="target/classes"/>
</classpath>
1
What Eclipse version? - MariuszS
Can you be more specific about your use case? Are you just looking to import a maven project into eclipse? Or are you required to generate all the files independently of Eclipse? If the former, you should use m2e (see answer from @MariuszS below. If the latter, mvn eclipse:eclipse is better. - Andrew Eisenberg
my IDE version is RSA 6.0 - user595234
Wow. That is old. What version of Eclipse is it based on? I think it is less than 3.4. If so, then you will not be able to install m2e into your RSA. Do you really need to use such and old version? - Andrew Eisenberg

1 Answers

0
votes

Do you know about Eclipse Integration project?

m2e

Maven Integration for Eclipse provides tight integration for Maven into the IDE with the following features:

  • Launching Maven builds from within Eclipse
  • Dependency management for Eclipse build path based on Maven's pom.xml
  • Resolving Maven dependencies from the Eclipse workspace without installing to local Maven repository
  • Automatic downloading of the required dependencies from the remote Maven repositories
  • Wizards for creating new Maven projects, pom.xml and to enable Maven support on plain Java project
  • Quick search for dependencies in Maven remote repositories
  • Quick fixes in the Java editor for looking up required dependencies/jars by the class or package name