Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-07-31 07:39:36 +0000
committerEike Stepper2013-07-31 07:39:36 +0000
commit90af6c93d8e0452f75da0fa0a7ef8696374b1383 (patch)
treede07a866326e9a410d0a1296583f9bd11645405e
parent7e573d8aff69c6173e709d0643dd44e8d217e3d3 (diff)
downloadcdo-90af6c93d8e0452f75da0fa0a7ef8696374b1383.tar.gz
cdo-90af6c93d8e0452f75da0fa0a7ef8696374b1383.tar.xz
cdo-90af6c93d8e0452f75da0fa0a7ef8696374b1383.zip
Add setup tool
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup.ide/src/org/eclipse/emf/cdo/releng/setup/ide/Buckminster.java53
1 files changed, 13 insertions, 40 deletions
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.ide/src/org/eclipse/emf/cdo/releng/setup/ide/Buckminster.java b/plugins/org.eclipse.emf.cdo.releng.setup.ide/src/org/eclipse/emf/cdo/releng/setup/ide/Buckminster.java
index 84f37a363d..36a49c0d1f 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup.ide/src/org/eclipse/emf/cdo/releng/setup/ide/Buckminster.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup.ide/src/org/eclipse/emf/cdo/releng/setup/ide/Buckminster.java
@@ -29,10 +29,7 @@ import org.eclipse.buckminster.core.commands.Import;
import org.eclipse.core.resources.IWorkspaceDescription;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.jobs.ProgressProvider;
import org.eclipse.equinox.p2.publisher.AbstractPublisherApplication;
@@ -214,6 +211,11 @@ public final class Buckminster
run("--displaystacktrace", "import2", "-B", bomPath, mspecPath);
+ if (lock != null)
+ {
+ updateBundlePool(bundlePool);
+ }
+
if (Progress.log().isCancelled())
{
throw new InterruptedException();
@@ -246,8 +248,6 @@ public final class Buckminster
}
}
- updateBundlePool();
-
if (tpOld != null)
{
Files.delete(tpOld);
@@ -279,44 +279,17 @@ public final class Buckminster
}
}
- private static void updateBundlePool() throws Exception
+ private static void updateBundlePool(String bundlePool) throws Exception
{
- final String bundlePool = CONTEXT.getSetup().getPreferences().getBundlePool();
- if (bundlePool != null && bundlePool.length() != 0)
- {
- new Job("Updating bundle pool")
- {
- @Override
- protected IStatus run(IProgressMonitor monitor)
- {
- FileLock lock = FileLock.forWrite(new File(bundlePool));
-
- try
- {
- String bundlePoolURL = "file:/" + bundlePool.replace('\\', '/');
- String targetPlatform = CONTEXT.getTargetPlatformDir().getAbsolutePath();
- String[] args = { "-source", targetPlatform, "-metadataRepository", bundlePoolURL, "-artifactRepository",
- bundlePoolURL, "-append", "-publishArtifacts" };
+ Progress.log().addLine("Updating bundle pool: " + bundlePool);
- Activator.log("Publisher command: " + Arrays.asList(args));
+ String bundlePoolURL = "file:/" + bundlePool.replace('\\', '/');
+ String targetPlatform = CONTEXT.getTargetPlatformDir().getAbsolutePath();
+ String[] args = { "-source", targetPlatform, "-metadataRepository", bundlePoolURL, "-artifactRepository",
+ bundlePoolURL, "-append", "-publishArtifacts" };
- AbstractPublisherApplication publisher = new FeaturesAndBundlesPublisherApplication();
- publisher.run(args);
-
- return Status.OK_STATUS;
- }
- catch (Exception ex)
- {
- Activator.log(ex);
- return Activator.getStatus(ex);
- }
- finally
- {
- lock.release();
- }
- }
- }.schedule();
- }
+ AbstractPublisherApplication publisher = new FeaturesAndBundlesPublisherApplication();
+ publisher.run(args);
}
public static boolean disableAutoBuilding() throws CoreException

Back to the top