コード例 #1
0
 @After
 public void tearDown() {
   if (immutable != null) {
     File rootDirectory = immutable.getRootDirectory();
     if (!Files.delete(rootDirectory, true)) {
       System.err.println("Could not delete " + rootDirectory);
       rootDirectory.deleteOnExit();
     }
   }
   if (mutable != null) {
     File rootDirectory = mutable.getRootDirectory();
     if (!Files.delete(rootDirectory, true)) {
       System.err.println("Could not delete " + rootDirectory);
       rootDirectory.deleteOnExit();
     }
   }
 }
コード例 #2
0
 /** Hack to deploy addon in an immutable repository */
 private static void deployAddonInImmutableRepository(
     AddonId addonId, AddonRepository repository) {
   Furnace furnace = new FurnaceImpl();
   furnace.addRepository(AddonRepositoryMode.MUTABLE, repository.getRootDirectory());
   AddonManagerImpl addonManager =
       new AddonManagerImpl(furnace, new MavenAddonDependencyResolver());
   addonManager.deploy(addonId).perform();
 }