1

After importing mavenised project from SVN, I can run mvn clean mvn install command successfully. But, getting error while running mvn eclipse:eclispe command to generate .project and .classpath files automatically which are required to make this project as a eclipse specific project.

Error message after runnning mvn eclipse:eclipse

k\Projects\code-base\PNEBatch>mvn eclipse:eclipse
 Scanning for projects...
 Searching repository for plugin with prefix: 'eclipse'.
 ------------------------------------------------------------------------
] BUILD ERROR
 ------------------------------------------------------------------------
 The plugin 'org.apache.maven.plugins:maven-eclipse-plugin' does not exist
 valid version could be found
 ------------------------------------------------------------------------
 For more information, run Maven with the -e switch
 ------------------------------------------------------------------------
 Total time: < 1 second
 Finished at: Tue May 06 18:16:20 IST 2014
 Final Memory: 4M/121M

After this i also tried to including mvn-eclipse plugin in project pom.xml file as

<plugin>
<groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-eclipse-plugin</artifactId>
</plugin>

but still it is not able to locate that plugin. I have also tried running command mvn -npr eclipse:eclipse but no luck.

Can somebody suggest me what else should I do or is there any other way we can setup classpath after importing from SVN if mvn eclipse:eclipse is not working?

1
  • 2
    The maven-eclipse-plugin is ancient. Use m2eclipse and "File->Import->Existing Maven projects" instead. May 7, 2014 at 8:36

1 Answer 1

3

The mvn eclipse:eclipse generates project and classpaths, yes. However, that was before there was a suitable eclipse plugin for the task.

If your workspace includes m2e, you can simply use file->import->existing maven project to open it inside eclipse. But, if you already have created project files from mvn eclipse:eclipse it tends to not work properly. In that case try deleting all eclipse files (.classpath, .settings, .project) before importing it.

If you really want to use mvn eclipse:eclipse on the commandline and it fails with version, you may have somethings in your setting that prevents it from reaching maven central (a local company proxy or similar). Try using mvn help:effective-settings or mvn help:effective-pom if you need to see them.

1
  • In mvn eclipse:eclipse, what does x and y signify for argument x:y? Dec 8, 2017 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.