diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF
index 928321ad65..e6ba563fd6 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF
@@ -9,7 +9,6 @@ Bundle-Localization: plugin
Export-Package: org.eclipse.equinox.internal.p2.artifact.processing;x-friends:="org.eclipse.equinox.p2.artifact.processors,org.eclipse.equinox.p2.artifact.optimizers",
org.eclipse.equinox.internal.p2.artifact.processors.checksum;x-friends:="org.eclipse.equinox.p2.publisher",
org.eclipse.equinox.internal.p2.artifact.processors.md5;x-internal:=true,
- org.eclipse.equinox.internal.p2.artifact.processors.pack200;x-friends:="org.eclipse.equinox.p2.artifact.processors,org.eclipse.equinox.p2.artifact.optimizers",
org.eclipse.equinox.internal.p2.artifact.processors.pgp;x-friends:="org.eclipse.equinox.p2.engine,org.eclipse.equinox.p2.ui.sdk,org.eclipse.equinox.p2.ui",
org.eclipse.equinox.internal.p2.artifact.repository;
x-friends:="org.eclipse.equinox.p2.publisher,
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/plugin.xml b/bundles/org.eclipse.equinox.p2.artifact.repository/plugin.xml
index c76afae803..8f02212972 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/plugin.xml
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/plugin.xml
@@ -6,12 +6,6 @@
-
-
-
-
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java
deleted file mode 100644
index 1f21f0b4ab..0000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2018 compeople AG and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
-* Mykola Nikishov - continuing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.processors.pack200;
-
-import java.io.*;
-import org.eclipse.equinox.internal.p2.artifact.processing.AbstractBufferingStep;
-import org.eclipse.equinox.internal.p2.jarprocessor.UnpackStep;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor.Options;
-
-/**
- * The Pack200Unpacker expects an input containing ".jar.pack.gz" data.
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @noextend This class is not intended to be subclassed by clients.
- * @noreference This class is not intended to be referenced by clients.
- * @deprecated See bug for details.
- */
-@Deprecated(forRemoval = true, since = "1.4.100")
-public class Pack200ProcessorStep extends AbstractBufferingStep {
- public static final String PACKED_SUFFIX = ".pack.gz"; //$NON-NLS-1$
-
- private File incoming;
-
- @Override
- protected OutputStream createIncomingStream() throws IOException {
- incoming = File.createTempFile(INCOMING_ROOT, JAR_SUFFIX + PACKED_SUFFIX);
- return new BufferedOutputStream(new FileOutputStream(incoming));
- }
-
- @Override
- protected void performProcessing() {
- // NO-OP see https://github.com/eclipse-equinox/p2/issues/40
- }
-
- protected File process() throws IOException {
- Options options = new Options();
- options.unpack = false;
- // TODO use false here assuming that all content is conditioned. Need to revise this
- options.processAll = false;
- options.input = incoming;
- options.outputDir = getWorkDir().getPath();
- options.verbose = false;
- new JarProcessorExecutor().runJarProcessor(options);
- return new File(getWorkDir(), incoming.getName().substring(0, incoming.getName().length() - PACKED_SUFFIX.length()));
- }
-
- @Override
- public boolean isEnabled() {
- return UnpackStep.canUnpack();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
index 8ee48520d9..09511fdbfc 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
@@ -19,20 +19,48 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.artifact.repository.simple;
-import java.io.*;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
import java.net.URI;
import java.net.URISyntaxException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
import java.util.Map.Entry;
+import java.util.Set;
import java.util.jar.JarEntry;
import java.util.jar.JarOutputStream;
-import org.eclipse.core.runtime.*;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.core.runtime.URIUtil;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.equinox.internal.p2.artifact.processors.checksum.ChecksumUtilities;
import org.eclipse.equinox.internal.p2.artifact.processors.checksum.ChecksumVerifier;
import org.eclipse.equinox.internal.p2.artifact.processors.pgp.PGPSignatureVerifier;
-import org.eclipse.equinox.internal.p2.artifact.repository.*;
+import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
+import org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest;
+import org.eclipse.equinox.internal.p2.artifact.repository.MirrorSelector;
+import org.eclipse.equinox.internal.p2.artifact.repository.SignatureVerifier;
import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
@@ -41,17 +69,29 @@
import org.eclipse.equinox.internal.p2.repository.DownloadStatus;
import org.eclipse.equinox.internal.p2.repository.Transport;
import org.eclipse.equinox.internal.p2.repository.helpers.ChecksumHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.*;
+import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
+import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepHandler;
+import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ZipVerifierStep;
import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.index.IIndex;
import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.*;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.*;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.IQueryable;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRequest;
+import org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.spi.AbstractArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
import org.eclipse.osgi.service.datalocation.Location;
import org.eclipse.osgi.util.NLS;
@@ -268,11 +308,6 @@ public void write(int b) throws IOException {
private static final String ARTIFACT_FOLDER = "artifact.folder"; //$NON-NLS-1$
private static final String ARTIFACT_UUID = "artifact.uuid"; //$NON-NLS-1$
static final private String BLOBSTORE = ".blobstore/"; //$NON-NLS-1$
- static final private String[][] PACKED_MAPPING_RULES = {{"(& (classifier=osgi.bundle) (format=packed))", "${repoUrl}/plugins/${id}_${version}.jar.pack.gz"}, //$NON-NLS-1$//$NON-NLS-2$
- {"(& (classifier=osgi.bundle))", "${repoUrl}/plugins/${id}_${version}.jar"}, //$NON-NLS-1$//$NON-NLS-2$
- {"(& (classifier=binary))", "${repoUrl}/binary/${id}_${version}"}, //$NON-NLS-1$ //$NON-NLS-2$
- {"(& (classifier=org.eclipse.update.feature) (format=packed))", "${repoUrl}/features/${id}_${version}.jar.pack.gz"}, //$NON-NLS-1$//$NON-NLS-2$
- {"(& (classifier=org.eclipse.update.feature))", "${repoUrl}/features/${id}_${version}.jar"}}; //$NON-NLS-1$//$NON-NLS-2$
static final private String[][] DEFAULT_MAPPING_RULES = {{"(& (classifier=osgi.bundle))", "${repoUrl}/plugins/${id}_${version}.jar"}, //$NON-NLS-1$//$NON-NLS-2$
{"(& (classifier=binary))", "${repoUrl}/binary/${id}_${version}"}, //$NON-NLS-1$ //$NON-NLS-2$
@@ -292,8 +327,6 @@ public void write(int b) throws IOException {
private KeyIndex keyIndex;
private boolean snapshotNeeded = false;
- static final private String PUBLISH_PACK_FILES_AS_SIBLINGS = "publishPackFilesAsSiblings"; //$NON-NLS-1$
-
private static final int DEFAULT_MAX_THREADS = 4;
protected String[][] mappingRules = DEFAULT_MAPPING_RULES;
@@ -391,19 +424,6 @@ public SimpleArtifactRepository(IProvisioningAgent agent, String repositoryName,
}
initializeAfterLoad(location, false); // Don't update the timestamp, it will be done during save
- if (properties != null) {
- if (properties.containsKey(PUBLISH_PACK_FILES_AS_SIBLINGS)) {
- synchronized (this) {
- String newValue = properties.get(PUBLISH_PACK_FILES_AS_SIBLINGS);
- if (Boolean.TRUE.toString().equals(newValue)) {
- mappingRules = PACKED_MAPPING_RULES;
- } else {
- mappingRules = DEFAULT_MAPPING_RULES;
- }
- initializeMapper();
- }
- }
- }
save();
} finally {
if (lockAcquired)
@@ -447,11 +467,6 @@ private SimpleArtifactDescriptor createInternalDescriptor(IArtifactDescriptor de
if (isFolderBased(descriptor))
internal.setRepositoryProperty(ARTIFACT_FOLDER, Boolean.TRUE.toString());
- //clear out the UUID if we aren't using the blobstore.
- if (flatButPackedEnabled(descriptor) && internal.getProperty(ARTIFACT_UUID) != null) {
- internal.setProperty(ARTIFACT_UUID, null);
- }
-
if (descriptor instanceof SimpleArtifactDescriptor) {
Map repoProperties = ((SimpleArtifactDescriptor) descriptor).getRepositoryProperties();
for (Map.Entry entry : repoProperties.entrySet()) {
@@ -584,9 +599,6 @@ public synchronized boolean contains(IArtifactKey key) {
}
public synchronized URI createLocation(ArtifactDescriptor descriptor) {
- if (flatButPackedEnabled(descriptor)) {
- return getLocationForPackedButFlatArtifacts(descriptor);
- }
// if the descriptor is canonical, clear out any UUID that might be set and use the Mapper
if (descriptor.getProcessingSteps().length == 0) {
descriptor.setProperty(ARTIFACT_UUID, null);
@@ -934,36 +946,12 @@ public synchronized Set getDescriptors() {
return artifactDescriptors;
}
- /**
- * Typically non-canonical forms of the artifact are stored in the blob store.
- * However, we support having the pack200 files alongside the canonical artifact
- * for compatibility with the format used in optimized update sites. We call
- * this arrangement "flat but packed".
- */
- @SuppressWarnings("removal")
- private boolean flatButPackedEnabled(IArtifactDescriptor descriptor) {
- return Boolean.TRUE.toString().equals(getProperties().get(PUBLISH_PACK_FILES_AS_SIBLINGS)) && IArtifactDescriptor.FORMAT_PACKED.equals(descriptor.getProperty(IArtifactDescriptor.FORMAT));
- }
-
- /**
- * @see #flatButPackedEnabled(IArtifactDescriptor)
- */
- private URI getLocationForPackedButFlatArtifacts(IArtifactDescriptor descriptor) {
- IArtifactKey key = descriptor.getArtifactKey();
- return mapper.map(getLocation(), key.getClassifier(), key.getId(), key.getVersion().toString(),
- descriptor.getProperty(IArtifactDescriptor.FORMAT), descriptor.getProperties());
- }
-
public synchronized URI getLocation(IArtifactDescriptor descriptor) {
// if the artifact has a uuid then use it
String uuid = descriptor.getProperty(ARTIFACT_UUID);
if (uuid != null)
return blobStore.fileFor(bytesFromHexString(uuid));
- if (flatButPackedEnabled(descriptor)) {
- return getLocationForPackedButFlatArtifacts(descriptor);
- }
-
try {
// if the artifact is just a reference then return the reference location
if (descriptor instanceof SimpleArtifactDescriptor) {
@@ -1387,16 +1375,6 @@ private String doSetProperty(String key, String newValue, IProgressMonitor monit
String oldValue = super.setProperty(key, newValue, new NullProgressMonitor());
if (oldValue == newValue || (oldValue != null && oldValue.equals(newValue)))
return oldValue;
- if (PUBLISH_PACK_FILES_AS_SIBLINGS.equals(key)) {
- synchronized (this) {
- if (Boolean.TRUE.toString().equals(newValue)) {
- mappingRules = PACKED_MAPPING_RULES;
- } else {
- mappingRules = DEFAULT_MAPPING_RULES;
- }
- initializeMapper();
- }
- }
if (save)
save();
return oldValue;
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java
deleted file mode 100644
index 29ef701819..0000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-import java.util.Properties;
-
-/**
- * @noreference This class is not intended to be referenced by clients.
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @deprecated See bug
- * and issue for
- * details.
- */
-@Deprecated(forRemoval = true, since = "1.2.0")
-public class PackStep extends CommandStep {
-
- protected static String packCommand = null;
-
- public static boolean canPack() {
- // Ignore everything pack200 https://github.com/eclipse-equinox/p2/issues/40
- return false;
- }
-
- public PackStep(Properties options) {
- super(options, null, null, false);
- }
-
- public PackStep(Properties options, boolean verbose) {
- super(options, null, null, verbose);
- }
-
- @Override
- public String recursionEffect(String entryName) {
- return null;
- }
-
- @Override
- public File preProcess(File input, File workingDirectory, List containers) {
- return null;
- }
-
- @Override
- public File postProcess(File input, File workingDirectory, List containers) {
- return null;
- }
-
- protected boolean shouldPack(File input, List containers, Properties inf) {
- return false;
- }
-
- protected String[] getCommand(File input, File outputFile, Properties inf, List containers)
- throws IOException {
- String[] cmd = null;
- String arguments = getArguments(input, inf, containers);
- if (arguments != null && arguments.length() > 0) {
- String[] args = Utils.toStringArray(arguments, ","); //$NON-NLS-1$
- cmd = new String[3 + args.length];
- cmd[0] = packCommand;
- System.arraycopy(args, 0, cmd, 1, args.length);
- cmd[cmd.length - 2] = outputFile.getCanonicalPath();
- cmd[cmd.length - 1] = input.getCanonicalPath();
- } else {
- cmd = new String[] { packCommand, outputFile.getCanonicalPath(), input.getCanonicalPath() };
- }
- return cmd;
- }
-
- protected String getArguments(File input, Properties inf, List containers) {
- // 1: Explicitly marked in our .inf file
- if (inf != null && inf.containsKey(Utils.PACK_ARGS)) {
- return inf.getProperty(Utils.PACK_ARGS);
- }
-
- // 2: Defaults set in one of our containing jars
- for (Properties container : containers) {
- if (container.containsKey(Utils.DEFAULT_PACK_ARGS)) {
- return container.getProperty(Utils.DEFAULT_PACK_ARGS);
- }
- }
-
- // 3: Set by name in outside pack.properties file
- Properties options = getOptions();
- String argsKey = input.getName() + Utils.PACK_ARGS_SUFFIX;
- if (options.containsKey(argsKey)) {
- return options.getProperty(argsKey);
- }
-
- // 4: Set by default in outside pack.properties file
- if (options.containsKey(Utils.DEFAULT_PACK_ARGS)) {
- return options.getProperty(Utils.DEFAULT_PACK_ARGS);
- }
-
- return ""; //$NON-NLS-1$
- }
-
- @Override
- public String getStepName() {
- return "Pack (NO-OP see https://github.com/eclipse-equinox/p2/issues/40)"; //$NON-NLS-1$
- }
-
- @Override
- public boolean adjustInf(File input, Properties inf, List containers) {
- if (input == null || inf == null)
- return false;
-
- // don't be verbose to check if we should mark the inf
- boolean v = verbose;
- verbose = false;
- if (!shouldPack(input, containers, inf)) {
- verbose = v;
- return false;
- }
- verbose = v;
-
- // mark as conditioned if not previously marked. A signed jar is assumed to be
- // previously conditioned.
- if (inf.getProperty(Utils.MARK_PROPERTY) != null)
- return false;
-
- inf.put(Utils.MARK_PROPERTY, "true"); //$NON-NLS-1$
- // record arguments used
- String arguments = inf.getProperty(Utils.PACK_ARGS);
- if (arguments == null) {
- arguments = getArguments(input, inf, containers);
- if (arguments != null && arguments.length() > 0)
- inf.put(Utils.PACK_ARGS, arguments);
- }
- return true;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackUnpackStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackUnpackStep.java
deleted file mode 100644
index ab6e34ca16..0000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackUnpackStep.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.File;
-import java.util.List;
-import java.util.Properties;
-
-/**
- * @noreference This class is not intended to be referenced by clients.
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @deprecated See bug
- * and issue for
- * details.
- */
-@Deprecated(forRemoval = true, since = "1.2.0")
-public class PackUnpackStep extends PackStep {
-
- public PackUnpackStep(Properties options) {
- super(options);
- }
-
- public PackUnpackStep(Properties options, boolean verbose) {
- super(options, verbose);
- }
-
- @Override
- public String recursionEffect(String entryName) {
- return null;
- }
-
- @Override
- public File postProcess(File input, File workingDirectory, List containers) {
- return null;
- }
-
- @Override
- public File preProcess(File input, File workingDirectory, List containers) {
- return null;
- }
-
- @Override
- public String getStepName() {
- return "Repack (NO-OP see https://github.com/eclipse-equinox/p2/issues/40)"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/UnpackStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/UnpackStep.java
deleted file mode 100644
index 2a0ff7ec66..0000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/UnpackStep.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.File;
-import java.util.List;
-import java.util.Properties;
-
-/**
- * @noreference This class is not intended to be referenced by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @noextend This class is not intended to be subclassed by clients.
- * @deprecated See bug
- * and issue for
- * details.
- */
-@Deprecated(forRemoval = true, since = "1.2.0")
-public class UnpackStep extends CommandStep {
- public static final String UNPACKER_PROPERTY = "org.eclipse.update.jarprocessor.Unpacker"; //$NON-NLS-1$
-
- public static boolean canUnpack() {
- return false;
- }
-
- public UnpackStep(Properties options) {
- super(options, null, null, false);
- }
-
- public UnpackStep(Properties options, boolean verbose) {
- super(options, null, null, verbose);
- }
-
- @Override
- public String recursionEffect(String entryName) {
- return null;
- }
-
- @Override
- public File preProcess(File input, File workingDirectory, List containers) {
- return null;
- }
-
- @Override
- public File postProcess(File input, File workingDirectory, List containers) {
- return null;
- }
-
- @Override
- public String getStepName() {
- return "Unpack (NO-OP see https://github.com/eclipse-equinox/p2/issues/40)"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java
index 2ff3a65b3c..7847c7541b 100644
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java
+++ b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java
@@ -13,12 +13,24 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.jarprocessor;
-import java.io.*;
-import java.util.*;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Properties;
+import java.util.Set;
+import java.util.SortedMap;
+import java.util.StringTokenizer;
+import java.util.TreeMap;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.zip.ZipException;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor;
/**
* @author aniefer@ca.ibm.com
@@ -32,106 +44,21 @@ public class Utils {
*/
// comma separated list of jars to exclude from sigining
public static final String SIGN_EXCLUDES = "sign.excludes"; //$NON-NLS-1$
- // comma separated list of jars to exlclude from packing
- /**
- * @noreference This field is not intended to be referenced by clients.
- * @deprecated See bug
- * for details.
- */
- @Deprecated(forRemoval = true, since = "1.2.0")
- public static final String PACK_EXCLUDES = "pack.excludes"; //$NON-NLS-1$
- // Suffix used when specifying arguments to use when running pack200 on a jar
-
- /**
- * @noreference This field is not intended to be referenced by clients.
- * @deprecated See bug
- * for details.
- */
- @Deprecated(forRemoval = true, since = "1.2.0")
- public static final String PACK_ARGS_SUFFIX = ".pack.args"; //$NON-NLS-1$
-
- /*
- * Properties found in both pack.properties and eclipse.inf
- */
- // Default arguments to use when running pack200.
- // Affects all jars when specified in pack.properties, affects children when
- // specified in eclipse.inf
- /**
- * @noreference This field is not intended to be referenced by clients.
- * @deprecated See bug
- * for details.
- */
- @Deprecated(forRemoval = true, since = "1.2.0")
- public static final String DEFAULT_PACK_ARGS = "pack200.default.args"; //$NON-NLS-1$
- /*
- * Properties found in eclipse.inf file
- */
- // This jar has been conditioned with pack200
- /**
- * @noreference This field is not intended to be referenced by clients.
- * @deprecated See bug
- * for details.
- */
- @Deprecated(forRemoval = true, since = "1.2.0")
- public static final String MARK_PROPERTY = "pack200.conditioned"; //$NON-NLS-1$
// Exclude this jar from processing
public static final String MARK_EXCLUDE = "jarprocessor.exclude"; //$NON-NLS-1$
- // Exclude this jar from pack200
- public static final String MARK_EXCLUDE_PACK = "jarprocessor.exclude.pack"; //$NON-NLS-1$
// Exclude this jar from signing
public static final String MARK_EXCLUDE_SIGN = "jarprocessor.exclude.sign"; //$NON-NLS-1$
// Exclude this jar's children from processing
public static final String MARK_EXCLUDE_CHILDREN = "jarprocessor.exclude.children"; //$NON-NLS-1$
- // Exclude this jar's children from pack200
- public static final String MARK_EXCLUDE_CHILDREN_PACK = "jarprocessor.exclude.children.pack"; //$NON-NLS-1$
// Exclude this jar's children from signing
public static final String MARK_EXCLUDE_CHILDREN_SIGN = "jarprocessor.exclude.children.sign"; //$NON-NLS-1$
- // Arguments used in pack200 for this jar
- /**
- * @noreference This field is not intended to be referenced by clients.
- * @deprecated See bug
- * for details.
- */
- @Deprecated(forRemoval = true, since = "1.2.0")
- public static final String PACK_ARGS = "pack200.args"; //$NON-NLS-1$
- /**
- * @noreference This field is not intended to be referenced by clients.
- * @deprecated See bug
- * for details.
- */
- @Deprecated(forRemoval = true, since = "1.2.0")
- public static final String PACK200_PROPERTY = "org.eclipse.update.jarprocessor.pack200"; //$NON-NLS-1$
public static final String JRE = "@jre"; //$NON-NLS-1$
public static final String PATH = "@path"; //$NON-NLS-1$
public static final String NONE = "@none"; //$NON-NLS-1$
- /**
- * @noreference This field is not intended to be referenced by clients.
- * @deprecated See bug
- * for details.
- */
- @Deprecated(forRemoval = true, since = "1.2.0")
- public static final String PACKED_SUFFIX = ".pack.gz"; //$NON-NLS-1$
public static final String JAR_SUFFIX = ".jar"; //$NON-NLS-1$
public static final FileFilter JAR_FILTER = pathname -> pathname.isFile() && pathname.getName().endsWith(".jar"); //$NON-NLS-1$
- /**
- * @noreference This field is not intended to be referenced by clients.
- * @deprecated See bug
- * for details.
- */
- @SuppressWarnings("removal")
- @Deprecated(forRemoval = true, since = "1.2.0")
- public static final FileFilter PACK_GZ_FILTER = pathname -> pathname.isFile()
- && pathname.getName().endsWith(JarProcessor.PACKED_SUFFIX);
public static void close(Object stream) {
if (stream != null) {
@@ -148,24 +75,6 @@ else if (stream instanceof JarFile)
}
}
- /**
- * Get the set of commands to try to execute pack/unpack
- *
- * @param cmd the command, either "pack200" or "unpack200"
- * @return null
as pack200 is not supported on Java >= 14
- *
- * @noreference This method is not intended to be referenced by clients.
- * @deprecated See bug
- * and issue for
- * details.
- */
- @Deprecated(forRemoval = true, since = "1.2.0")
- public static String[] getPack200Commands(String cmd) {
- return null;
- }
-
/**
* Transfers all available bytes from the given input stream to the given output
* stream. Closes both streams if close == true, regardless of failure. Flushes
@@ -330,9 +239,8 @@ public static boolean shouldSkipJar(File input, boolean processAll, boolean verb
if (processAll)
return false;
- // otherwise, we skip if not marked marked
- String marked = inf.getProperty(MARK_PROPERTY);
- return !Boolean.parseBoolean(marked);
+ // otherwise, we skip
+ return true;
}
/**
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/pack-readme.html b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/pack-readme.html
deleted file mode 100644
index 084ab2972a..0000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/pack-readme.html
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
- Eclipse update packing tool readme
-
-
-Eclipse update packing tool
-
-Overview
-The update packing tool processes a hierarchy of arbitrarily nested
-JARs and ZIP files. It is a generic utility that performs a depth first traversal of
-a nested hierarchy of ZIPs and JARs, performs various commands on
-each of the JARs in the hierarchy, and then rebuilds the same hierarchy
-of ZIPs and JARs again. Currently its main functions are:
-
- - Packing JARs using the Java 1.5 pack200
- command.
- - Unpacking PACK.GZs using the Java 1.5 unpack200
- command.
- - Normalizing JARs for future compression by pack200. This is accomplished
- by running the pack200 command with the --repack command line argument.
- - Signing JARs to allow for authentication of the origin of JARs. This is accomplished by
- running a supplied command (typically the command will just be a wrapper around
- the Java jarsigner tool).
-
-The packing tool is used in the following contexts:
-
- - During a PDE build, to prepare JARs for uploading to an Eclipse
- update site. In this usage, it is used to both nomalize JAR contents
- (pack200 -repack), and sign JARs.
- - On an update site, to convert traditional JAR content into the
- compressed pack200 format.
- - From an Eclipse client application during update, to convert
- compressed pack200 format content into executable JAR files.
-
-Tool usage
-To run the packing tool, you need a 1.5 JRE installed. The tool is run
-by invoking Java as follows:
-
-
- java jarprocessor.jar [options] input
-
-
-Where input is either a zip file, a directory, or a JAR (or a pack.gz file). All files ending
-in ".jar" or ".pack.gz" in the provided zip or directory hierarchy
-will be processed.
-The following additional command line arguments are supported:
-
-- -repack : Normalize the jars using pack200 --repack
-- -sign <cmd> : signs the jars by executing the provided command.
-The command will be provided a single argument that will be the full path of the JAR to process.
-
-- -pack : for each input in JAR form, produce a corresponding output
-in packed form. For an input "a.jar", the output is a.jar.pack.gz.
-
-- -unpack : for each input in packed form, produce a corresponding output
-in unpacked form. For an input "a.jar.pack.gz", the output is "a.jar". -unpack is mutually exclusive with -repack, -pack and -sign.
-- -outputDir <dir> : The directory to put the tool's output into. If the input was a zip file, then an output zip file will be
-created containg all the output files. If the input was a directory, for each input file there is a corresponding output file in the output directory. By default the current working directory is used. If the input is in the same
-directory as the output, the input files may be overwritten.
-
-
-Additionally, when the input is a zip file, it may contain a file called
-pack.properties. The pack.properties file supports the following values:
-
-- pack.excludes = jarName[, jarName]* : A comma-delimited list of JARs that should not be packed or repacked.
-
-- sign.excludes = jarName[, jarName]* : A comma-delimited list of JARs that should not be signed.
-
-- <jarname>.pack.args = option[, option]* : A comma-delimited list of additional arguments that should
-be passed to pack200 when packing any jar with name <jarname>.
-
-
-
-
-.
-. This program and the accompanying materials
-are made available under the terms of the
-"https://www.eclipse.org/legal/epl-2.0/
-"
-"SPDX-License-Identifier: EPL-2.0">Eclipse Public License 2.0.
-
-
-
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/Verifier.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/Verifier.java
index cd56f38195..9f400c7b9d 100644
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/Verifier.java
+++ b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/Verifier.java
@@ -14,14 +14,16 @@
package org.eclipse.equinox.internal.p2.jarprocessor.verifier;
-import java.io.*;
+import java.io.File;
+import java.io.IOException;
import java.util.Iterator;
import java.util.Properties;
-import org.eclipse.equinox.internal.p2.jarprocessor.UnpackStep;
+
import org.eclipse.equinox.internal.p2.jarprocessor.Utils;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.*;
+import org.eclipse.internal.provisional.equinox.p2.jarprocessor.IProcessStep;
+import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor;
+import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor;
-@SuppressWarnings("removal")
public class Verifier extends JarProcessorExecutor {
private static void printUsage() {
@@ -30,8 +32,8 @@ private static void printUsage() {
System.out.println(
"Usage: java -cp jarprocessor.jar org.eclipse.update.internal.jarprocessor.verifier.Verifier -dir input [input]"); //$NON-NLS-1$
System.out.println(""); //$NON-NLS-1$
- System.out.println("-dir : specifies a working directory where pack.gz files can be temporarily unpacked"); //$NON-NLS-1$
- System.out.println("input : a list of directories and/or pack.gz files to verify."); //$NON-NLS-1$
+ System.out.println("-dir : specifies a working directory "); //$NON-NLS-1$
+ System.out.println("input : a list of directories to verify."); //$NON-NLS-1$
}
@@ -82,8 +84,6 @@ public static void main(String[] args) {
public void verify(final File workingDirectory, String[] input) {
options = new Options();
options.verbose = false;
- options.repack = false; // We first unpack first during repack/sign phase
- options.pack = false; // then we are verifying during the pack phase.
options.outputDir = workingDirectory.toString();
Properties properties = new Properties();
@@ -106,29 +106,6 @@ public File processJar(File inputFile) throws IOException {
};
verifier.setWorkingDirectory(workingDirectory.getAbsolutePath());
- for (String input1 : input) {
- File inputFile = new File(input1);
- if (inputFile.exists()) {
- try {
- process(inputFile, Utils.PACK_GZ_FILTER, true, verifier, properties);
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- }
- }
Utils.clear(workingDirectory);
}
-
- @Override
- @Deprecated(forRemoval = true, since = "1.2.0")
- public void addPackStep(JarProcessor processor, Properties properties,
- JarProcessorExecutor.Options processOptions) {
- processor.addProcessStep(new VerifyStep(properties, processOptions.verbose));
- }
-
- @Override
- @Deprecated(forRemoval = true, since = "1.2.0")
- public void addPackUnpackStep(JarProcessor processor, Properties properties, Options processOptions) {
- processor.addProcessStep(new UnpackStep(properties, processOptions.verbose));
- }
}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java
index a77fda1beb..1a6b9d4500 100644
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java
+++ b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java
@@ -13,20 +13,31 @@
*******************************************************************************/
package org.eclipse.internal.provisional.equinox.p2.jarprocessor;
-import java.io.*;
-import java.util.*;
-import java.util.jar.*;
-import org.eclipse.equinox.internal.p2.jarprocessor.*;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.jar.JarEntry;
+import java.util.jar.JarException;
+import java.util.jar.JarFile;
+import java.util.jar.JarOutputStream;
+
+import org.eclipse.equinox.internal.p2.jarprocessor.Utils;
+import org.eclipse.equinox.internal.p2.jarprocessor.ZipProcessor;
public class JarProcessor {
- /**
- * @noreference This field is not intended to be referenced by clients.
- * @deprecated See bug
- * for details.
- */
- @Deprecated(forRemoval = true, since = "1.2.0")
- public static final String PACKED_SUFFIX = "pack.gz"; //$NON-NLS-1$
private List steps = new ArrayList<>();
private String workingDirectory = ""; //$NON-NLS-1$
@@ -35,58 +46,6 @@ public class JarProcessor {
private boolean processAll = false;
private LinkedList containingInfs = new LinkedList<>();
- /**
- * @noreference This method is not intended to be referenced by clients.
- * @deprecated See bug
- * and issue for
- * details.
- */
- @Deprecated(forRemoval = true, since = "1.2.0")
- public static JarProcessor getUnpackProcessor(Properties properties) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @noreference This method is not intended to be referenced by clients.
- * @deprecated See bug
- * and bug
- * and bug
- * and bug for details.
- */
- @Deprecated(forRemoval = true, since = "1.6.0")
- public static final String REUSE_PACK200 = "-reusePack200Files"; //$NON-NLS-1$
public static final String SOURCE = "-source"; //$NON-NLS-1$
public static final String INPLACE = "-inplace"; //$NON-NLS-1$
public static final String CONFIG = "-config"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Utils.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Utils.java
index 8f603e313f..bb2a79bc0e 100644
--- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Utils.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Utils.java
@@ -14,9 +14,17 @@
*******************************************************************************/
package org.eclipse.pde.internal.publishing;
-import java.io.*;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
import java.util.Dictionary;
import java.util.Enumeration;
+
import org.eclipse.osgi.service.resolver.BundleDescription;
import org.eclipse.osgi.util.ManifestElement;
import org.osgi.framework.BundleException;
@@ -59,8 +67,7 @@ public static boolean guessUnpack(BundleDescription bundle, String[] classpath)
return shape.equals("dir"); //$NON-NLS-1$
}
- // launcher fragments are a special case, they have no bundle-classpath and they must
- //be unpacked
+ // launcher fragments are a special case, they have no bundle-classpath
if (bundle.getHost() != null && bundle.getName().startsWith(Constants.BUNDLE_EQUINOX_LAUNCHER))
return true;
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java
index c9a149b4e1..9ec8856460 100644
--- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java
@@ -19,8 +19,12 @@
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
+
import org.apache.tools.ant.Task;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.URIUtil;
import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
@@ -28,7 +32,9 @@
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.publisher.*;
+import org.eclipse.equinox.p2.publisher.IPublisherInfo;
+import org.eclipse.equinox.p2.publisher.Publisher;
+import org.eclipse.equinox.p2.publisher.PublisherInfo;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.query.QueryUtil;
import org.eclipse.equinox.p2.repository.artifact.ArtifactKeyQuery;
@@ -91,7 +97,6 @@ public void setArtifact(boolean artifact) {
}
protected boolean compress = false;
- protected boolean reusePackedFiles = false;
protected boolean append = true;
protected boolean publish = true;
protected String source = null;
@@ -119,7 +124,7 @@ protected void initializeRepositories(PublisherInfo info) throws ProvisionExcept
if (artifactLocation != null) {
@SuppressWarnings("removal")
IArtifactRepository repo = Publisher.createArtifactRepository(getProvisioningAgent(), artifactLocation,
- artifactRepoName, compress, reusePackedFiles);
+ artifactRepoName, compress);
if (!append && !isEmpty(repo)) {
File repoLocation = URIUtil.toFile(artifactLocation);
if (repoLocation != null && source != null) {
@@ -174,10 +179,6 @@ public void setCompress(String value) {
compress = Boolean.parseBoolean(value);
}
- public void setReusePackedFiles(String value) {
- reusePackedFiles = Boolean.parseBoolean(value);
- }
-
public void setAppend(String value) {
append = Boolean.parseBoolean(value);
}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java
index 8e4ca0c9a4..4e337c8642 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java
@@ -17,25 +17,60 @@
******************************************************************************/
package org.eclipse.equinox.p2.publisher;
-import java.io.*;
-import java.util.*;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
import java.util.Map.Entry;
-import org.eclipse.core.runtime.*;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactDescriptor;
import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.metadata.*;
+import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
+import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
+import org.eclipse.equinox.internal.p2.metadata.RequiredCapability;
import org.eclipse.equinox.internal.p2.publisher.Activator;
import org.eclipse.equinox.internal.p2.publisher.QuotedTokenizer;
import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IProvidedCapability;
+import org.eclipse.equinox.p2.metadata.IRequirement;
+import org.eclipse.equinox.p2.metadata.ITouchpointData;
+import org.eclipse.equinox.p2.metadata.IUpdateDescriptor;
+import org.eclipse.equinox.p2.metadata.IVersionedId;
+import org.eclipse.equinox.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.VersionRange;
import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.publisher.actions.*;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
+import org.eclipse.equinox.p2.publisher.actions.IAdditionalInstallableUnitAdvice;
+import org.eclipse.equinox.p2.publisher.actions.ICapabilityAdvice;
+import org.eclipse.equinox.p2.publisher.actions.IFilterAdvice;
+import org.eclipse.equinox.p2.publisher.actions.IPropertyAdvice;
+import org.eclipse.equinox.p2.publisher.actions.ITouchpointAdvice;
+import org.eclipse.equinox.p2.publisher.actions.IUpdateDescriptorAdvice;
+import org.eclipse.equinox.p2.query.Collector;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository;
import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
public abstract class AbstractPublisherAction implements IPublisherAction {
@@ -208,24 +243,6 @@ protected InstallableUnitDescription createIUShell(String id, Version version) {
return root;
}
- /**
- * @noreference This method is not intended to be referenced by clients.
- * @deprecated See bug for details.
- */
- @Deprecated(forRemoval = true, since = "1.6.0")
- protected IArtifactDescriptor createPack200ArtifactDescriptor(IArtifactKey key, File pathOnDisk,
- String installSize) {
- ArtifactDescriptor result = (ArtifactDescriptor) PublisherHelper.createArtifactDescriptor(info, key,
- pathOnDisk);
- // TODO this size calculation is bogus
- if (pathOnDisk != null) {
- result.setProperty(IArtifactDescriptor.ARTIFACT_SIZE, installSize);
- // TODO - this is wrong but I'm testing a work-around for bug 205842
- result.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(pathOnDisk.length()));
- }
- return result;
- }
-
protected InstallableUnitDescription createParentIU(Collection extends IVersionedId> children, String id,
Version version) {
InstallableUnitDescription root = createIUShell(id, version);
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java
index 25af85cb77..4bd160ecc4 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java
+++ b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java
@@ -19,14 +19,20 @@
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.core.runtime.*;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.URIUtil;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
import org.eclipse.equinox.internal.p2.publisher.Activator;
import org.eclipse.equinox.internal.p2.publisher.Messages;
-import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.IProvisioningAgentProvider;
+import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.query.QueryUtil;
@@ -46,13 +52,10 @@ public abstract class AbstractPublisherApplication implements IApplication {
// instead of a 'plugins' directory, so a separate constant is defined and used
// here.
protected static final String[][] INPLACE_MAPPING_RULES = {
- { "(& (classifier=osgi.bundle) (format=packed)", "${repoUrl}/features/${id}_${version}.jar.pack.gz" }, //$NON-NLS-1$//$NON-NLS-2$
{ "(& (classifier=osgi.bundle))", "${repoUrl}/plugins/${id}_${version}.jar" }, //$NON-NLS-1$//$NON-NLS-2$
{ "(& (classifier=binary))", "${repoUrl}/binary/${id}_${version}" }, //$NON-NLS-1$//$NON-NLS-2$
{ "(& (classifier=org.eclipse.update.feature))", "${repoUrl}/features/${id}_${version}.jar" } }; //$NON-NLS-1$//$NON-NLS-2$
- public static final String PUBLISH_PACK_FILES_AS_SIBLINGS = "publishPackFilesAsSiblings"; //$NON-NLS-1$
-
protected PublisherInfo info;
protected String source;
protected URI metadataLocation;
@@ -65,7 +68,6 @@ public abstract class AbstractPublisherApplication implements IApplication {
protected boolean compress = false;
protected boolean inplace = false;
protected boolean append = false;
- protected boolean reusePackedFiles = false;
protected String[] configurations;
private IStatus status;
@@ -107,7 +109,7 @@ protected void initializeRepositories(PublisherInfo publisherInfo) throws Provis
if (artifactLocation != null) {
@SuppressWarnings("removal")
IArtifactRepository repo = Publisher.createArtifactRepository(agent, artifactLocation, artifactRepoName,
- compress, reusePackedFiles);
+ compress);
if (!append && !isEmpty(repo)) {
File repoLocation = URIUtil.toFile(artifactLocation);
if (repoLocation != null && source != null) {
@@ -246,9 +248,6 @@ protected void processFlag(String arg, PublisherInfo publisherInfo) {
if (arg.equalsIgnoreCase("-compress")) //$NON-NLS-1$
compress = true;
- if (arg.equalsIgnoreCase("-reusePack200Files")) //$NON-NLS-1$
- reusePackedFiles = true;
-
if (arg.equalsIgnoreCase("-inplace")) //$NON-NLS-1$
inplace = true;
}
@@ -362,21 +361,6 @@ public void setMetadataLocation(URI location) {
this.metadataLocation = location;
}
- /**
- * @noreference This method is not intended to be referenced by clients.
- * @deprecated See bug
- * for details.
- */
- @Deprecated(forRemoval = true, since = "1.6.0")
- public boolean reuseExistingPack200Files() {
- return reusePackedFiles;
- }
-
- public void setReuseExistingPackedFiles(boolean value) {
- reusePackedFiles = value;
- }
-
public void setCompress(boolean value) {
compress = value;
}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/Publisher.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/Publisher.java
index ebbdde5ead..8f79df8bb9 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/Publisher.java
+++ b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/Publisher.java
@@ -17,13 +17,21 @@
import java.net.URI;
import java.util.Collection;
-import org.eclipse.core.runtime.*;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
import org.eclipse.equinox.internal.p2.publisher.Activator;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.repository.*;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
@@ -105,60 +113,6 @@ public static IMetadataRepository loadMetadataRepository(IProvisioningAgent agen
return result;
}
- /**
- * Returns an artifact repository that corresponds to the given settings. If a
- * repository at the given location already exists, it is updated with the
- * settings and returned. If no repository is found then a new Simple repository
- * is created, configured and returned
- *
- * @param agent the provisioning agent to use when creating the
- * repository
- * @param location the URL location of the repository
- * @param name the name of the repository
- * @param compress whether or not to compress the repository index
- * @param reusePackedFiles whether or not to include discovered Pack200 files in
- * the repository
- * @return the discovered or created repository
- * @throws ProvisionException
- *
- * @deprecated See bug
- * for details. Use
- * {@link #createArtifactRepository(IprovisioningAgent, URI, String, boolean)}
- * instead.
- */
- @Deprecated(forRemoval = true, since = "2.3.0")
- public static IArtifactRepository createArtifactRepository(IProvisioningAgent agent, URI location, String name,
- boolean compress, boolean reusePackedFiles) throws ProvisionException {
- try {
- IArtifactRepository result = loadArtifactRepository(agent, location, true, true);
- if (result != null && result.isModifiable()) {
- result.setProperty(IRepository.PROP_COMPRESSED, compress ? "true" : "false"); //$NON-NLS-1$//$NON-NLS-2$
- if (reusePackedFiles)
- result.setProperty(PUBLISH_PACK_FILES_AS_SIBLINGS, "true"); //$NON-NLS-1$
- return result;
- }
- } catch (ProvisionException e) {
- // fall through and create a new repository
- }
-
- IArtifactRepositoryManager manager = getService(agent, IArtifactRepositoryManager.SERVICE_NAME);
- String repositoryName = name != null ? name : location + " - artifacts"; //$NON-NLS-1$
- IArtifactRepository result = manager.createRepository(location, repositoryName,
- IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
- if (result != null) {
- manager.removeRepository(result.getLocation());
- if (reusePackedFiles)
- result.setProperty(PUBLISH_PACK_FILES_AS_SIBLINGS, "true"); //$NON-NLS-1$
- result.setProperty(IRepository.PROP_COMPRESSED, compress ? "true" : "false"); //$NON-NLS-1$//$NON-NLS-2$
- return result;
- }
- // I don't think we can really get here, but just in case, we better throw a
- // provisioning exception
- String msg = org.eclipse.equinox.internal.p2.artifact.repository.Messages.repoMan_internalError;
- throw new ProvisionException(
- new Status(IStatus.ERROR, Activator.ID, ProvisionException.INTERNAL_ERROR, msg, null));
- }
/**
* Returns an artifact repository that corresponds to the given settings. If a
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/Mirroring.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/Mirroring.java
index 2a830635e4..3a4801fac4 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/Mirroring.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/Mirroring.java
@@ -15,8 +15,18 @@
*******************************************************************************/
package org.eclipse.equinox.p2.internal.repository.mirroring;
-import java.util.*;
-import org.eclipse.core.runtime.*;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
import org.eclipse.equinox.internal.p2.artifact.repository.RawMirrorRequest;
import org.eclipse.equinox.internal.p2.repository.Transport;
@@ -26,7 +36,9 @@
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.query.IQuery;
import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.repository.artifact.*;
+import org.eclipse.equinox.p2.repository.artifact.ArtifactKeyQuery;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
import org.eclipse.equinox.p2.repository.tools.comparator.ArtifactComparatorFactory;
import org.eclipse.equinox.p2.repository.tools.comparator.IArtifactComparator;
@@ -49,7 +61,6 @@ public class Mirroring {
private List keysToMirror;
private IArtifactMirrorLog comparatorLog;
private Transport transport;
- private boolean includePacked = true;
private boolean mirrorProperties = false;
private IArtifactComparator getComparator() {
@@ -149,12 +160,7 @@ public MultiStatus run(boolean failOnError, boolean verbose) {
return multiStatus;
}
- @SuppressWarnings("removal")
private IStatus mirror(IArtifactDescriptor sourceDescriptor, boolean verbose) {
- if (!includePacked
- && IArtifactDescriptor.FORMAT_PACKED.equals(sourceDescriptor.getProperty(IArtifactDescriptor.FORMAT)))
- return Status.OK_STATUS;
-
IArtifactDescriptor targetDescriptor = raw ? sourceDescriptor : new ArtifactDescriptor(sourceDescriptor);
IArtifactDescriptor baselineDescriptor = getBaselineDescriptor(sourceDescriptor);
@@ -367,7 +373,4 @@ public void setTransport(Transport transport) {
this.transport = transport;
}
- public void setIncludePacked(boolean includePacked) {
- this.includePacked = includePacked;
- }
}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java
index 72a4ab54ac..738ebe1a9c 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java
@@ -16,8 +16,19 @@
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.core.runtime.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExecutableExtension;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.URIUtil;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
@@ -27,13 +38,24 @@
import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
import org.eclipse.equinox.p2.internal.repository.comparator.ArtifactChecksumComparator;
-import org.eclipse.equinox.p2.internal.repository.mirroring.*;
-import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.internal.repository.mirroring.FileMirrorLog;
+import org.eclipse.equinox.p2.internal.repository.mirroring.IArtifactMirrorLog;
+import org.eclipse.equinox.p2.internal.repository.mirroring.Mirroring;
+import org.eclipse.equinox.p2.internal.repository.mirroring.XMLMirrorLog;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.VersionRange;
import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
-import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.query.CompoundQueryable;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.IQueryable;
+import org.eclipse.equinox.p2.query.QueryUtil;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
@@ -57,7 +79,6 @@ public class MirrorApplication extends AbstractApplication implements IApplicati
private boolean mirrorReferences = true;
private String metadataOrArtifacts = null;
private String[] rootIUs = null;
- private boolean includePacked = true;
private boolean mirrorProperties = false;
private File mirrorLogFile; // file to log mirror output to (optional)
@@ -255,7 +276,6 @@ protected Mirroring getMirroring(IQueryable slice, IProgressMo
mirror.setValidate(validate);
mirror.setCompareExclusions(compareExclusions);
mirror.setTransport((Transport) agent.getService(Transport.SERVICE_NAME));
- mirror.setIncludePacked(includePacked);
mirror.setMirrorProperties(mirrorProperties);
// If IUs have been specified then only they should be mirrored, otherwise
@@ -497,10 +517,6 @@ public void setComparatorExclusions(IQuery exclusions) {
compareExclusions = exclusions;
}
- public void setIncludePacked(boolean includePacked) {
- this.includePacked = includePacked;
- }
-
public void setMirrorProperties(boolean mirrorProperties) {
this.mirrorProperties = mirrorProperties;
}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java
index dc7183b0ef..994a7eb9fc 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java
@@ -18,8 +18,17 @@
import java.io.File;
import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.URIUtil;
import org.eclipse.equinox.internal.p2.artifact.processors.checksum.ChecksumUtilities;
import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository;
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
@@ -29,12 +38,15 @@
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.repository.IRepository;
import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.artifact.*;
+import org.eclipse.equinox.p2.repository.artifact.ArtifactKeyQuery;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository;
import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
import org.eclipse.osgi.util.NLS;
public class RecreateRepositoryApplication extends AbstractApplication {
- static final private String PUBLISH_PACK_FILES_AS_SIBLINGS = "publishPackFilesAsSiblings"; //$NON-NLS-1$
private URI repoLocation;
private String repoName = null;
boolean removeArtifactRepo = true;
@@ -109,11 +121,8 @@ private void removeRepository(IArtifactRepository repository, IProgressMonitor m
private void recreateRepository(IProgressMonitor monitor) throws ProvisionException {
IArtifactRepositoryManager manager = getArtifactRepositoryManager();
- // add pack200 mappings, the existing repoProperties is not modifiable
- Map newProperties = new HashMap<>(repoProperties);
- newProperties.put(PUBLISH_PACK_FILES_AS_SIBLINGS, "true"); //$NON-NLS-1$
IArtifactRepository repository = manager.createRepository(repoLocation, repoName,
- IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, newProperties);
+ IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, repoProperties);
if (!(repository instanceof IFileArtifactRepository))
throw new ProvisionException(NLS.bind(Messages.exception_notLocalFileRepo, repository.getLocation()));
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
index 397cb4b05f..0fd0ce5bcb 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
@@ -1,13 +1,13 @@
/*******************************************************************************
* Copyright (c) 2009, 2018 IBM Corporation and others.
*
- * This program and the accompanying materials
+ * This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Sonatype, Inc. - ongoing development
@@ -15,34 +15,64 @@
*******************************************************************************/
package org.eclipse.equinox.p2.internal.repository.tools;
-import java.io.*;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.OutputStream;
import java.net.URI;
import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.core.runtime.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.core.runtime.URIUtil;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
import org.eclipse.equinox.frameworkadmin.BundleInfo;
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.engine.*;
+import org.eclipse.equinox.internal.p2.engine.DownloadManager;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitPhase;
+import org.eclipse.equinox.internal.p2.engine.Phase;
+import org.eclipse.equinox.internal.p2.engine.PhaseSet;
+import org.eclipse.equinox.internal.p2.engine.ProfileWriter;
+import org.eclipse.equinox.internal.p2.engine.ProfileXMLConstants;
import org.eclipse.equinox.internal.p2.engine.phases.Collect;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.engine.IEngine;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IProvidedCapability;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.equinox.p2.repository.artifact.*;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRequest;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
/**
- * The transformer takes an existing p2 repository (local or remote), iterates over
- * its list of IUs, and fetches all of the corresponding artifacts to a user-specified location.
- * Once fetched, the artifacts will be in "runnable" form... that is directory-based bundles will be
- * extracted into folders and packed JAR files will be un-packed.
- *
+ * The transformer takes an existing p2 repository (local or remote), iterates
+ * over its list of IUs, and fetches all of the corresponding artifacts to a
+ * user-specified location. Once fetched, the artifacts will be in "runnable"
+ * form... that is directory-based bundles will be extracted into folders.
+ *
* @since 1.0
*/
public class Repo2Runnable extends AbstractApplication implements IApplication {
@@ -121,7 +151,7 @@ protected IStatus completePhase(IProgressMonitor monitor, IProfile profile, Map<
}
}
- // the list of IUs that we actually transformed... could have come from the repo
+ // the list of IUs that we actually transformed... could have come from the repo
// or have been user-specified.
private Collection processedIUs = new ArrayList<>();
@@ -260,7 +290,7 @@ private void collectIUs(IProgressMonitor monitor) throws ProvisionException {
/*
* If there is a destination metadata repository set, then add all our transformed
- * IUs to it.
+ * IUs to it.
*/
private void publishMetadata(IProgressMonitor monitor) {
// publishing the metadata is optional
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 1169e61e44..b0396d66ab 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
@@ -16,6 +16,7 @@
import java.io.File;
import java.util.ArrayList;
import java.util.List;
+
import org.apache.tools.ant.BuildException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.p2.core.ProvisionException;
@@ -138,10 +139,6 @@ public void setValidate(boolean value) {
((MirrorApplication) application).setValidate(value);
}
- public void setIncludePacked(boolean value) {
- ((MirrorApplication) application).setIncludePacked(value);
- }
-
public void setReferences(boolean value) {
((MirrorApplication) application).setReferences(value);
}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ProcessRepoTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ProcessRepoTask.java
index 6a41e1dcc6..686f95a9ea 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ProcessRepoTask.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ProcessRepoTask.java
@@ -17,7 +17,9 @@
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
-import org.apache.tools.ant.*;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.URIUtil;
import org.eclipse.equinox.internal.p2.jarprocessor.ant.JarProcessorTask;
@@ -58,33 +60,28 @@ public void setUnsign(String unsign) {
private URI repository = null;
- private boolean pack = false;
- private boolean repack = false;
private SigningOptions signing = null;
private JarProcessorTask jarProcessor = null;
- @SuppressWarnings("removal")
@Override
public void execute() throws BuildException {
File file = URIUtil.toFile(repository);
if (file == null || !file.exists()) {
throw new BuildException(NLS.bind(Messages.ProcessRepo_must_be_local, repository.toString()));
}
- if (pack | repack | signing != null) {
- if (jarProcessor == null)
+ if (signing != null) {
+ if (jarProcessor == null) {
jarProcessor = new JarProcessorTask();
- if (signing != null) {
- jarProcessor.setAlias(signing.alias);
- jarProcessor.setKeypass(signing.keypass);
- jarProcessor.setKeystore(signing.keystore);
- jarProcessor.setStorepass(signing.storepass);
- jarProcessor.setUnsign(signing.unsign);
-
- if (signing.alias != null && signing.alias.length() > 0 && !signing.alias.startsWith("${")) //$NON-NLS-1$
- jarProcessor.setSign(true);
}
- jarProcessor.setPack(pack);
- jarProcessor.setNormalize(repack);
+
+ jarProcessor.setAlias(signing.alias);
+ jarProcessor.setKeypass(signing.keypass);
+ jarProcessor.setKeystore(signing.keystore);
+ jarProcessor.setStorepass(signing.storepass);
+ jarProcessor.setUnsign(signing.unsign);
+
+ if (signing.alias != null && signing.alias.length() > 0 && !signing.alias.startsWith("${")) //$NON-NLS-1$
+ jarProcessor.setSign(true);
jarProcessor.setInputFolder(new File(repository));
jarProcessor.setProject(getProject());
jarProcessor.execute();
@@ -112,18 +109,6 @@ public void setRepositoryPath(String repository) {
}
}
- @Deprecated(forRemoval = true, since = "2.3.0")
- public void setPack(boolean pack) {
- log("Support for pack200 is scheduled for removal after June 2023.", Project.MSG_WARN); //$NON-NLS-1$
- this.pack = pack;
- }
-
- @Deprecated(forRemoval = true, since = "2.3.0")
- public void setNormalize(boolean normalize) {
- log("Support for pack200 is scheduled for removal after June 2023.", Project.MSG_WARN); //$NON-NLS-1$
- this.repack = normalize;
- }
-
public void addConfiguredSign(SigningOptions options) {
this.signing = options;
}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/Repo2RunnableTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/Repo2RunnableTask.java
index a448a5ff4e..c6b41e1ebf 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/Repo2RunnableTask.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/Repo2RunnableTask.java
@@ -1,13 +1,13 @@
/*******************************************************************************
* Copyright (c) 2009, 2017 IBM Corporation and others.
*
- * This program and the accompanying materials
+ * This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Red Hat, Inc. - fragment creation
@@ -15,6 +15,7 @@
package org.eclipse.equinox.p2.internal.repository.tools.tasks;
import java.util.List;
+
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.eclipse.core.runtime.IStatus;
@@ -25,12 +26,12 @@
import org.eclipse.osgi.util.NLS;
/**
- * Ant task which calls the "repo to runnable" application. This application takes an
- * existing p2 repository (local or remote), iterates over its list of IUs, and fetches
- * all of the corresponding artifacts to a user-specified location. Once fetched, the
- * artifacts will be in "runnable" form... that is directory-based bundles will be
- * extracted into folders and packed JAR files will be un-packed.
- *
+ * Ant task which calls the "repo to runnable" application. This application
+ * takes an existing p2 repository (local or remote), iterates over its list of
+ * IUs, and fetches all of the corresponding artifacts to a user-specified
+ * location. Once fetched, the artifacts will be in "runnable" form... that is
+ * directory-based bundles will be extracted into folders.
+ *
* @since 1.0
*/
public class Repo2RunnableTask extends AbstractRepositoryTask {
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactDescriptor.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactDescriptor.java
index 2403402ac9..89c4ea7842 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactDescriptor.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactDescriptor.java
@@ -15,6 +15,7 @@
package org.eclipse.equinox.p2.repository.artifact;
import java.util.Map;
+
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
@@ -89,17 +90,22 @@ public interface IArtifactDescriptor {
String FORMAT = "format"; //$NON-NLS-1$
/**
- * A property value for the {@link #FORMAT} artifact descriptor property (value "packed")
- * indicating the storage format is using pack200 compression.
+ * A property value for the {@link #FORMAT} artifact descriptor property (value
+ * "packed") indicating the storage format is using pack200 compression.
+ *
* @see #FORMAT
* @noreference This field is not intended to be referenced by clients.
- *
- * @deprecated See bug for details.
+ *
+ * @deprecated See bug
+ * for details.
*/
- @Deprecated(forRemoval = true, since = "2.5.0") String FORMAT_PACKED = "packed"; //$NON-NLS-1$
+ @Deprecated(forRemoval = true, since = "2.5.0")
+ String FORMAT_PACKED = "packed"; //$NON-NLS-1$
/**
* Return the key for the artifact described by this descriptor.
+ *
* @return the key associated with this descriptor
*/
IArtifactKey getArtifactKey();
diff --git a/bundles/org.eclipse.equinox.p2.tests/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests/META-INF/MANIFEST.MF
index af5b04a9a9..81acd4c83d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.tests/META-INF/MANIFEST.MF
@@ -65,7 +65,6 @@ Import-Package: org.eclipse.ant.core,
org.eclipse.ecf.filetransfer,
org.eclipse.equinox.internal.p2.artifact.processors.checksum,
org.eclipse.equinox.internal.p2.artifact.processors.md5,
- org.eclipse.equinox.internal.p2.artifact.processors.pack200,
org.eclipse.equinox.internal.p2.artifact.repository,
org.eclipse.equinox.internal.p2.artifact.repository.simple,
org.eclipse.equinox.internal.p2.core,
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 6f6b4b43ab..5db1f5cbaa 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
@@ -28,6 +28,7 @@
import java.util.Properties;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
+
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.URIUtil;
@@ -57,7 +58,6 @@
public class MirrorTaskTest extends AbstractAntProvisioningTest {
private static final String DOWNLOAD_CHECKSUM = IArtifactDescriptor.DOWNLOAD_CHECKSUM + ".sha-256";
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;
@@ -66,7 +66,7 @@ public void setUp() throws Exception {
super.setUp();
// Get a random location to create a repository
destinationRepo = (new File(getTestFolder(getName()), "destinationRepo")).toURI();
- artifactRepo = getTestData("error loading data", "testData/mirror/mirrorPackedRepo").toURI();
+ artifactRepo = getTestData("error loading data", "testData/mirror/mirrorRepo").toURI();
sourceRepo2 = getTestData("error loading data", "testData/mirror/mirrorSourceRepo2").toURI();
sliceRepo = getTestData("error loading data", "testData/permissiveSlicer").toURI();
sliceArtifactRepo = getTestData("error loading data", "testData/testRepos/updateSite").toURI();
@@ -709,19 +709,6 @@ public void testSlicingInvalid() {
}
}
- 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
*/
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/gc/GCCleanTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/gc/GCCleanTest.java
index e77597a59a..b89a38ed73 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/gc/GCCleanTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/gc/GCCleanTest.java
@@ -16,6 +16,7 @@
import java.io.File;
import java.net.URI;
import java.util.HashMap;
+
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.garbagecollector.CoreGarbageCollector;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/generator/GeneratorTests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/generator/GeneratorTests.java
index e09e8bc4dd..09d64caed9 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/generator/GeneratorTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/generator/GeneratorTests.java
@@ -16,6 +16,7 @@
import java.io.File;
import java.io.PrintStream;
import java.util.Map;
+
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.equinox.app.IApplicationContext;
import org.eclipse.equinox.internal.p2.publisher.Messages;
@@ -143,7 +144,11 @@ public void testBasicUpdateSite() throws Exception {
new File(rootFolder, "content.xml").delete();
new File(rootFolder, "artifacts.xml").delete();
- String[] arguments = {"-updateSite", rootFolder.getAbsolutePath(), "-site", new File(rootFolder, "site.xml").getAbsolutePath(), "-metadataRepository", URIUtil.toUnencodedString(rootFolder.toURI()), "-artifactRepository", URIUtil.toUnencodedString(rootFolder.toURI()), "-metadataRepositoryName", "Basic Metadata Test Site", "-artifactRepositoryName", "Basic Artifact Test Site", "-compress", "-reusePack200Files", "-noDefaultIUs"};
+ String[] arguments = { "-updateSite", rootFolder.getAbsolutePath(), "-site",
+ new File(rootFolder, "site.xml").getAbsolutePath(), "-metadataRepository",
+ URIUtil.toUnencodedString(rootFolder.toURI()), "-artifactRepository",
+ URIUtil.toUnencodedString(rootFolder.toURI()), "-metadataRepositoryName", "Basic Metadata Test Site",
+ "-artifactRepositoryName", "Basic Artifact Test Site", "-compress", "-noDefaultIUs" };
TestGeneratorApplication app = new TestGeneratorApplication();
app.go(arguments);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/ArtifactMirrorApplicationTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/ArtifactMirrorApplicationTest.java
index 25d76981f9..0529e84087 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/ArtifactMirrorApplicationTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/ArtifactMirrorApplicationTest.java
@@ -25,6 +25,7 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
+
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
@@ -826,7 +827,7 @@ public void testExistingArtifactRepoWithNewName() {
*/
public void testArtifactFileCopying() throws MalformedURLException, Exception {
//Setup: load the repository containing packed data
- File packedRepoLocation = getTestData("26.0", "/testData/mirror/mirrorPackedRepo");
+ File packedRepoLocation = getTestData("26.0", "/testData/mirror/mirrorRepo");
basicRunMirrorApplication("26.1", packedRepoLocation.toURL(), destRepoLocation.toURL(), false);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationArtifactTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationArtifactTest.java
index 16ebb46e24..aa1ccf1bd8 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationArtifactTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationArtifactTest.java
@@ -26,6 +26,7 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
+
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
@@ -854,7 +855,7 @@ public void testExistingArtifactRepoWithNewName() {
@Test
public void testArtifactFileCopying() throws Exception {
//Setup: load the repository containing packed data
- File packedRepoLocation = getTestData("26.0", "/testData/mirror/mirrorPackedRepo");
+ File packedRepoLocation = getTestData("26.0", "/testData/mirror/mirrorSourceRepo2");
basicRunMirrorApplication("26.1", packedRepoLocation.toURI(), destRepoLocation.toURI(), false, false);
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/mirror/mirrorRepo/artifacts.xml b/bundles/org.eclipse.equinox.p2.tests/testData/mirror/mirrorRepo/artifacts.xml
new file mode 100644
index 0000000000..0e9f2e522b
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/mirror/mirrorRepo/artifacts.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/mirror/mirrorRepo/plugins/org.eclipse.core.filebuffers_3.4.0.v20080603-2000.jar b/bundles/org.eclipse.equinox.p2.tests/testData/mirror/mirrorRepo/plugins/org.eclipse.core.filebuffers_3.4.0.v20080603-2000.jar
new file mode 100644
index 0000000000..93b7ff3843
Binary files /dev/null and b/bundles/org.eclipse.equinox.p2.tests/testData/mirror/mirrorRepo/plugins/org.eclipse.core.filebuffers_3.4.0.v20080603-2000.jar differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/mirror/mirrorRepo/plugins/org.eclipse.osgi.services.source_3.1.200.v20071203.jar b/bundles/org.eclipse.equinox.p2.tests/testData/mirror/mirrorRepo/plugins/org.eclipse.osgi.services.source_3.1.200.v20071203.jar
new file mode 100644
index 0000000000..c738820577
Binary files /dev/null and b/bundles/org.eclipse.equinox.p2.tests/testData/mirror/mirrorRepo/plugins/org.eclipse.osgi.services.source_3.1.200.v20071203.jar differ
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java
index f533dd7c59..065e1a835e 100644
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java
+++ b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java
@@ -14,16 +14,36 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.updatesite;
-import java.io.*;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
import java.net.URI;
-import java.util.*;
-import javax.xml.parsers.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Stack;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.core.helpers.SecureXMLUtil;
+import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
import org.eclipse.equinox.p2.publisher.eclipse.URLEntry;
import org.eclipse.osgi.util.NLS;
-import org.w3c.dom.*;
-import org.xml.sax.*;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
import org.xml.sax.helpers.DefaultHandler;
/**
@@ -854,7 +874,6 @@ private void processInfo(Attributes attributes) {
/*
* process site info
*/
- @SuppressWarnings("removal")
private void processSite(Attributes attributes) {
// create site map
SiteModel site = new SiteModel();
@@ -894,11 +913,6 @@ private void processSite(Attributes attributes) {
site.setMirrorsURIString(mirrorsURL);
}
- String pack200 = attributes.getValue("pack200"); //$NON-NLS-1$
- if (pack200 != null && Boolean.parseBoolean(pack200)) {
- site.setSupportsPack200(true);
- }
-
String digestURL = attributes.getValue("digestURL"); //$NON-NLS-1$
if (digestURL != null)
site.setDigestURIString(digestURL);
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteModel.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteModel.java
index 09a12f147c..dc027ee050 100644
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteModel.java
+++ b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteModel.java
@@ -15,7 +15,12 @@
import java.net.URI;
import java.net.URISyntaxException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
import org.eclipse.equinox.p2.publisher.eclipse.URLEntry;
import org.eclipse.equinox.p2.repository.spi.RepositoryReference;
@@ -343,17 +348,6 @@ public String getType() {
return type;
}
- /**
- * @noreference This method is not intended to be referenced by clients.
- * @deprecated See bug
- * for details.
- */
- @Deprecated(forRemoval = true, since = "1.2.0")
- public boolean isPack200Supported() {
- return false;
- }
-
/**
* Sets the site description.
*
@@ -413,18 +407,6 @@ public void setMirrorsURIString(String mirrorsURI) {
this.mirrorsURIString = mirrorsURI;
}
- /**
- * NO-OP as pack200 is not supported in Java 14+.
- *
- * @see https://github.com/eclipse-equinox/p2/issues/40
- * @param value
- */
- @Deprecated(forRemoval = true, since = "1.2.0")
- public void setSupportsPack200(boolean value) {
- // NO-OP
- }
-
/**
* Sets the site type. Throws a runtime exception if this object is marked
* read-only.