In my job project I have recently been asked to generate POM files via a java class. The problem is that I am very, very new to Maven (like since last December).
Wha
Why do you have to do it in java rather than using an existing tool such as m2eclipse.
See guide for creating a POM for an existing project using m2eclipse.
You could also see the m2eclipse developer guide which will let you see the source code for their implementation.
Reply----
This is a common problem encountered when trying to mavenise a project.
The biggest hurdle is trying to identify the correct maven coordinates.
Often projects refer to renamed jar files, where the group-id, and version numbers have been stripped off.
Sometimes inspecting the manifest in the jar-file gives some hints as to the correct dependent artifact.