I was having the same issue and wanted to Mavenise entire eclipse workspace containing around 60 Eclipse projects. Doing so manually required a lot of time and alternate options were not that viable. To solve the issue I finally created a project called eclipse-to-maven on github. As eclipse doesn't have all necessary information about the dependencies, it does the following:
Based on <classpathentry/>
XML elements in .classpath file, it creates the dependencies on another project, identifies the library jar file and based on its name (for instance jakarta-oro-2.0.8.jar) identifies its version. Currently artifactId
and groupId
are same as I couldn't find something which could return me the Maven groupId of the dependency based on artifactId
. Though this is not a perfect solution it provides a good ground to speed up Mavenisation.
It moves all source folders according to Maven convention (like src/main/java
)
As Eclipse projects having names with spaces are difficult to deal on Linux/Unix environment, it renames them as well with names without spaces.
Resultant pom.xml files contain the dependencies and basic pom structure. You have to add required Maven plugins manually.