Artifact artifact = DefaultArtifactFactory.createArtifact(dep); System.out.println("import now: " + artifact.getName()); m_bundle.addImportArtifact(artifact);
boolean wantsToBundle = Boolean.valueOf( (String) dep.resolvedProperties().get("osgi.jar.bundle")) .booleanValue(); if (!wantsToBundle) { Artifact artifact = DefaultArtifactFactory.createArtifact(dep); m_bundle.addImportArtifact(artifact); }
    protected void parseJar() throws IOException, NotFoundException    {        m_bundle = new Bundle(repolocal, bundledir, artifactGroup, artifactId,                artifactVersion);        // check the withpkgversion flag        String pkgversion = System.getProperty("withpkgv");        if (pkgversion != null)            m_bundle.setWithPkgVersion();                List deps = project.getDependencies();        for (Iterator dit = deps.iterator(); dit.hasNext();) {            Dependency dep = (Dependency) dit.next();            Artifact artifact = DefaultArtifactFactory.createArtifact(dep);            System.out.println("import now: " + artifact.getName());            m_bundle.addImportArtifact(artifact);        }        String targetfile = bundledir + File.separatorChar +         	artifactId + "-"+  artifactVersion+".jar";        System.out.println(targetfile);        m_bundle.parseBundle(targetfile);    }