Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2011-05-05 23:17:15 -0400
committerPascal Rapicault2011-05-05 23:17:15 -0400
commit5c45886212a6e9d856100864d5acb4ee07e28e80 (patch)
tree88db7c13e2c060d86ceac28d2e6b67193d22dd9d /bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse
parent388a6d0b41f52f400d95883462d6b13bb6168b89 (diff)
downloadrt.equinox.p2-5c45886212a6e9d856100864d5acb4ee07e28e80.tar.gz
rt.equinox.p2-5c45886212a6e9d856100864d5acb4ee07e28e80.tar.xz
rt.equinox.p2-5c45886212a6e9d856100864d5acb4ee07e28e80.zip
Bug 344851 - [repository] Composite repo "create" ant tasks should have the ability to set atomic flag
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse')
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CreateCompositeArtifactRepositoryTask.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/DestinationRepository.java4
2 files changed, 16 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CreateCompositeArtifactRepositoryTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CreateCompositeArtifactRepositoryTask.java
index cac2fd13f..5cfac9125 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CreateCompositeArtifactRepositoryTask.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CreateCompositeArtifactRepositoryTask.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * SAP AG - repository atomic loading
*******************************************************************************/
package org.eclipse.equinox.p2.internal.repository.tools.tasks;
@@ -30,6 +31,7 @@ public class CreateCompositeArtifactRepositoryTask extends Task {
URI location; // desired location of the composite repository
String name = "Composite Artifact Repository";
+ boolean atomic = false;
boolean compressed = true;
boolean failOnExists = false; // should we fail if a repo already exists?
Map<String, String> properties = new HashMap<String, String>();
@@ -67,6 +69,8 @@ public class CreateCompositeArtifactRepositoryTask extends Task {
// set the properties
if (compressed)
properties.put(IRepository.PROP_COMPRESSED, Boolean.toString(true));
+ if (atomic)
+ properties.put(CompositeArtifactRepository.PROP_ATOMIC_LOADING, Boolean.toString(true));
// create the repository
try {
@@ -108,6 +112,13 @@ public class CreateCompositeArtifactRepositoryTask extends Task {
}
/*
+ * Set a value indicating whether or not the repository should be atomic.
+ */
+ public void setAtomic(boolean value) {
+ atomic = value;
+ }
+
+ /*
* Set whether or not we should fail the operation if a repository
* already exists at the location.
*/
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/DestinationRepository.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/DestinationRepository.java
index 71602d595..6c520f180 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/DestinationRepository.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/DestinationRepository.java
@@ -52,6 +52,10 @@ public class DestinationRepository extends DataType {
descriptor.setKind(repoKind);
}
+ public void setAtomic(String atomicAsBoolean) {
+ descriptor.setAtomic(atomicAsBoolean);
+ }
+
RepositoryDescriptor getDescriptor() {
return descriptor;
}

Back to the top