title: Automate creation of pom file dependencies based on the jar file
body: <p>I have hundreds of jar files scattered across different projects that I need to create pom file dependencies files for. I'd really like to avoid manually searching for every jar file and adding the dependency manually. Is there an API I can use to accomplish this task or some other way ?</p>
  
  <p>Ive tried using a generic pom as described : <a href="http://maven.apache.org/plugins/maven-install-plugin/examples/generic-pom-generation.html" rel="nofollow">http://maven.apache.org/plugins/maven-install-plugin/examples/generic-pom-generation.html</a></p>
  
  <p>Using this command - mvn install:install-file  -Dfile=spring-webmvc-portlet-3.0.6.RELEASE -DgroupId=test -DartifactId=test -Dversion=version -Dpackaging=jar-DgeneratePom=true</p>
  
  <p>But should the generated pom not match the jar file ? Or do I need to add this myself </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;test&lt;/groupId&gt;
    &lt;artifactId&gt;test&lt;/artifactId&gt;
    &lt;version&gt;version&lt;/version&gt;
    &lt;packaging&gt;jar-DgeneratePom=true&lt;/packaging&gt;
    &lt;description&gt;POM was created from install:install-file&lt;/description&gt;
  &lt;/project&gt;
  </code></pre>