Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2010-02-26 15:19:16 +0000
committerAndrew Niefer2010-02-26 15:19:16 +0000
commit3328c174483daac28c1be073b1591ebdd8d974f7 (patch)
tree1bd100be7ce2e999a42f77e4042a861f4c89f704 /bundles
parente71a591de427fe7be2b7defb34dc3b683c8d6163 (diff)
downloadrt.equinox.p2-3328c174483daac28c1be073b1591ebdd8d974f7.tar.gz
rt.equinox.p2-3328c174483daac28c1be073b1591ebdd8d974f7.tar.xz
rt.equinox.p2-3328c174483daac28c1be073b1591ebdd8d974f7.zip
bug 303933 - packed jars missing in repo
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorArtifactsTask.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorMetadataTask.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractAntProvisioningTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/MirrorTaskTest.java16
4 files changed, 20 insertions, 5 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 f75497bf4..d9ccbfc55 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
@@ -45,6 +45,7 @@ public class MirrorArtifactsTask extends Task {
destinationRepo.setName(destinationName);
destinationRepo.setLocation(destination);
destinationRepo.setKind(RepositoryDescriptor.KIND_ARTIFACT);
+ destinationRepo.setFormat(source);
if (writeMode != null && writeMode.equals("clean")) //$NON-NLS-1$
destinationRepo.setAppend(false);
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 f4350f3da..07f1bcb3c 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
@@ -10,14 +10,13 @@
*******************************************************************************/
package org.eclipse.equinox.p2.internal.repository.tools.tasks;
-import org.eclipse.equinox.p2.core.ProvisionException;
-
import java.net.URI;
import java.net.URISyntaxException;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.internal.repository.tools.MirrorApplication;
import org.eclipse.equinox.p2.internal.repository.tools.RepositoryDescriptor;
@@ -38,6 +37,7 @@ public class MirrorMetadataTask extends Task {
destinationRepo.setName(destinationName);
destinationRepo.setLocation(destination);
destinationRepo.setKind(RepositoryDescriptor.KIND_METADATA);
+ destinationRepo.setFormat(source);
if (writeMode != null && writeMode.equals("clean")) //$NON-NLS-1$
destinationRepo.setAppend(false);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractAntProvisioningTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractAntProvisioningTest.java
index b87b90ee0..71e3d26df 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractAntProvisioningTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractAntProvisioningTest.java
@@ -42,8 +42,8 @@ public class AbstractAntProvisioningTest extends AbstractProvisioningTest {
public void setUp() throws Exception {
super.setUp();
- buildScript = new File(getTempFolder(), getUniqueString());
- logLocation = new File(getTempFolder(), getUniqueString());
+ buildScript = new File(getTestFolder(getName()), "build_" + getName() + ".xml");
+ logLocation = new File(getTestFolder(getName()), "log_" + getName() + ".log");
createBuildScript();
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/MirrorTaskTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/MirrorTaskTest.java
index 5219701ce..a66c7d4cb 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/MirrorTaskTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/MirrorTaskTest.java
@@ -35,13 +35,14 @@ import org.eclipse.osgi.util.NLS;
public class MirrorTaskTest extends AbstractAntProvisioningTest {
private static final String MIRROR_TASK = "p2.mirror";
+ private static final String MIRROR_ARTIFACTS_TASK = "p2.artifact.mirror";
private URI destinationRepo;
private URI artifactRepo, sliceArtifactRepo, sliceRepo, sourceRepo2, zipRepo;
public void setUp() throws Exception {
super.setUp();
// Get a random location to create a repository
- destinationRepo = (new File(getTempFolder(), getUniqueString())).toURI();
+ destinationRepo = (new File(getTestFolder(getName()), "destinationRepo")).toURI();
artifactRepo = getTestData("error loading data", "testData/mirror/mirrorPackedRepo").toURI();
sourceRepo2 = getTestData("error loading data", "testData/mirror/mirrorSourceRepo2").toURI();
sliceRepo = getTestData("error loading data", "testData/permissiveSlicer").toURI();
@@ -680,6 +681,19 @@ public class MirrorTaskTest extends AbstractAntProvisioningTest {
}
}
+ public void testMirrorPackedRepo() {
+ AntTaskElement mirror = new AntTaskElement(MIRROR_ARTIFACTS_TASK);
+ mirror.addAttribute("destination", URIUtil.toUnencodedString(destinationRepo));
+ mirror.addAttribute("source", URIUtil.toUnencodedString(artifactRepo));
+ addTask(mirror);
+ runAntTask();
+
+ File repo = new File(destinationRepo);
+
+ assertTrue(new File(repo, "plugins/org.eclipse.core.filebuffers_3.4.0.v20080603-2000.jar.pack.gz").exists());
+ assertTrue(new File(repo, "plugins/org.eclipse.osgi.services.source_3.1.200.v20071203.jar.pack.gz").exists());
+ }
+
/*
* Modified from org.eclipse.equinox.p2.tests.mirror.ArtifactMirrorApplicationTest
*/

Back to the top