protected void discardRepository(Repository rep) { File dataDir = rep.getDataDir(); if (dataDir != null && dataDir.isDirectory()) { try { FileUtil.deleteDir(dataDir); } catch (IOException e) { } } }
@Override public void run(TestResult result) { try { super.run(result); } finally { if (tmpDir != null) { try { FileUtil.deleteDir(tmpDir); } catch (IOException e) { System.err.println("Unable to clean up temporary directory '" + tmpDir + "': " + e.getMessage()); } } } } };
@Override public void run(TestResult result) { try { super.run(result); } finally { if (tmpDir != null) { try { FileUtil.deleteDir(tmpDir); } catch (IOException e) { System.err.println("Unable to clean up temporary directory '" + tmpDir + "': " + e.getMessage()); } } } } };
@Override public void run(TestResult result) { try { super.run(result); } finally { if (tmpDir != null) { try { FileUtil.deleteDir(tmpDir); } catch (IOException e) { System.err.println("Unable to clean up temporary directory '" + tmpDir + "': " + e.getMessage()); } } } } };
@Override public void run(TestResult result) { try { super.run(result); } finally { if (tmpDir != null) { try { FileUtil.deleteDir(tmpDir); } catch (IOException e) { System.err.println("Unable to clean up temporary directory '" + tmpDir + "': " + e.getMessage()); } } } } };
@Override public void run(TestResult result) { try { super.run(result); } finally { if (tmpDir != null) { try { FileUtil.deleteDir(tmpDir); } catch (IOException e) { System.err.println("Unable to clean up temporary directory '" + tmpDir + "': " + e.getMessage()); } } } } };
@Override public void run(TestResult result) { try { super.run(result); } finally { if (tmpDir != null) { try { FileUtil.deleteDir(tmpDir); } catch (IOException e) { System.err.println("Unable to clean up temporary directory '" + tmpDir + "': " + e.getMessage()); } } } } };
@Override public void run(TestResult result) { try { super.run(result); } finally { if (tmpDir != null) { try { FileUtil.deleteDir(tmpDir); } catch (IOException e) { System.err.println("Unable to clean up temporary directory '" + tmpDir + "': " + e.getMessage()); } } } } };
/** * Build concepts and behaviours, compile them and save them to this jar file * * @throws IllegalArgumentException * if no concepts found * @return a ClassLoader with in jar included * @throws IOException * @throws ObjectStoreConfigException */ public ClassLoader createJar(File jar) throws IOException, ObjectStoreConfigException { File target = createTempDir(getClass().getSimpleName()); compile(target); JarPacker packer = new JarPacker(target); packer.packageJar(jar); FileUtil.deleteDir(target); return new URLClassLoader(new URL[] { jar.toURI().toURL() }, cl); }
/** * Build concepts and behaviours, compile them and save them to this jar file * * @throws IllegalArgumentException * if no concepts found * @return a ClassLoader with in jar included */ public ClassLoader createJar(File jar) throws RepositoryException, ObjectStoreConfigException { try { File target = createTempDir(getClass().getSimpleName()); compile(target); JarPacker packer = new JarPacker(target); packer.packageJar(jar); FileUtil.deleteDir(target); return new URLClassLoader(new URL[] { jar.toURI().toURL() }, cl); } catch (ObjectStoreConfigException e) { throw e; } catch (RepositoryException e) { throw e; } catch (Exception e) { throw new RepositoryException(e); } }
@Override public void run(TestResult result) { try { super.run(result); } finally { if (tmpDir != null) { try { FileUtil.deleteDir(tmpDir); } catch (IOException e) { System.err.println("Unable to clean up temporary directory '" + tmpDir + "': " + e.getMessage()); } } } } };
@Override public void run(TestResult result) { try { super.run(result); } finally { if (tmpDir != null) { try { FileUtil.deleteDir(tmpDir); } catch (IOException e) { System.err.println("Unable to clean up temporary directory '" + tmpDir + "': " + e.getMessage()); } } } } };