use of aQute.bnd.build.Project in project bnd by bndtools.
the class ProjectTest method testNoCanonicalName.
/**
* Test linked canonical name
*/
public void testNoCanonicalName() throws Exception {
Workspace ws = getWorkspace("testresources/ws");
Project project = ws.getProject("p6");
project.clean();
// Now we build it.
File[] files = project.build();
assertTrue(project.check());
assertNotNull(files);
assertEquals(1, files.length);
assertEquals("p6.jar", files[0].getName());
File f = new File(project.getTarget(), "p6.jar");
assertTrue(f.isFile());
assertFalse(IO.isSymbolicLink(f));
}
use of aQute.bnd.build.Project in project bnd by bndtools.
the class EclipsePlugin method init.
@Override
public void init(Workspace ws) throws Exception {
Project p = new Project(ws, ws.getFile("cnf"));
created(p);
for (Project pp : ws.getAllProjects()) {
created(pp);
}
}
use of aQute.bnd.build.Project in project bnd by bndtools.
the class LauncherTest method testUnresolved.
public void testUnresolved() throws Exception {
Project project = getProject();
project.clear();
project.setProperty(Constants.RUNTRACE, "true");
String mandatorynoversion = IO.getFile("jar/mandatorynoversion.jar").getAbsolutePath();
String runbundles = project.getProperty(Constants.RUNBUNDLES);
project.setProperty(Constants.RUNBUNDLES, runbundles + "," + mandatorynoversion + ";version=file");
ProjectTester tester = project.getProjectTester();
tester.prepare();
ProjectLauncher l = tester.getProjectLauncher();
l.addRunBundle(mandatorynoversion);
l.setTimeout(25000, TimeUnit.MILLISECONDS);
l.setTrace(true);
assertEquals(1, l.launch());
}
use of aQute.bnd.build.Project in project bnd by bndtools.
the class LauncherTest method testAgent.
/**
* Test the java agent
*
* @throws Exception
*/
public static void testAgent() throws Exception {
Project project = getProject();
project.clear();
project.setProperty("-javaagent", "true");
ProjectLauncher l = project.getProjectLauncher();
l.setTrace(true);
l.getRunProperties().put("test.cmd", "agent");
assertEquals(55, l.launch());
}
use of aQute.bnd.build.Project in project bnd by bndtools.
the class LocationTest method testHeaderInSub.
public void testHeaderInSub() throws Exception {
Project project = ws.getProject("locationtest");
Builder builder = project.getSubBuilders().iterator().next();
assertNotNull(builder);
FileLine fl = builder.getHeader("-inprojectsep", "BAZ");
assertNotNull(fl);
assertEquals(project.getPropertiesFile().getAbsolutePath(), fl.file.getAbsolutePath());
assertEquals(10, fl.line);
assertEquals(104, fl.start);
assertEquals(107, fl.end);
}
Aggregations