package demo;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.jar.JarInputStream;
import java.util.jar.Manifest;
import org.dom4j.Element;
import org.dom4j.dom.DOMElement;
import org.jsoup.Jsoup;
import com.alibaba.fastjson.JSONObject;
public class MakePomFromJars {
public static void main(String[] args) throws FileNotFoundException, IOException {
Element dependencys = new DOMElement("dependencys");
File dir = new File("/Users/xxx/Documents/work/workspaces/maven_demo/src/resources/webapp/WEB-INF/lib");
for (File jar : dir.listFiles()) {
JarInputStream jis = new JarInputStream(new FileInputStream(jar));
Manifest mainmanifest = jis.getManifest();
jis.cl