use of org.eclipse.ceylon.tools.importjar.CeylonImportJarTool in project ceylon by eclipse.
the class ImportJarToolTests method testSourceJarWithPropertiesDescriptor.
@Test
public void testSourceJarWithPropertiesDescriptor() throws Exception {
FileUtil.delete(destFile("importtest"));
ToolModel<CeylonImportJarTool> model = pluginLoader.loadToolModel("import-jar");
Assert.assertNotNull(model);
CeylonImportJarTool tool = pluginFactory.bindArguments(model, getMainTool(), toolOptions("--descriptor", "test/src/org/eclipse/ceylon/tools/test/test-descriptor.properties", "source.import.test/1.0", "test/src/org/eclipse/ceylon/tools/test/test.jar", "test/src/org/eclipse/ceylon/tools/test/test-source.jar"));
tool.run();
File jarFile = destFile("source/import/test/1.0/source.import.test-1.0.jar");
File sha1JarFile = destFile("source/import/test/1.0/source.import.test-1.0.jar.sha1");
File sourceJarFile = destFile("source/import/test/1.0/source.import.test-1.0-sources.jar");
File sha1SourceJarFile = destFile("source/import/test/1.0/source.import.test-1.0-sources.jar.sha1");
File propertiesFile = destFile("source/import/test/1.0/module.properties");
File sha1PropertiesFile = destFile("source/import/test/1.0/module.properties");
Assert.assertTrue(jarFile.exists());
Assert.assertTrue(sha1JarFile.exists());
Assert.assertTrue(sourceJarFile.exists());
Assert.assertTrue(sha1SourceJarFile.exists());
Assert.assertTrue(propertiesFile.exists());
Assert.assertTrue(sha1PropertiesFile.exists());
}
use of org.eclipse.ceylon.tools.importjar.CeylonImportJarTool in project ceylon by eclipse.
the class ImportJarToolTests method testWithPropertiesDescriptor.
@Test
public void testWithPropertiesDescriptor() throws Exception {
FileUtil.delete(destFile("importtest"));
ToolModel<CeylonImportJarTool> model = pluginLoader.loadToolModel("import-jar");
Assert.assertNotNull(model);
CeylonImportJarTool tool = pluginFactory.bindArguments(model, getMainTool(), toolOptions("--descriptor", "test/src/org/eclipse/ceylon/tools/test/test-descriptor.properties", "importtest/1.0", "test/src/org/eclipse/ceylon/tools/test/test.jar"));
tool.run();
File f1 = destFile("importtest/1.0/importtest-1.0.jar");
File f2 = destFile("importtest/1.0/importtest-1.0.jar.sha1");
File f3 = destFile("importtest/1.0/module.properties");
File f4 = destFile("importtest/1.0/module.properties.sha1");
Assert.assertTrue(f1.exists());
Assert.assertTrue(f2.exists());
Assert.assertTrue(f3.exists());
Assert.assertTrue(f4.exists());
}
use of org.eclipse.ceylon.tools.importjar.CeylonImportJarTool in project ceylon by eclipse.
the class ImportJarToolTests method testVerbosePackageModuleVersionJar.
@Test
public void testVerbosePackageModuleVersionJar() throws Exception {
FileUtil.delete(destFile("importtest/imptest"));
ToolModel<CeylonImportJarTool> model = pluginLoader.loadToolModel("import-jar");
Assert.assertNotNull(model);
CeylonImportJarTool tool = pluginFactory.bindArguments(model, getMainTool(), toolOptions("--verbose", "--force", "importtest.imptest/1.0", "test/src/org/eclipse/ceylon/tools/test/test.jar"));
tool.run();
File f1 = destFile("importtest/imptest/1.0/importtest.imptest-1.0.jar");
File f2 = destFile("importtest/imptest/1.0/importtest.imptest-1.0.jar.sha1");
Assert.assertTrue(f1.exists() && f2.exists());
}
Aggregations