當前位置: 首頁>>代碼示例>>Java>>正文


Java Container類代碼示例

本文整理匯總了Java中aQute.bnd.build.Container的典型用法代碼示例。如果您正苦於以下問題:Java Container類的具體用法?Java Container怎麽用?Java Container使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Container類屬於aQute.bnd.build包,在下文中一共展示了Container類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createSymlink

import aQute.bnd.build.Container; //導入依賴的package包/類
/**
 * @param existingModules
 * @param container
 * @throws IOException
 */
private void createSymlink(Set<Path> existingModules, Container container) throws IOException {
	File file = container.getFile();
	Path link = emProjectModules.resolve(file.getName());
	if (!link.toFile().exists()) {
		Files.createSymbolicLink(link, file.toPath());
	}
	existingModules.remove(link);
}
 
開發者ID:commsen,項目名稱:EM,代碼行數:14,代碼來源:ExportMojo.java

示例2: execute

import aQute.bnd.build.Container; //導入依賴的package包/類
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
    Set<Artifact> artifacts = new HashSet<Artifact>();
    try {
        Workspace workspace = printInfo("Running the Pax BND Buildpath Mojo", getLog(), getWorkspace(new File(session.getExecutionRootDirectory())));
        Project workspaceProject = workspace.getProject(project.getArtifactId());
        if (project == null)
            throw new MojoExecutionException("Something is broken with your workspace. Cannot find " + project.getArtifactId() + "(from pom.xml) in BND Workspace.");

        for (Project dep : workspaceProject.getDependson()) {
            for (Container deliverable : dep.getDeliverables()) {
                getLog().info("+ " + deliverable.getFile().getAbsolutePath());
                artifacts.add(asArtifact(deliverable.getFile()));
            }
        }
        Collection<Container> cp = workspaceProject.getBuildpath();

        for (Container entry : cp) {
            getLog().info("+ " + entry.getFile().getAbsolutePath());
            artifacts.add(asArtifact(entry.getFile()));
        }
        workspace.close();
    } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    session.getCurrentProject().setResolvedArtifacts(artifacts);
}
 
開發者ID:tonit,項目名稱:pax-bnd-mavenplugin,代碼行數:29,代碼來源:BuildpathhMojo.java

示例3: testFoo

import aQute.bnd.build.Container; //導入依賴的package包/類
public void testFoo() {
    try {
        File baseDir = new File("/Users/tonit/devel/rebaze/workspaceBNDBridge");
        System.out.println("Workspace is" + baseDir.getAbsolutePath());

        Workspace workspace = new Workspace(baseDir);
        for (Project project : workspace.getAllProjects()) {
            System.out.println("Project found: " + project.getName());

            for (Container container : project.getDeliverables()) {
                System.out.println(" + Deliverale " + container.getFile().getAbsolutePath());
            }

            Collection<Container> cp = project.getBuildpath();
            for (Container entry : cp) {
                System.out.println("+ " + entry.getFile().getAbsolutePath());
            }

            for (Container f : project.getClasspath()) {
                System.out.println("------> build file: " + f.getFile().getAbsolutePath());
            }
            for (Project dep : project.getDependson()) {
                System.out.println("Dep: " + dep.getName() + " --> " + dep.getOutput().getAbsolutePath());

            }
        }

        workspace.close();
    } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
}
 
開發者ID:tonit,項目名稱:pax-bnd-mavenplugin,代碼行數:34,代碼來源:WorkspaceTest.java


注:本文中的aQute.bnd.build.Container類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。