Get POM dependences from classpath list jars

I have a small problem. I have to translate an existing J2EE project to a Maven project, I have a list of jars that it is written into .classpath Eclipse file.

Is there a plug-in to do this work?

for example if I have this .classpath entries:

[...]
<classpathentry kind="lib" path="struts-scripting-1.3.8.jar"/>
<classpathentry kind="lib" path="struts-extras-1.3.8.jar"/>
[...]

I would like somethig as:

[...]
<dependency>
  <groupId>org.apache.struts</groupId>
  <artifactId>struts-scripting</artifactId>
  <version>1.3.8</version>
</dependency>
<dependency>
  <groupId>org.apache.struts</groupId>
  <artifactId>struts-extras</artifactId>
  <version>1.3.8</version>
</dependency>
[...]

Is it possible?

Thx.

Enrico

Answers


Well ... Get rid of your classpath entries and have only maven dependencies ... Also install the maven plugins for your eclipse environment. When you convert your j2ee project to maven project, the maven dependencies will show up in the class path. Under the Maven dependencies you will see all your jar files in the Project Properties -> java build path.


Need Your Help

Hard time while creating my own Period class

java calendar period milliseconds

I'm having some hard time building my own period class, i know that there are some already made classes out there but due to internal restrictions i will have to implement my own.