本文整理汇总了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);
}
示例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);
}
示例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();
}
}