use of aQute.bnd.build.Project in project bnd by bndtools.
the class LauncherTest method testRemotePackager.
/**
* Test the packager for remote
*
* @throws Exception
*/
public static void testRemotePackager() throws Exception {
Project project = getProject();
project.clear();
project.setProperty("-runpath", "biz.aQute.remote.launcher;version=latest");
ProjectLauncher l = project.getProjectLauncher();
l.setTrace(true);
Jar executable = l.executable();
assertTrue(project.check());
assertNotNull(executable);
}
use of aQute.bnd.build.Project in project bnd by bndtools.
the class LauncherTest method testEnv.
/**
* Test env variables
*
* @throws Exception
*/
public static void testEnv() throws Exception {
Project project = getProject();
project.clear();
project.setProperty("-runenv", "ANSWER=84");
ProjectLauncher l = project.getProjectLauncher();
l.setTrace(true);
l.getRunProperties().put("test.cmd", "env");
assertEquals(84, l.launch());
}
use of aQute.bnd.build.Project in project bnd by bndtools.
the class LocationTest method testBasic.
public void testBasic() throws Exception {
Project project = ws.getProject("p1");
assertNotNull(project);
ProjectBuilder sub1 = project.getSubBuilder("sub1");
assertNotNull(sub1);
ProjectBuilder sub2 = project.getSubBuilder("sub2");
assertNotNull(sub2);
assertTrue(find(sub1, "sub1", "p1/sub1.bnd", 4));
assertTrue(find(sub1, "bnd.bnd", "p1/bnd.bnd", 4));
assertTrue(find(project, "bnd.bnd", "p1/bnd.bnd", 4));
assertTrue(find(sub1, "i1", "p1/i1.bnd", 2));
assertTrue(find(project, "i1", "p1/i1.bnd", 2));
assertTrue(find(sub1, "i2", "p1/i2.bnd", 2));
assertTrue(find(project, "i2", "p1/i2.bnd", 2));
assertTrue(find(sub2, "sub2", "p1/sub2.bnd", 3));
assertTrue(find(sub2, "bnd.bnd", "p1/bnd.bnd", 4));
assertTrue(find(sub2, "workspace", "cnf/build.bnd", 6));
assertTrue(find(project, "workspace", "cnf/build.bnd", 6));
assertTrue(find(project.getWorkspace(), "workspace", "cnf/build.bnd", 6));
}
use of aQute.bnd.build.Project in project bnd by bndtools.
the class LauncherTest method testShaPackager.
/**
* Test the sha packager
*
* @throws Exception
*/
public static void testShaPackager() throws Exception {
Project project = getProject();
project.clear();
project.setProperty("-package", "jpm");
ProjectLauncher l = project.getProjectLauncher();
l.setTrace(true);
Jar executable = l.executable();
assertNotNull(executable);
Manifest m = executable.getManifest();
m.write(System.out);
System.out.flush();
assertNotNull(m.getMainAttributes().getValue("JPM-Classpath"));
assertNotNull(m.getMainAttributes().getValue("JPM-Runbundles"));
Resource r = executable.getResource("launcher.properties");
assertNotNull(r);
Properties p = new Properties();
try (InputStream in = r.openInputStream()) {
p.load(in);
}
System.out.println(p);
String s = p.getProperty("launch.bundles");
assertTrue(s.contains("${JPMREPO}/"));
assertEquals("false", p.getProperty("launch.embedded"));
}
use of aQute.bnd.build.Project in project bnd by bndtools.
the class LauncherTest method testPackager.
/**
* Test the packager
*
* @throws Exception
*/
public static void testPackager() throws Exception {
Project project = getProject();
project.clear();
project.setProperty("[debug]testprop", "debug");
project.setProperty("[exec]testprop", "exec");
project.setProperty("Header", "${testprop}");
project.setProperty(Constants.PROFILE, "exec");
ProjectLauncher l = project.getProjectLauncher();
l.setTrace(true);
Jar executable = l.executable();
assertNotNull(executable);
assertEquals("exec", project.getProperty("testprop"));
assertEquals("exec", project.getProperty("Header"));
}
Aggregations