Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2012-11-19 21:16:16 -0500
committerPascal Rapicault2012-11-19 21:16:16 -0500
commitf813b6677a7590b2636e4a0c1bfca026d1dd85b2 (patch)
treeb2959680ce313452c2a0f73a8331730eb21b6e6b /bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse
parenta63347a8fc10f3585c71cf5bddee00cc5abafbb2 (diff)
downloadrt.equinox.p2-f813b6677a7590b2636e4a0c1bfca026d1dd85b2.tar.gz
rt.equinox.p2-f813b6677a7590b2636e4a0c1bfca026d1dd85b2.tar.xz
rt.equinox.p2-f813b6677a7590b2636e4a0c1bfca026d1dd85b2.zip
Bug 394434 - [mirror] Can't disable reference mirroringv20121120-021616I20121120-0800
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/MirrorArtifactsTask.java11
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorMetadataTask.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java4
3 files changed, 20 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorArtifactsTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorArtifactsTask.java
index 902cf3df5..081123343 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorArtifactsTask.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorArtifactsTask.java
@@ -35,6 +35,7 @@ public class MirrorArtifactsTask extends Task {
boolean ignoreErrors = false;
boolean raw = false; // use raw artifact descriptors?
boolean verbose = false;
+ boolean references = true;
/* (non-Javadoc)
* @see org.apache.tools.ant.Task#execute()
@@ -62,6 +63,7 @@ public class MirrorArtifactsTask extends Task {
app.setCompare(compare);
app.setComparatorID(comparatorID);
app.setBaseline(baseline);
+ app.setReferences(references);
if (comparatorLog != null)
app.setComparatorLog(comparatorLog);
if (mirrorLog != null)
@@ -77,7 +79,7 @@ public class MirrorArtifactsTask extends Task {
try {
app.run(null);
} catch (Exception e) {
- throw new BuildException("Exception while running mirror application.", e);
+ throw new BuildException("Exception while running mirror application.", e); //$NON-NLS-1$
}
}
@@ -178,4 +180,11 @@ public class MirrorArtifactsTask extends Task {
public void setVerbose(boolean value) {
verbose = value;
}
+
+ /*
+ * Set whether the repository references should be copied to the new repository
+ */
+ public void setReferences(boolean value) {
+ references = value;
+ }
}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorMetadataTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorMetadataTask.java
index 3fd6fec9b..20b058a00 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorMetadataTask.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorMetadataTask.java
@@ -28,6 +28,7 @@ public class MirrorMetadataTask extends Task {
URI destination;
String destinationName;
String writeMode;
+ boolean references = true;
/* (non-Javadoc)
* @see org.apache.tools.ant.Task#execute()
@@ -48,6 +49,7 @@ public class MirrorMetadataTask extends Task {
MirrorApplication app = new MirrorApplication();
app.addDestination(destinationRepo);
app.addSource(sourceRepo);
+ app.setReferences(references);
try {
IStatus result = app.run(null);
if (result.getSeverity() != IStatus.OK)
@@ -92,4 +94,8 @@ public class MirrorMetadataTask extends Task {
public void setWriteMode(String value) {
writeMode = value;
}
+
+ public void setReferences(boolean value) {
+ references = value;
+ }
} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java
index b24750d23..f9d5a94c1 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java
@@ -137,4 +137,8 @@ public class MirrorTask extends AbstractRepositoryTask {
public void setIncludePacked(boolean value) {
((MirrorApplication) application).setIncludePacked(value);
}
+
+ public void setReferences(boolean value) {
+ ((MirrorApplication) application).setReferences(value);
+ }
}

Back to the top