From ae5780c5abaf704cbc5be5a585b19250c3b350c0 Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Jul 25 2014 20:48:00 +0000 Subject: Update to 0.21.0 Release. --- diff --git a/sources b/sources index fe82e25..b15e3c6 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -cdbd828c774f7508e65dcef3324b9d2d tycho-0.20.0.tar.bz2 -75bfc0d7279ee874dcde1e93d075cbf9 eclipse-bootstrap.tar.xz +127267aa75abd86df6815bcbd7f2492d tycho-0.21.0.tar.bz2 +8303bf4c107a219ce0c916bb692046f6 eclipse-bootstrap.tar.xz diff --git a/tycho-bootstrap.sh b/tycho-bootstrap.sh index 423e235..ec740b1 100755 --- a/tycho-bootstrap.sh +++ b/tycho-bootstrap.sh @@ -144,8 +144,8 @@ echo ${bsn} eclipse_bootstrap=$1 -preV='0.20.0' -v='0.20.0-SNAPSHOT' +preV='0.21.0' +v='0.21.0-SNAPSHOT' osgiV='3.10.0.v20140328-1811' bundles=() bundles[0]='tycho-bundles/org.eclipse.tycho.embedder.shared' @@ -248,4 +248,4 @@ mkdir -p ${loc} cp "${tbeTargetDir}/tycho-bundles-external-${v}.zip" ${loc} cp 'tycho-bundles/tycho-bundles-external/pom.xml' "${loc}/tycho-bundles-external-${v}.pom" -sed -i "s/.*<\/equinoxVersion>/${osgiV}<\/equinoxVersion>/" pom.xml +sed -i "s/.*<\/equinox\(.*\)VersionMaven>/${osgiV}<\/equinox\1VersionMaven>/" pom.xml diff --git a/tycho-eclipse-luna.patch b/tycho-eclipse-luna.patch deleted file mode 100644 index 0957ad7..0000000 --- a/tycho-eclipse-luna.patch +++ /dev/null @@ -1,502 +0,0 @@ -From 920242e853449e5f8c75d522155f006d15d1fa4a Mon Sep 17 00:00:00 2001 -From: Roland Grunberg -Date: Fri, 28 Mar 2014 16:33:16 -0400 -Subject: [PATCH] Update to Eclipse Luna (4.4) dependencies. - -Change-Id: Iacad3ab85e0f2fc03c18e1a204f3cb6dba6b1af1 ---- - pom.xml | 5 ++ - .../DefaultEquinoxInstallationDescription.java | 4 +- - .../tycho-bundles-external.product | 1 + - tycho-core/pom.xml | 5 ++ - .../tycho/core/ee/CustomExecutionEnvironment.java | 3 +- - .../tycho/core/ee/ExecutionEnvironmentUtils.java | 11 ++-- - .../tycho/core/locking/FileLockServiceImpl.java | 5 +- - .../tycho/core/osgitools/DefaultBundleReader.java | 27 +--------- - .../tycho/core/osgitools/EquinoxResolver.java | 15 +++--- - .../tycho/core/osgitools/OsgiBundleProject.java | 6 +-- - .../core/osgitools/StandalonePluginConverter.java | 32 ----------- - .../targetplatform/EclipseInstallationLayout.java | 5 +- - .../osgitools/StandalonePluginConverterTest.java | 62 ---------------------- - .../tycho/pomgenerator/GeneratePomsMojo.java | 2 +- - .../java/org/eclipse/tycho/surefire/TestMojo.java | 4 +- - .../ProvisionedInstallationDescription.java | 12 ++--- - 16 files changed, 48 insertions(+), 151 deletions(-) - delete mode 100644 tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/StandalonePluginConverter.java - delete mode 100644 tycho-core/src/test/java/org/eclipse/tycho/core/osgitools/StandalonePluginConverterTest.java - -diff --git a/pom.xml b/pom.xml -index 685cce7..2e4d738 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -238,6 +238,11 @@ $CMD -DpomFile=org.eclipse.jdt.compiler.apt.pom \ - ${equinoxVersion} - - -+ org.eclipse.osgi -+ org.eclipse.osgi.compatibility.state -+ ${equinoxVersion} -+ -+ - org.eclipse.tycho - org.eclipse.jdt.core - ${jdtVersion} -diff --git a/sisu-equinox/sisu-equinox-launching/src/main/java/org/eclipse/sisu/equinox/launching/DefaultEquinoxInstallationDescription.java b/sisu-equinox/sisu-equinox-launching/src/main/java/org/eclipse/sisu/equinox/launching/DefaultEquinoxInstallationDescription.java -index 6eff61f..c4f39cc 100644 ---- a/sisu-equinox/sisu-equinox-launching/src/main/java/org/eclipse/sisu/equinox/launching/DefaultEquinoxInstallationDescription.java -+++ b/sisu-equinox/sisu-equinox-launching/src/main/java/org/eclipse/sisu/equinox/launching/DefaultEquinoxInstallationDescription.java -@@ -18,7 +18,7 @@ import java.util.List; - import java.util.Map; - import java.util.Set; - --import org.eclipse.osgi.framework.adaptor.FrameworkAdaptor; -+import org.eclipse.osgi.internal.framework.EquinoxContainer; - import org.eclipse.tycho.ArtifactDescriptor; - import org.eclipse.tycho.ArtifactKey; - import org.eclipse.tycho.core.osgitools.targetplatform.DefaultTargetPlatform; -@@ -69,7 +69,7 @@ public class DefaultEquinoxInstallationDescription implements EquinoxInstallatio - - public ArtifactDescriptor getSystemBundle() { - return bundles.getArtifact(org.eclipse.tycho.ArtifactKey.TYPE_ECLIPSE_PLUGIN, -- FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, null); -+ EquinoxContainer.NAME, null); - } - - public void addBundle(ArtifactDescriptor artifact) { -diff --git a/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product b/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product -index aaba0d3..c0ce143 100644 ---- a/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product -+++ b/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product -@@ -70,6 +70,7 @@ - - - -+ - - - -diff --git a/tycho-core/pom.xml b/tycho-core/pom.xml -index c811801..4513056 100644 ---- a/tycho-core/pom.xml -+++ b/tycho-core/pom.xml -@@ -127,6 +127,11 @@ - org.eclipse.osgi - - -+ org.eclipse.osgi -+ org.eclipse.osgi.compatibility.state -+ -+ -+ - org.eclipse.tycho - sisu-equinox-embedder - ${project.version} -diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/ee/CustomExecutionEnvironment.java b/tycho-core/src/main/java/org/eclipse/tycho/core/ee/CustomExecutionEnvironment.java -index df17e87..8c16e38 100644 ---- a/tycho-core/src/main/java/org/eclipse/tycho/core/ee/CustomExecutionEnvironment.java -+++ b/tycho-core/src/main/java/org/eclipse/tycho/core/ee/CustomExecutionEnvironment.java -@@ -19,6 +19,7 @@ import java.util.Set; - import java.util.regex.Matcher; - import java.util.regex.Pattern; - -+import org.eclipse.osgi.internal.framework.EquinoxConfiguration; - import org.eclipse.tycho.core.ee.shared.ExecutionEnvironment; - import org.eclipse.tycho.core.ee.shared.SystemCapability; - import org.eclipse.tycho.core.ee.shared.SystemCapability.Type; -@@ -41,7 +42,7 @@ public class CustomExecutionEnvironment implements ExecutionEnvironment { - setOsgiSystemCapabilities(systemCapabilities); - - // osgi.java.profile.name is not needed at runtime AFAIK but let's make it explicit that this is a custom profile -- properties.setProperty(org.eclipse.osgi.framework.internal.core.Constants.OSGI_JAVA_PROFILE_NAME, profileName); -+ properties.setProperty(EquinoxConfiguration.PROP_OSGI_JAVA_PROFILE_NAME, profileName); - } - - private void setSystemPackages(List systemCapabilities) { -diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentUtils.java b/tycho-core/src/main/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentUtils.java -index 49797f6..18b2ebe 100644 ---- a/tycho-core/src/main/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentUtils.java -+++ b/tycho-core/src/main/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentUtils.java -@@ -17,7 +17,8 @@ import java.util.HashMap; - import java.util.Map; - import java.util.Properties; - --import org.eclipse.osgi.framework.internal.core.Constants; -+import org.osgi.framework.Constants; -+import org.eclipse.osgi.internal.framework.EquinoxConfiguration; - import org.eclipse.tycho.core.ee.shared.ExecutionEnvironment; - import org.osgi.framework.BundleActivator; - -@@ -90,20 +91,20 @@ public class ExecutionEnvironmentUtils { - properties.put(Constants.FRAMEWORK_SYSTEMPACKAGES, systemExports); - } - // set the org.osgi.framework.bootdelegation property according to the java profile -- String type = properties.getProperty(Constants.OSGI_JAVA_PROFILE_BOOTDELEGATION); // a null value means ignore -+ String type = properties.getProperty(EquinoxConfiguration.PROP_OSGI_JAVA_PROFILE_BOOTDELEGATION); // a null value means ignore - String profileBootDelegation = profileProps.getProperty(Constants.FRAMEWORK_BOOTDELEGATION); -- if (Constants.OSGI_BOOTDELEGATION_OVERRIDE.equals(type)) { -+ if (EquinoxConfiguration.PROP_OSGI_BOOTDELEGATION_OVERRIDE.equals(type)) { - if (profileBootDelegation == null) - properties.remove(Constants.FRAMEWORK_BOOTDELEGATION); // override with a null value - else - properties.put(Constants.FRAMEWORK_BOOTDELEGATION, profileBootDelegation); // override with the profile value -- } else if (Constants.OSGI_BOOTDELEGATION_NONE.equals(type)) -+ } else if (EquinoxConfiguration.PROP_OSGI_BOOTDELEGATION_NONE.equals(type)) - properties.remove(Constants.FRAMEWORK_BOOTDELEGATION); // remove the bootdelegation property in case it was set - // set the org.osgi.framework.executionenvironment property according to the java profile - if (properties.getProperty(Constants.FRAMEWORK_EXECUTIONENVIRONMENT) == null) { - // get the ee from the java profile; if no ee is defined then try the java profile name - String ee = profileProps.getProperty(Constants.FRAMEWORK_EXECUTIONENVIRONMENT, -- profileProps.getProperty(Constants.OSGI_JAVA_PROFILE_NAME)); -+ profileProps.getProperty(EquinoxConfiguration.PROP_OSGI_JAVA_PROFILE_NAME)); - if (ee != null) - properties.put(Constants.FRAMEWORK_EXECUTIONENVIRONMENT, ee); - } -diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/locking/FileLockServiceImpl.java b/tycho-core/src/main/java/org/eclipse/tycho/core/locking/FileLockServiceImpl.java -index e83660e..a939a4c 100644 ---- a/tycho-core/src/main/java/org/eclipse/tycho/core/locking/FileLockServiceImpl.java -+++ b/tycho-core/src/main/java/org/eclipse/tycho/core/locking/FileLockServiceImpl.java -@@ -14,7 +14,8 @@ package org.eclipse.tycho.core.locking; - import java.io.File; - - import org.codehaus.plexus.component.annotations.Component; --import org.eclipse.core.runtime.internal.adaptor.BasicLocation; -+import org.eclipse.osgi.internal.framework.EquinoxContainer; -+import org.eclipse.osgi.internal.location.BasicLocation; - import org.eclipse.osgi.service.datalocation.Location; - import org.eclipse.tycho.locking.facade.FileLockService; - import org.eclipse.tycho.locking.facade.FileLocker; -@@ -25,7 +26,7 @@ public class FileLockServiceImpl implements FileLockService { - private Location anyLocation; - - public FileLockServiceImpl() { -- anyLocation = new BasicLocation(null, null, false, null); -+ anyLocation = new BasicLocation(null, null, false, null, new EquinoxContainer(null).getConfiguration()); - } - - /* -diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/DefaultBundleReader.java b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/DefaultBundleReader.java -index 0f3eac8..c7875e0 100644 ---- a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/DefaultBundleReader.java -+++ b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/DefaultBundleReader.java -@@ -108,31 +108,8 @@ public class DefaultBundleReader extends AbstractLogEnabled implements BundleRea - } - - private File convertPluginManifest(File bundleLocation) throws OsgiManifestParserException { -- PluginConverter converter = new StandalonePluginConverter(); -- String name = bundleLocation.getName(); -- if (name.endsWith(".jar")) { -- name = name.substring(0, name.length() - 4); -- } -- File manifestFile = new File(cacheDir, name + "/META-INF/MANIFEST.MF"); -- manifestFile.getParentFile().mkdirs(); -- try { -- converter.convertManifest(bundleLocation, manifestFile, false /* compatibility */, "3.2" /* -- * target -- * version -- */, true /* -- * analyse -- * jars -- * to -- * set -- * export -- * - -- * package -- */, -- null /* devProperties */); -- } catch (PluginConversionException e) { -- throw new OsgiManifestParserException(bundleLocation.getAbsolutePath(), e); -- } -- return manifestFile; -+ throw new OsgiManifestParserException(bundleLocation.getAbsolutePath(), -+ "The bundle does not provide a Manifest, and support for plugin conversion is disabled."); - } - - public void setLocationRepository(File basedir) { -diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/EquinoxResolver.java b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/EquinoxResolver.java -index 49caccf..a3dd643 100644 ---- a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/EquinoxResolver.java -+++ b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/EquinoxResolver.java -@@ -24,6 +24,7 @@ import org.apache.maven.project.MavenProject; - import org.codehaus.plexus.component.annotations.Component; - import org.codehaus.plexus.component.annotations.Requirement; - import org.codehaus.plexus.logging.Logger; -+import org.eclipse.osgi.internal.resolver.StateImpl; - import org.eclipse.osgi.service.resolver.BundleDescription; - import org.eclipse.osgi.service.resolver.BundleSpecification; - import org.eclipse.osgi.service.resolver.HostSpecification; -@@ -141,8 +142,8 @@ public class EquinoxResolver { - - // Put Equinox OSGi resolver into development mode. - // See http://www.nabble.com/Re:-resolving-partially-p18449054.html -- properties.put(org.eclipse.osgi.framework.internal.core.Constants.OSGI_RESOLVER_MODE, -- org.eclipse.osgi.framework.internal.core.Constants.DEVELOPMENT_MODE); -+ properties.put(StateImpl.OSGI_RESOLVER_MODE, -+ StateImpl.DEVELOPMENT_MODE); - return properties; - } - -@@ -188,7 +189,7 @@ public class EquinoxResolver { - - // force our system.bundle - Hashtable platformProperties = new Hashtable(properties); -- platformProperties.put(org.eclipse.osgi.framework.internal.core.Constants.STATE_SYSTEM_BUNDLE, -+ platformProperties.put(StateImpl.STATE_SYSTEM_BUNDLE, - state.getBundle(SYSTEM_BUNDLE_ID).getSymbolicName()); - state.setPlatformProperties(platformProperties); - -@@ -253,12 +254,12 @@ public class EquinoxResolver { - String systemPackages = properties.getProperty(org.osgi.framework.Constants.FRAMEWORK_SYSTEMPACKAGES); - - Dictionary systemBundleManifest = new Hashtable(); -- systemBundleManifest.put(org.eclipse.osgi.framework.internal.core.Constants.BUNDLE_SYMBOLICNAME, -+ systemBundleManifest.put(Constants.BUNDLE_SYMBOLICNAME, - SYSTEM_BUNDLE_SYMBOLIC_NAME); -- systemBundleManifest.put(org.eclipse.osgi.framework.internal.core.Constants.BUNDLE_VERSION, "0.0.0"); -- systemBundleManifest.put(org.eclipse.osgi.framework.internal.core.Constants.BUNDLE_MANIFESTVERSION, "2"); -+ systemBundleManifest.put(Constants.BUNDLE_VERSION, "0.0.0"); -+ systemBundleManifest.put(Constants.BUNDLE_MANIFESTVERSION, "2"); - if (systemPackages != null && systemPackages.trim().length() > 0) { -- systemBundleManifest.put(org.eclipse.osgi.framework.internal.core.Constants.EXPORT_PACKAGE, systemPackages); -+ systemBundleManifest.put(Constants.EXPORT_PACKAGE, systemPackages); - } else { - logger.warn("Undefined or empty org.osgi.framework.system.packages system property, system.bundle does not export any packages."); - } -diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiBundleProject.java b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiBundleProject.java -index 62518f6..9d64ebf 100644 ---- a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiBundleProject.java -+++ b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiBundleProject.java -@@ -29,8 +29,8 @@ import org.apache.maven.execution.MavenSession; - import org.apache.maven.project.MavenProject; - import org.codehaus.plexus.component.annotations.Component; - import org.codehaus.plexus.component.annotations.Requirement; --import org.eclipse.osgi.framework.internal.core.Constants; --import org.eclipse.osgi.framework.internal.core.FilterImpl; -+import org.eclipse.osgi.internal.framework.FilterImpl; -+import org.eclipse.osgi.internal.resolver.StateImpl; - import org.eclipse.osgi.service.resolver.BundleDescription; - import org.eclipse.osgi.service.resolver.State; - import org.eclipse.tycho.ArtifactDescriptor; -@@ -441,7 +441,7 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro - - @Override - public TargetEnvironment getImplicitTargetEnvironment(MavenProject project) { -- String filterStr = getManifestValue(Constants.ECLIPSE_PLATFORMFILTER, project); -+ String filterStr = getManifestValue(StateImpl.ECLIPSE_PLATFORMFILTER, project); - - if (filterStr != null) { - try { -diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/StandalonePluginConverter.java b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/StandalonePluginConverter.java -deleted file mode 100644 -index ecfafcf..0000000 ---- a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/StandalonePluginConverter.java -+++ /dev/null -@@ -1,32 +0,0 @@ --package org.eclipse.tycho.core.osgitools; -- --import java.lang.reflect.InvocationHandler; --import java.lang.reflect.Method; --import java.lang.reflect.Proxy; -- --import org.eclipse.core.runtime.internal.adaptor.PluginConverterImpl; --import org.osgi.framework.BundleContext; -- --/** -- * {@link PluginConverterImpl} which can be used without a running OSGi framework. -- */ --public class StandalonePluginConverter extends PluginConverterImpl { -- -- public StandalonePluginConverter() { -- super(null, createDummyContext()); -- } -- -- /** -- * create a dummy BundleContext. This workaround allows us to reuse {@link PluginConverterImpl} -- * outside a running OSGi framework -- */ -- private static BundleContext createDummyContext() { -- return (BundleContext) Proxy.newProxyInstance(BundleContext.class.getClassLoader(), -- new Class[] { BundleContext.class }, new InvocationHandler() { -- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { -- return null; -- } -- }); -- } -- --} -diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/targetplatform/EclipseInstallationLayout.java b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/targetplatform/EclipseInstallationLayout.java -index b067a84..9e4c816 100644 ---- a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/targetplatform/EclipseInstallationLayout.java -+++ b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/targetplatform/EclipseInstallationLayout.java -@@ -31,7 +31,6 @@ import org.codehaus.plexus.logging.AbstractLogEnabled; - import org.codehaus.plexus.util.xml.XmlStreamReader; - import org.codehaus.plexus.util.xml.Xpp3Dom; - import org.codehaus.plexus.util.xml.Xpp3DomBuilder; --import org.eclipse.core.runtime.internal.adaptor.PluginConverterImpl; - - /** - * Finds bundles in Eclipse installation. -@@ -118,8 +117,8 @@ public class EclipseInstallationLayout extends AbstractLogEnabled { - - private boolean isDirectoryPlugin(File plugin) { - return new File(plugin, "META-INF/MANIFEST.MF").canRead() -- || new File(plugin, PluginConverterImpl.PLUGIN_MANIFEST).canRead() -- || new File(plugin, PluginConverterImpl.FRAGMENT_MANIFEST).canRead(); -+ || new File(plugin, "plugin.xml").canRead() -+ || new File(plugin, "fragment.xml").canRead(); - } - - public Set getSites() { -diff --git a/tycho-core/src/test/java/org/eclipse/tycho/core/osgitools/StandalonePluginConverterTest.java b/tycho-core/src/test/java/org/eclipse/tycho/core/osgitools/StandalonePluginConverterTest.java -deleted file mode 100644 -index 42db7f6..0000000 ---- a/tycho-core/src/test/java/org/eclipse/tycho/core/osgitools/StandalonePluginConverterTest.java -+++ /dev/null -@@ -1,62 +0,0 @@ --package org.eclipse.tycho.core.osgitools; -- --import static org.junit.Assert.assertEquals; -- --import java.io.File; --import java.io.FileInputStream; --import java.io.FileNotFoundException; --import java.io.IOException; --import java.util.Enumeration; --import java.util.Hashtable; -- --import org.eclipse.osgi.framework.util.Headers; --import org.eclipse.osgi.service.pluginconversion.PluginConversionException; --import org.eclipse.osgi.service.pluginconversion.PluginConverter; --import org.junit.Assert; --import org.junit.Before; --import org.junit.Rule; --import org.junit.Test; --import org.junit.rules.TemporaryFolder; --import org.osgi.framework.BundleException; -- --public class StandalonePluginConverterTest { -- -- @Rule -- public TemporaryFolder folder = new TemporaryFolder(); -- private PluginConverter converter; -- -- @Before -- public void setup() { -- converter = new StandalonePluginConverter(); -- } -- -- @Test -- public void testConvertPre30Manifest() throws PluginConversionException, FileNotFoundException, BundleException { -- File mf = new File(folder.getRoot(), "MANIFEST"); -- converter.convertManifest(new File("src/test/resources/targetplatforms/pre-3.0/plugins/testjar_1.0.0.jar"), mf, -- false, "3.2", true, null); -- Assert.assertTrue(mf.isFile()); -- Headers headers = Headers.parseManifest(new FileInputStream(mf)); -- Assert.assertEquals("testjar", headers.get("Bundle-SymbolicName")); -- } -- -- @Test -- public void testWriteManifest() throws PluginConversionException, BundleException, IOException { -- File tmpManifestFile = folder.newFile("testManifest"); -- Hashtable manifestToWrite = new Hashtable(); -- Headers originalManifest = Headers.parseManifest(getClass().getResourceAsStream( -- "/manifests/valid.mf")); -- for (Enumeration keys = originalManifest.keys(); keys.hasMoreElements();) { -- String key = keys.nextElement(); -- manifestToWrite.put(key, originalManifest.get(key)); -- } -- converter.writeManifest(tmpManifestFile, manifestToWrite, false); -- Headers writtenManifest = Headers.parseManifest(new FileInputStream(tmpManifestFile)); -- assertEquals(originalManifest.size(), writtenManifest.size()); -- for (Enumeration keys = writtenManifest.keys(); keys.hasMoreElements();) { -- String key = keys.nextElement(); -- assertEquals(originalManifest.get(key), writtenManifest.get(key)); -- } -- } -- --} -diff --git a/tycho-pomgenerator-plugin/src/main/java/org/eclipse/tycho/pomgenerator/GeneratePomsMojo.java b/tycho-pomgenerator-plugin/src/main/java/org/eclipse/tycho/pomgenerator/GeneratePomsMojo.java -index 66fa357..f277c0b 100644 ---- a/tycho-pomgenerator-plugin/src/main/java/org/eclipse/tycho/pomgenerator/GeneratePomsMojo.java -+++ b/tycho-pomgenerator-plugin/src/main/java/org/eclipse/tycho/pomgenerator/GeneratePomsMojo.java -@@ -43,7 +43,7 @@ import org.codehaus.plexus.util.xml.XmlStreamReader; - import org.codehaus.plexus.util.xml.Xpp3Dom; - import org.codehaus.plexus.util.xml.Xpp3DomBuilder; - import org.codehaus.plexus.util.xml.pull.XmlPullParserException; --import org.eclipse.osgi.framework.adaptor.FilePath; -+import org.eclipse.osgi.framework.util.FilePath; - import org.eclipse.osgi.service.resolver.BundleDescription; - import org.eclipse.osgi.service.resolver.State; - import org.eclipse.tycho.ArtifactDescriptor; -diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/TestMojo.java b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/TestMojo.java -index 4554384..b2af8be 100644 ---- a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/TestMojo.java -+++ b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/TestMojo.java -@@ -42,7 +42,7 @@ import org.apache.maven.toolchain.Toolchain; - import org.apache.maven.toolchain.ToolchainManager; - import org.codehaus.plexus.util.FileUtils; - import org.codehaus.plexus.util.cli.CommandLineUtils; --import org.eclipse.osgi.framework.internal.core.Constants; -+import org.eclipse.osgi.internal.framework.EquinoxConfiguration; - import org.eclipse.sisu.equinox.launching.BundleStartLevel; - import org.eclipse.sisu.equinox.launching.DefaultEquinoxInstallationDescription; - import org.eclipse.sisu.equinox.launching.EquinoxInstallation; -@@ -1052,7 +1052,7 @@ public class TestMojo extends AbstractMojo { - File profileFile = new File(new File(project.getBuild().getDirectory()), "custom.profile"); - storeProperties(customProfileProps, profileFile); - try { -- cli.addVMArguments("-D" + Constants.OSGI_JAVA_PROFILE + "=" + profileFile.toURL()); -+ cli.addVMArguments("-D" + EquinoxConfiguration.PROP_OSGI_JAVA_PROFILE + "=" + profileFile.toURL()); - } catch (MalformedURLException e) { - // should not happen - throw new RuntimeException(e); -diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedInstallationDescription.java b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedInstallationDescription.java -index 2cd05ed..52cc879 100644 ---- a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedInstallationDescription.java -+++ b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedInstallationDescription.java -@@ -10,7 +10,7 @@ - ******************************************************************************/ - package org.eclipse.tycho.surefire.provisioning; - --import static org.eclipse.osgi.framework.adaptor.FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME; -+import static org.eclipse.osgi.internal.framework.EquinoxContainer.NAME; - import static org.eclipse.tycho.ArtifactKey.TYPE_ECLIPSE_PLUGIN; - - import java.io.File; -@@ -20,7 +20,7 @@ import java.util.List; - import java.util.Map; - import java.util.Set; - --import org.eclipse.osgi.framework.adaptor.FrameworkAdaptor; -+import org.eclipse.osgi.internal.framework.EquinoxContainer; - import org.eclipse.sisu.equinox.launching.BundleStartLevel; - import org.eclipse.sisu.equinox.launching.EquinoxInstallationDescription; - import org.eclipse.tycho.ArtifactDescriptor; -@@ -51,21 +51,21 @@ public class ProvisionedInstallationDescription implements EquinoxInstallationDe - File pluginsDir = new File(location, "plugins"); - File[] systemBundles = pluginsDir.listFiles(new FileFilter() { - public boolean accept(File file) { -- return file.isFile() && file.getName().startsWith(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME + "_"); -+ return file.isFile() && file.getName().startsWith(EquinoxContainer.NAME + "_"); - } - }); - File systemBundle; - if (systemBundles.length == 0) { -- throw new IllegalArgumentException("No framework bundle " + FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME -+ throw new IllegalArgumentException("No framework bundle " + EquinoxContainer.NAME - + " found in " + pluginsDir); - } else if (systemBundles.length > 1) { - throw new IllegalArgumentException("Multiple versions of the framework bundle " -- + FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME + " found in " + pluginsDir); -+ + EquinoxContainer.NAME + " found in " + pluginsDir); - } else { - systemBundle = systemBundles[0]; - } - String version = bundleReader.loadManifest(systemBundle).getBundleVersion(); -- ArtifactKey systemBundleKey = new DefaultArtifactKey(TYPE_ECLIPSE_PLUGIN, FRAMEWORK_SYMBOLICNAME, version); -+ ArtifactKey systemBundleKey = new DefaultArtifactKey(TYPE_ECLIPSE_PLUGIN, NAME, version); - systemBundleDescriptor = new DefaultArtifactDescriptor(systemBundleKey, systemBundle, null, null, null); - return systemBundleDescriptor; - } --- -1.9.0 - diff --git a/tycho-fix-bootstrap-build.patch b/tycho-fix-bootstrap-build.patch index 4dc2c57..80b7907 100644 --- a/tycho-fix-bootstrap-build.patch +++ b/tycho-fix-bootstrap-build.patch @@ -1,5 +1,5 @@ diff --git a/tycho-artifactcomparator/pom.xml b/tycho-artifactcomparator/pom.xml -index ef8182a..52d98fc 100644 +index adfdd95..81ad821 100644 --- a/tycho-artifactcomparator/pom.xml +++ b/tycho-artifactcomparator/pom.xml @@ -51,6 +51,15 @@ @@ -19,7 +19,7 @@ index ef8182a..52d98fc 100644 diff --git a/tycho-compiler-jdt/pom.xml b/tycho-compiler-jdt/pom.xml -index 790e756..8e4f294 100644 +index 4c0c304..bfa9030 100644 --- a/tycho-compiler-jdt/pom.xml +++ b/tycho-compiler-jdt/pom.xml @@ -25,10 +25,19 @@ @@ -47,7 +47,7 @@ index 790e756..8e4f294 100644 diff --git a/tycho-compiler-plugin/pom.xml b/tycho-compiler-plugin/pom.xml -index 3d00c67..67d5ed2 100644 +index 923405d..33ce36d 100644 --- a/tycho-compiler-plugin/pom.xml +++ b/tycho-compiler-plugin/pom.xml @@ -63,19 +63,6 @@ @@ -71,7 +71,7 @@ index 3d00c67..67d5ed2 100644 bcel test diff --git a/tycho-core/pom.xml b/tycho-core/pom.xml -index 853bcf4..9cde68b 100644 +index 9f79a46..10628cf 100644 --- a/tycho-core/pom.xml +++ b/tycho-core/pom.xml @@ -59,11 +59,19 @@ @@ -99,24 +99,24 @@ index 853bcf4..9cde68b 100644 org.apache.felix maven-bundle-plugin -@@ -152,12 +157,6 @@ - ${project.version} +@@ -148,12 +156,6 @@ -- + - org.eclipse.tycho - tycho-testing-harness - ${project.version} - test - - - org.apache.maven - maven-compat +- + org.apache.maven + maven-compat + test diff --git a/tycho-maven-plugin/src/main/resources/META-INF/plexus/components.xml b/tycho-maven-plugin/src/main/resources/META-INF/plexus/components.xml -index 4ace7ab..edaf13f 100644 +index 040a199..8fb2005 100644 --- a/tycho-maven-plugin/src/main/resources/META-INF/plexus/components.xml +++ b/tycho-maven-plugin/src/main/resources/META-INF/plexus/components.xml -@@ -92,9 +92,6 @@ +@@ -94,9 +94,6 @@ org.eclipse.tycho:tycho-packaging-plugin:${project.version}:package-plugin, org.eclipse.tycho:tycho-p2-plugin:${project.version}:p2-metadata-default @@ -127,10 +127,10 @@ index 4ace7ab..edaf13f 100644 org.apache.maven.plugins:maven-install-plugin:${install-plugin.version}:install, org.eclipse.tycho:tycho-p2-plugin:${project.version}:update-local-index diff --git a/tycho-p2/tycho-p2-plugin/pom.xml b/tycho-p2/tycho-p2-plugin/pom.xml -index 02a37e1..b078fc9 100644 +index e25b6d9..7e8a7f2 100644 --- a/tycho-p2/tycho-p2-plugin/pom.xml +++ b/tycho-p2/tycho-p2-plugin/pom.xml -@@ -50,21 +50,23 @@ +@@ -53,21 +53,23 @@ tycho-artifactcomparator ${project.version} @@ -166,10 +166,10 @@ index 02a37e1..b078fc9 100644 diff --git a/tycho-p2/tycho-p2-publisher-plugin/pom.xml b/tycho-p2/tycho-p2-publisher-plugin/pom.xml -index 4a75ef1..4dd136a 100644 +index e52cf18..bcd8c91 100644 --- a/tycho-p2/tycho-p2-publisher-plugin/pom.xml +++ b/tycho-p2/tycho-p2-publisher-plugin/pom.xml -@@ -45,12 +45,6 @@ +@@ -48,12 +48,6 @@ tycho-packaging-plugin ${project.version} @@ -183,14 +183,13 @@ index 4a75ef1..4dd136a 100644 diff --git a/tycho-packaging-plugin/pom.xml b/tycho-packaging-plugin/pom.xml -index 908fbf9..25cbd22 100644 +index 0990b2d..7dd1d68 100644 --- a/tycho-packaging-plugin/pom.xml +++ b/tycho-packaging-plugin/pom.xml -@@ -32,19 +32,6 @@ - tycho-core +@@ -33,19 +33,6 @@ ${project.version} -- + - org.eclipse.tycho - tycho-testing-harness - ${project.version} @@ -203,30 +202,31 @@ index 908fbf9..25cbd22 100644 - test - tests - - - org.apache.maven - maven-compat +- + org.apache.maven + maven-compat + test @@ -78,10 +65,19 @@ - - -- -- org.codehaus.plexus -- plexus-component-metadata -- -+ -+ org.codehaus.plexus -+ plexus-component-metadata -+ 1.5.5 -+ -+ -+ -+ generate-metadata -+ generate-test-metadata -+ -+ -+ -+ - - + + +- +- org.codehaus.plexus +- plexus-component-metadata +- ++ ++ org.codehaus.plexus ++ plexus-component-metadata ++ 1.5.5 ++ ++ ++ ++ generate-metadata ++ generate-test-metadata ++ ++ ++ ++ + + diff --git a/tycho-fix-build.patch b/tycho-fix-build.patch index ef3e4b7..36a5fa1 100644 --- a/tycho-fix-build.patch +++ b/tycho-fix-build.patch @@ -1,4 +1,4 @@ -From 9306067c39af629e88a4f0c04523f21b96890c2c Mon Sep 17 00:00:00 2001 +From f515e677ed605c6fe02842334de19304b8497144 Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Tue, 12 Jun 2012 09:56:38 -0400 Subject: [PATCH] Fix the Tycho build to work on Fedora. @@ -20,58 +20,18 @@ Add support for compact profiles (http://openjdk.java.net/jeps/161). Change-Id: Ic8c0514c1fa10ee53580d2654ac6a363ccd66814 --- - pom.xml | 5 ----- - tycho-artifactcomparator/pom.xml | 4 ++-- .../META-INF/MANIFEST.MF | 2 +- - .../org.eclipse.tycho.p2.maven.repository.tests/pom.xml | 2 +- .../tycho/p2/target/ee/CustomEEResolutionHandler.java | 2 +- .../main/java/org/eclipse/tycho/test/util/HttpServer.java | 8 ++++++-- .../tycho-bundles-external/tycho-bundles-external.product | 1 - .../tycho-standalone-p2-director/p2 Director.product | 1 - - tycho-compiler-jdt/pom.xml | 4 ---- .../src/main/java/org/eclipse/tycho/core/ee/EEVersion.java | 13 ++++++++++++- .../tycho/core/maven/TychoMavenLifecycleParticipant.java | 4 +++- .../eclipse/tycho/test/AbstractTychoIntegrationTest.java | 11 +++++------ - 12 files changed, 31 insertions(+), 26 deletions(-) + 8 files changed, 28 insertions(+), 14 deletions(-) -diff --git a/pom.xml b/pom.xml -index ef34822..685cce7 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -243,11 +243,6 @@ $CMD -DpomFile=org.eclipse.jdt.compiler.apt.pom \ - ${jdtVersion} - - -- org.eclipse.tycho -- org.eclipse.jdt.compiler.apt -- ${jdtAptVersion} -- -- - org.apache.maven.surefire - surefire-booter - 2.10 -diff --git a/tycho-artifactcomparator/pom.xml b/tycho-artifactcomparator/pom.xml -index a7836dc..50d90d9 100644 ---- a/tycho-artifactcomparator/pom.xml -+++ b/tycho-artifactcomparator/pom.xml -@@ -24,7 +24,7 @@ - - - org.ow2.asm -- asm-debug-all -+ asm-all - 4.0 - - -@@ -54,4 +54,4 @@ - - - -- -\ No newline at end of file -+ diff --git a/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/META-INF/MANIFEST.MF b/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/META-INF/MANIFEST.MF -index f934b66..5145072 100644 +index f59f155..6d3813b 100644 --- a/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/META-INF/MANIFEST.MF +++ b/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/META-INF/MANIFEST.MF @@ -9,7 +9,7 @@ Fragment-Host: org.eclipse.tycho.p2.maven.repository @@ -83,21 +43,8 @@ index f934b66..5145072 100644 Import-Package: org.eclipse.tycho.locking.facade, org.eclipse.tycho.repository.local.testutil, org.eclipse.tycho.repository.streaming.testutil, -diff --git a/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/pom.xml b/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/pom.xml -index fefde17..73c00f2 100644 ---- a/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/pom.xml -+++ b/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/pom.xml -@@ -37,7 +37,7 @@ - - - eclipse-plugin -- org.hamcrest -+ org.hamcrest.core - 0.0.0 - - diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/ee/CustomEEResolutionHandler.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/ee/CustomEEResolutionHandler.java -index 87c9e11..927cea5 100644 +index 6773a40..c66c991 100644 --- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/ee/CustomEEResolutionHandler.java +++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/ee/CustomEEResolutionHandler.java @@ -59,7 +59,7 @@ class CustomEEResolutionHandler extends ExecutionEnvironmentResolutionHandler { @@ -138,10 +85,10 @@ index 57b4e10..47423e5 100644 jetty.addConnector(connector); diff --git a/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product b/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product -index c10de9e..aaba0d3 100644 +index 9f6cb78..41705c5 100644 --- a/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product +++ b/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product -@@ -42,7 +42,6 @@ +@@ -43,7 +43,6 @@ @@ -150,7 +97,7 @@ index c10de9e..aaba0d3 100644 diff --git a/tycho-bundles/tycho-standalone-p2-director/p2 Director.product b/tycho-bundles/tycho-standalone-p2-director/p2 Director.product -index 62b354d..11f65fb 100644 +index 6739b3a..af9237b 100644 --- a/tycho-bundles/tycho-standalone-p2-director/p2 Director.product +++ b/tycho-bundles/tycho-standalone-p2-director/p2 Director.product @@ -42,7 +42,6 @@ @@ -161,23 +108,8 @@ index 62b354d..11f65fb 100644 -diff --git a/tycho-compiler-jdt/pom.xml b/tycho-compiler-jdt/pom.xml -index dca4f8f..815ca50 100644 ---- a/tycho-compiler-jdt/pom.xml -+++ b/tycho-compiler-jdt/pom.xml -@@ -38,10 +38,6 @@ - org.eclipse.jdt.core - - -- org.eclipse.tycho -- org.eclipse.jdt.compiler.apt -- -- - org.codehaus.plexus - plexus-compiler-api - diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/ee/EEVersion.java b/tycho-core/src/main/java/org/eclipse/tycho/core/ee/EEVersion.java -index ceecc82..0d61e51 100644 +index 6455a7c..4d09e34 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/core/ee/EEVersion.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/core/ee/EEVersion.java @@ -18,7 +18,8 @@ public class EEVersion implements Comparable { @@ -190,7 +122,7 @@ index ceecc82..0d61e51 100644 private final String profileName; -@@ -50,6 +51,16 @@ public class EEVersion implements Comparable { +@@ -51,6 +52,16 @@ public class EEVersion implements Comparable { * @see java.lang.Comparable#compareTo(java.lang.Object) */ public int compareTo(EEVersion other) { @@ -208,7 +140,7 @@ index ceecc82..0d61e51 100644 if (result != 0) { return result; diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/maven/TychoMavenLifecycleParticipant.java b/tycho-core/src/main/java/org/eclipse/tycho/core/maven/TychoMavenLifecycleParticipant.java -index 08daf3c..d003619 100644 +index 4cc937c..59335b9 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/core/maven/TychoMavenLifecycleParticipant.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/core/maven/TychoMavenLifecycleParticipant.java @@ -77,7 +77,9 @@ public class TychoMavenLifecycleParticipant extends AbstractMavenLifecyclePartic @@ -245,5 +177,5 @@ index a8173df..cf2cf57 100644 return verifier; -- -1.9.0 +1.9.3 diff --git a/tycho-fix-surefire.patch b/tycho-fix-surefire.patch index 7257643..78352f6 100644 --- a/tycho-fix-surefire.patch +++ b/tycho-fix-surefire.patch @@ -1,4 +1,4 @@ -From bb8f9d90bbb4e086e8f1617bebc4e1d0a9585597 Mon Sep 17 00:00:00 2001 +From 30e2826ca933fd28d1f769f43fd818ce536b5363 Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Fri, 21 Sep 2012 10:58:09 -0400 Subject: [PATCH] Resolve all necessary dependencies for Tycho Surefire. @@ -24,10 +24,10 @@ Change-Id: I9ef0239eed887fa47c380efcdce968934c788c9f 6 files changed, 34 insertions(+), 4 deletions(-) diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit/META-INF/MANIFEST.MF b/tycho-surefire/org.eclipse.tycho.surefire.junit/META-INF/MANIFEST.MF -index 6c0f0d4..e732b3f 100644 +index 0063b71..9087302 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit/META-INF/MANIFEST.MF +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit/META-INF/MANIFEST.MF -@@ -6,6 +6,7 @@ Bundle-Version: 0.20.0 +@@ -6,6 +6,7 @@ Bundle-Version: 0.21.0 Fragment-Host: org.eclipse.tycho.surefire.osgibooter;bundle-version="0.14.0" Bundle-RequiredExecutionEnvironment: J2SE-1.5, JavaSE-1.6 @@ -38,7 +38,7 @@ index 6c0f0d4..e732b3f 100644 + jars/common-junit3-2.15.jar Bundle-Vendor: %providerName diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml -index 9ae03b5..fefdda7 100644 +index 341e317..5cd46d6 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml @@ -44,6 +44,11 @@ @@ -54,10 +54,10 @@ index 9ae03b5..fefdda7 100644 diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit4/META-INF/MANIFEST.MF b/tycho-surefire/org.eclipse.tycho.surefire.junit4/META-INF/MANIFEST.MF -index 7361cae..d868a8f 100644 +index 861e0d7..a37db5f 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit4/META-INF/MANIFEST.MF +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit4/META-INF/MANIFEST.MF -@@ -6,7 +6,9 @@ Bundle-Version: 0.20.0 +@@ -6,7 +6,9 @@ Bundle-Version: 0.21.0 Fragment-Host: org.eclipse.tycho.surefire.osgibooter;bundle-version="0.14.0" Bundle-RequiredExecutionEnvironment: J2SE-1.5, JavaSE-1.6 @@ -69,7 +69,7 @@ index 7361cae..d868a8f 100644 org.junit;version="4.0.0", org.junit.runner;version="4.0.0", diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml -index 822f8e3..c6bc5fc 100644 +index 0cdea03..8156c49 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml @@ -44,6 +44,16 @@ @@ -90,7 +90,7 @@ index 822f8e3..c6bc5fc 100644 diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit47/META-INF/MANIFEST.MF b/tycho-surefire/org.eclipse.tycho.surefire.junit47/META-INF/MANIFEST.MF -index 2d3c2f6..79fa5e6 100644 +index 6e0cebb..69aecdd 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit47/META-INF/MANIFEST.MF +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit47/META-INF/MANIFEST.MF @@ -8,7 +8,9 @@ Bundle-RequiredExecutionEnvironment: J2SE-1.5 @@ -105,7 +105,7 @@ index 2d3c2f6..79fa5e6 100644 org.junit;version="[4.7,5)", org.junit.runner;version="[4.7,5)", diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml -index 0147a32..9286d4e 100644 +index e217cdf..3e45493 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml @@ -54,6 +54,16 @@ @@ -126,5 +126,5 @@ index 0147a32..9286d4e 100644 -- -1.8.5.3 +1.9.3 diff --git a/tycho-maven-delegation.patch b/tycho-maven-delegation.patch index c337db9..e3cf19b 100644 --- a/tycho-maven-delegation.patch +++ b/tycho-maven-delegation.patch @@ -1,4 +1,4 @@ -From 3fac4c5513d3bf5c1ba1d625f3d0cba9d63feff2 Mon Sep 17 00:00:00 2001 +From 7e3beef99cd00d3b5f0690ec2a3c19b16facb77a Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Wed, 18 Jun 2014 13:01:31 -0400 Subject: [PATCH] Tycho should always delegate artifact resolution to Maven. @@ -14,38 +14,37 @@ Tycho assumes that all resolved artifacts are present within the reactor cache but this is not true for artifacts resolved from workspace locations. -Change-Id: Ib6453720b46f64ae87dfabf829df8fad38d0cedc +Change-Id: Ia44969ed1064965a82c3507a63e54caeebb75b18 --- .../META-INF/MANIFEST.MF | 1 + .../eclipse/tycho/core/facade/MavenContext.java | 2 + .../tycho/core/facade/MavenContextImpl.java | 10 ++++- - .../tycho/core/facade/MavenRepositorySystem.java | 19 ++++++++ + .../tycho/core/facade/MavenRepositorySystem.java | 19 +++++++++ .../local/LocalArtifactRepositoryP2APITest.java | 4 +- .../local/LocalMetadataRepositoryTest.java | 3 +- .../repository/local/LocalArtifactRepository.java | 8 ++-- .../local/LocalArtifactRepositoryFactory.java | 3 +- - .../local/index/LocalRepositoryP2IndicesImpl.java | 7 +++ - .../META-INF/MANIFEST.MF | 1 + + .../local/index/LocalRepositoryP2IndicesImpl.java | 7 ++++ .../p2/remote/RemoteAgentMavenMirrorsTest.java | 3 +- .../RemoteAgentMetadataRepositoryCacheTest.java | 5 ++- .../target/TargetPlatformBundlePublisherTest.java | 3 +- .../tycho/p2/target/TestResolverFactory.java | 5 ++- - .../p2/impl/resolver/P2ResolverFactoryImpl.java | 8 ++-- + .../tycho/p2/resolver/P2ResolverFactoryImpl.java | 8 ++-- .../p2/target/PomDependencyCollectorImpl.java | 2 +- - .../p2/target/TargetPlatformBundlePublisher.java | 15 ++++--- + .../p2/target/TargetPlatformBundlePublisher.java | 13 ++++-- .../p2/repository/LocalRepositoryP2Indices.java | 4 ++ - .../tycho/p2/repository/LocalRepositoryReader.java | 52 +++++----------------- - .../local/testutil/MavenRepositorySystemStub.java | 30 +++++++++++++ - .../testutil/TemporaryLocalMavenRepository.java | 3 +- - .../adapters/MavenRepositorySystemAdapter.java | 37 +++++++++++++++ + .../tycho/p2/repository/LocalRepositoryReader.java | 49 +++++----------------- + .../testutil/TemporaryLocalMavenRepository.java | 4 +- + .../tycho/test/util/MavenRepositorySystemStub.java | 30 +++++++++++++ + .../adapters/MavenRepositorySystemAdapter.java | 37 ++++++++++++++++ .../configuration/MavenContextConfigurator.java | 8 +++- - 23 files changed, 167 insertions(+), 66 deletions(-) + 22 files changed, 166 insertions(+), 62 deletions(-) create mode 100644 tycho-bundles/org.eclipse.tycho.core.shared/src/main/java/org/eclipse/tycho/core/facade/MavenRepositorySystem.java - create mode 100644 tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/repository/local/testutil/MavenRepositorySystemStub.java + create mode 100644 tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/MavenRepositorySystemStub.java create mode 100644 tycho-core/src/main/java/org/eclipse/tycho/osgi/adapters/MavenRepositorySystemAdapter.java diff --git a/tycho-bundles/org.eclipse.tycho.core.shared.tests/META-INF/MANIFEST.MF b/tycho-bundles/org.eclipse.tycho.core.shared.tests/META-INF/MANIFEST.MF -index 20b5257..82ba810 100644 +index 453e864..09a83ad 100644 --- a/tycho-bundles/org.eclipse.tycho.core.shared.tests/META-INF/MANIFEST.MF +++ b/tycho-bundles/org.eclipse.tycho.core.shared.tests/META-INF/MANIFEST.MF @@ -7,3 +7,4 @@ Fragment-Host: org.eclipse.tycho.core.shared @@ -126,17 +125,17 @@ index 0000000..fd2f0a9 + +} diff --git a/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/src/test/java/org/eclipse/tycho/repository/local/LocalArtifactRepositoryP2APITest.java b/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/src/test/java/org/eclipse/tycho/repository/local/LocalArtifactRepositoryP2APITest.java -index bedc5cb..659a015 100644 +index bedc5cb..7df3d17 100644 --- a/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/src/test/java/org/eclipse/tycho/repository/local/LocalArtifactRepositoryP2APITest.java +++ b/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/src/test/java/org/eclipse/tycho/repository/local/LocalArtifactRepositoryP2APITest.java -@@ -44,6 +44,7 @@ import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor; - import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor; - import org.eclipse.tycho.p2.maven.repository.tests.ResourceUtil; - import org.eclipse.tycho.p2.maven.repository.tests.TestRepositoryContent; -+import org.eclipse.tycho.repository.local.testutil.MavenRepositorySystemStub; - import org.eclipse.tycho.repository.local.testutil.TemporaryLocalMavenRepository; - import org.eclipse.tycho.repository.p2base.artifact.provider.IRawArtifactFileProvider; - import org.eclipse.tycho.repository.p2base.artifact.provider.streaming.ArtifactSinkException; +@@ -53,6 +53,7 @@ import org.eclipse.tycho.repository.p2base.artifact.repository.ArtifactRepositor + import org.eclipse.tycho.repository.streaming.testutil.ProbeArtifactSink; + import org.eclipse.tycho.repository.streaming.testutil.ProbeOutputStream; + import org.eclipse.tycho.repository.streaming.testutil.ProbeRawArtifactSink; ++import org.eclipse.tycho.test.util.MavenRepositorySystemStub; + import org.junit.After; + import org.junit.Before; + import org.junit.Rule; @@ -114,7 +115,8 @@ public class LocalArtifactRepositoryP2APITest { @Before public void initSubject() throws Exception { @@ -148,14 +147,14 @@ index bedc5cb..659a015 100644 testOutputStream = new ProbeOutputStream(); } diff --git a/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/src/test/java/org/eclipse/tycho/repository/local/LocalMetadataRepositoryTest.java b/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/src/test/java/org/eclipse/tycho/repository/local/LocalMetadataRepositoryTest.java -index 9b6d270..39d6ffd 100644 +index 9b6d270..8779841 100644 --- a/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/src/test/java/org/eclipse/tycho/repository/local/LocalMetadataRepositoryTest.java +++ b/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/src/test/java/org/eclipse/tycho/repository/local/LocalMetadataRepositoryTest.java @@ -32,6 +32,7 @@ import org.eclipse.tycho.p2.repository.LocalRepositoryReader; import org.eclipse.tycho.p2.repository.RepositoryLayoutHelper; import org.eclipse.tycho.p2.repository.TychoRepositoryIndex; import org.eclipse.tycho.repository.local.index.FileBasedTychoRepositoryIndex; -+import org.eclipse.tycho.repository.local.testutil.MavenRepositorySystemStub; ++import org.eclipse.tycho.test.util.MavenRepositorySystemStub; import org.junit.Test; public class LocalMetadataRepositoryTest extends BaseMavenRepositoryTest { @@ -164,7 +163,7 @@ index 9b6d270..39d6ffd 100644 protected IMetadataRepository loadRepository(File location) throws ProvisionException { return new LocalMetadataRepository(location.toURI(), createMetadataIndex(location), new LocalRepositoryReader( - location)); -+ location, new MavenRepositorySystemStub(tempLocalMavenRepository.getLocalRepositoryRoot()))); ++ location, new MavenRepositorySystemStub(location))); } private LocalMetadataRepository createRepository(File location) throws ProvisionException { @@ -258,31 +257,19 @@ index e727bdb..6f4f860 100644 + } + } -diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/META-INF/MANIFEST.MF b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/META-INF/MANIFEST.MF -index 85de919..7d95087 100644 ---- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/META-INF/MANIFEST.MF -+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/META-INF/MANIFEST.MF -@@ -11,6 +11,7 @@ Require-Bundle: org.junit, - Bundle-ActivationPolicy: lazy - Bundle-Vendor: %providerName - Import-Package: org.eclipse.tycho.p2.testutil, -+ org.eclipse.tycho.repository.local.testutil, - org.eclipse.tycho.repository.streaming.testutil, - org.eclipse.tycho.repository.testutil, - org.eclipse.tycho.test.util diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/remote/RemoteAgentMavenMirrorsTest.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/remote/RemoteAgentMavenMirrorsTest.java -index fea1158..e131811 100644 +index 7fdec5e..b4a80cb 100644 --- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/remote/RemoteAgentMavenMirrorsTest.java +++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/remote/RemoteAgentMavenMirrorsTest.java -@@ -35,6 +35,7 @@ import org.eclipse.tycho.core.facade.MavenContextImpl; - import org.eclipse.tycho.core.resolver.shared.MavenRepositoryLocation; - import org.eclipse.tycho.core.resolver.shared.MavenRepositorySettings; - import org.eclipse.tycho.p2.impl.test.ResourceUtil; -+import org.eclipse.tycho.repository.local.testutil.MavenRepositorySystemStub; +@@ -29,6 +29,7 @@ import org.eclipse.tycho.p2.impl.test.ResourceUtil; + import org.eclipse.tycho.p2.remote.testutil.MavenRepositorySettingsStub; import org.eclipse.tycho.test.util.HttpServer; import org.eclipse.tycho.test.util.LogVerifier; - import org.junit.After; -@@ -61,7 +62,7 @@ public class RemoteAgentMavenMirrorsTest { ++import org.eclipse.tycho.test.util.MavenRepositorySystemStub; + import org.junit.Before; + import org.junit.Rule; + import org.junit.Test; +@@ -52,7 +53,7 @@ public class RemoteAgentMavenMirrorsTest { public void initSubject() throws Exception { File localRepository = tempManager.newFolder("localRepo"); MavenContext mavenContext = new MavenContextImpl(localRepository, OFFLINE, logVerifier.getLogger(), @@ -292,17 +279,17 @@ index fea1158..e131811 100644 mavenRepositorySettings = new MavenRepositorySettingsStub(); subject = new RemoteAgent(mavenContext, mavenRepositorySettings, OFFLINE); diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/remote/RemoteAgentMetadataRepositoryCacheTest.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/remote/RemoteAgentMetadataRepositoryCacheTest.java -index 9fbecb6..1c4f9b9 100644 +index 9fbecb6..0aa6d61 100644 --- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/remote/RemoteAgentMetadataRepositoryCacheTest.java +++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/remote/RemoteAgentMetadataRepositoryCacheTest.java -@@ -24,6 +24,7 @@ import org.eclipse.equinox.p2.core.ProvisionException; - import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository; - import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager; +@@ -26,6 +26,7 @@ import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager; import org.eclipse.tycho.core.facade.MavenContextImpl; -+import org.eclipse.tycho.repository.local.testutil.MavenRepositorySystemStub; import org.eclipse.tycho.test.util.HttpServer; import org.eclipse.tycho.test.util.LogVerifier; ++import org.eclipse.tycho.test.util.MavenRepositorySystemStub; import org.junit.Before; + import org.junit.Rule; + import org.junit.Test; @@ -126,12 +127,12 @@ public class RemoteAgentMetadataRepositoryCacheTest { private RemoteAgent newOnlineAgent() throws Exception { @@ -319,17 +306,17 @@ index 9fbecb6..1c4f9b9 100644 private IMetadataRepository loadHttpRepository(RemoteAgent agent) throws ProvisionException { diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/target/TargetPlatformBundlePublisherTest.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/target/TargetPlatformBundlePublisherTest.java -index 50fe92f..0747f07 100644 +index 50fe92f..3044e97 100644 --- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/target/TargetPlatformBundlePublisherTest.java +++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/target/TargetPlatformBundlePublisherTest.java -@@ -28,6 +28,7 @@ import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor; - import org.eclipse.tycho.p2.impl.test.ArtifactMock; - import org.eclipse.tycho.p2.metadata.IArtifactFacade; - import org.eclipse.tycho.p2.repository.RepositoryLayoutHelper; -+import org.eclipse.tycho.repository.local.testutil.MavenRepositorySystemStub; +@@ -31,6 +31,7 @@ import org.eclipse.tycho.p2.repository.RepositoryLayoutHelper; import org.eclipse.tycho.repository.p2base.artifact.provider.IRawArtifactProvider; import org.eclipse.tycho.repository.streaming.testutil.ProbeRawArtifactSink; import org.eclipse.tycho.test.util.LogVerifier; ++import org.eclipse.tycho.test.util.MavenRepositorySystemStub; + import org.junit.Before; + import org.junit.Rule; + import org.junit.Test; @@ -56,7 +57,7 @@ public class TargetPlatformBundlePublisherTest { logVerifier.expectNoWarnings(); @@ -340,14 +327,14 @@ index 50fe92f..0747f07 100644 @Test diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/target/TestResolverFactory.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/target/TestResolverFactory.java -index eba1e68..abf93e4 100644 +index 751791c..23d8481 100644 --- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/target/TestResolverFactory.java +++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/target/TestResolverFactory.java @@ -28,6 +28,7 @@ import org.eclipse.tycho.p2.target.facade.TargetPlatformFactory; import org.eclipse.tycho.repository.local.LocalArtifactRepository; import org.eclipse.tycho.repository.local.LocalMetadataRepository; import org.eclipse.tycho.repository.local.index.LocalRepositoryP2IndicesImpl; -+import org.eclipse.tycho.repository.local.testutil.MavenRepositorySystemStub; ++import org.eclipse.tycho.test.util.MavenRepositorySystemStub; import org.eclipse.tycho.test.util.NoopFileLockService; public class TestResolverFactory implements P2ResolverFactory { @@ -369,10 +356,10 @@ index eba1e68..abf93e4 100644 } // TODO use TemporaryLocalMavenRepository -diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/impl/resolver/P2ResolverFactoryImpl.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/impl/resolver/P2ResolverFactoryImpl.java -index 2b7c306..a0270e2 100644 ---- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/impl/resolver/P2ResolverFactoryImpl.java -+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/impl/resolver/P2ResolverFactoryImpl.java +diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/resolver/P2ResolverFactoryImpl.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/resolver/P2ResolverFactoryImpl.java +index 0155593..12d38a5 100644 +--- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/resolver/P2ResolverFactoryImpl.java ++++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/resolver/P2ResolverFactoryImpl.java @@ -33,7 +33,7 @@ public class P2ResolverFactoryImpl implements P2ResolverFactory { private static LocalMetadataRepository localMetadataRepository; private static LocalArtifactRepository localArtifactRepository; @@ -403,10 +390,10 @@ index 2b7c306..a0270e2 100644 } return localArtifactRepository; diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/PomDependencyCollectorImpl.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/PomDependencyCollectorImpl.java -index 0fa7b09..7044c2f 100644 +index eb20440..3b903df 100644 --- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/PomDependencyCollectorImpl.java +++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/PomDependencyCollectorImpl.java -@@ -45,7 +45,7 @@ public class PomDependencyCollectorImpl implements PomDependencyCollector { +@@ -44,7 +44,7 @@ public class PomDependencyCollectorImpl implements PomDependencyCollector { this.logger = mavenContext.getLogger(); File localRepositoryRoot = mavenContext.getLocalRepositoryRoot(); @@ -416,7 +403,7 @@ index 0fa7b09..7044c2f 100644 public void setProjectLocation(File projectLocation) { diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformBundlePublisher.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformBundlePublisher.java -index 8281167..5766806 100644 +index 8281167..b10929a 100644 --- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformBundlePublisher.java +++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformBundlePublisher.java @@ -25,6 +25,7 @@ import org.eclipse.equinox.p2.publisher.PublisherResult; @@ -427,18 +414,19 @@ index 8281167..5766806 100644 import org.eclipse.tycho.p2.impl.publisher.MavenPropertiesAdvice; import org.eclipse.tycho.p2.impl.publisher.repo.TransientArtifactRepository; import org.eclipse.tycho.p2.metadata.IArtifactFacade; -@@ -42,8 +43,8 @@ public class TargetPlatformBundlePublisher { +@@ -42,8 +43,9 @@ public class TargetPlatformBundlePublisher { private final MavenLogger logger; private final PublishedBundlesArtifactRepository publishedArtifacts; - public TargetPlatformBundlePublisher(File localMavenRepositoryRoot, MavenLogger logger) { - this.publishedArtifacts = new PublishedBundlesArtifactRepository(localMavenRepositoryRoot); -+ public TargetPlatformBundlePublisher(File localMavenRepositoryRoot, MavenLogger logger, MavenRepositorySystem repositorySystem) { ++ public TargetPlatformBundlePublisher(File localMavenRepositoryRoot, MavenLogger logger, ++ MavenRepositorySystem repositorySystem) { + this.publishedArtifacts = new PublishedBundlesArtifactRepository(localMavenRepositoryRoot, repositorySystem); this.logger = logger; } -@@ -206,8 +207,11 @@ public class TargetPlatformBundlePublisher { +@@ -206,8 +208,11 @@ public class TargetPlatformBundlePublisher { */ private static class PublishedBundlesArtifactRepository extends ArtifactRepositoryBaseImpl { @@ -451,18 +439,15 @@ index 8281167..5766806 100644 } void addPublishedArtifact(IArtifactDescriptor baseDescriptor, IArtifactFacade mavenArtifact) { -@@ -252,8 +256,9 @@ public class TargetPlatformBundlePublisher { +@@ -252,7 +257,7 @@ public class TargetPlatformBundlePublisher { @Override protected File internalGetArtifactStorageLocation(IArtifactDescriptor descriptor) { MavenRepositoryCoordinates coord = toInternalDescriptor(descriptor).getMavenCoordinates(); - LocalRepositoryReader reader = new LocalRepositoryReader(getBaseDir()); -- return reader.getLocalArtifactLocation(coord.getGav(), coord.getClassifier(), coord.getExtensionOrDefault()); + LocalRepositoryReader reader = new LocalRepositoryReader(getBaseDir(), repositorySystem); -+ return reader -+ .getLocalArtifactLocation(coord.getGav(), coord.getClassifier(), coord.getExtensionOrDefault()); + return reader.getLocalArtifactLocation(coord.getGav(), coord.getClassifier(), coord.getExtensionOrDefault()); } - private File getBaseDir() { diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryP2Indices.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryP2Indices.java index 2122578..54c46fc 100644 --- a/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryP2Indices.java @@ -484,18 +469,15 @@ index 2122578..54c46fc 100644 + } diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryReader.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryReader.java -index b5c8c55..64dac9c 100644 +index b5c8c55..7f6aa58 100644 --- a/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryReader.java +++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryReader.java -@@ -11,57 +11,27 @@ - package org.eclipse.tycho.p2.repository; +@@ -14,54 +14,27 @@ import java.io.File; + import java.lang.reflect.Constructor; + import java.lang.reflect.Method; - import java.io.File; --import java.lang.reflect.Constructor; --import java.lang.reflect.Method; -+ +import org.eclipse.tycho.core.facade.MavenRepositorySystem; - ++ public class LocalRepositoryReader implements RepositoryReader { private final File localMavenRepositoryRoot; @@ -507,7 +489,7 @@ index b5c8c55..64dac9c 100644 + this.repositorySystem = repositorySystem; } -- @SuppressWarnings({ "unchecked", "rawtypes" }) + @SuppressWarnings({ "unchecked", "rawtypes" }) public File getLocalArtifactLocation(GAV gav, String classifier, String extension) { - File file = new File(localMavenRepositoryRoot, RepositoryLayoutHelper.getRelativePath(gav, classifier, - extension)); @@ -556,11 +538,36 @@ index b5c8c55..64dac9c 100644 + return ret; } } -diff --git a/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/repository/local/testutil/MavenRepositorySystemStub.java b/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/repository/local/testutil/MavenRepositorySystemStub.java +diff --git a/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/repository/local/testutil/TemporaryLocalMavenRepository.java b/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/repository/local/testutil/TemporaryLocalMavenRepository.java +index f7cc92c..d6f3fec 100644 +--- a/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/repository/local/testutil/TemporaryLocalMavenRepository.java ++++ b/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/repository/local/testutil/TemporaryLocalMavenRepository.java +@@ -14,9 +14,11 @@ import java.io.File; + import java.io.IOException; + + import org.eclipse.equinox.internal.p2.core.helpers.FileUtils; ++import org.eclipse.tycho.core.facade.MavenRepositorySystem; + import org.eclipse.tycho.p2.repository.LocalRepositoryP2Indices; + import org.eclipse.tycho.repository.local.LocalArtifactRepository; + import org.eclipse.tycho.repository.local.index.LocalRepositoryP2IndicesImpl; ++import org.eclipse.tycho.test.util.MavenRepositorySystemStub; + import org.eclipse.tycho.test.util.NoopFileLockService; + import org.junit.Rule; + import org.junit.rules.ExternalResource; +@@ -72,7 +74,7 @@ public class TemporaryLocalMavenRepository extends ExternalResource { + + public LocalArtifactRepository getLocalArtifactRepository() { + if (repo == null) { +- repo = new LocalArtifactRepository(null, getLocalRepositoryIndex()); ++ repo = new LocalArtifactRepository(null, getLocalRepositoryIndex(), new MavenRepositorySystemStub(getLocalRepositoryRoot())); + } + return repo; + } +diff --git a/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/MavenRepositorySystemStub.java b/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/MavenRepositorySystemStub.java new file mode 100644 -index 0000000..a59d7e6 +index 0000000..5d5f815 --- /dev/null -+++ b/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/repository/local/testutil/MavenRepositorySystemStub.java ++++ b/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/MavenRepositorySystemStub.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2014 Red Hat Inc. @@ -572,7 +579,7 @@ index 0000000..a59d7e6 + * Contributors: + * Red Hat Inc. - initial API and implementation + *******************************************************************************/ -+package org.eclipse.tycho.repository.local.testutil; ++package org.eclipse.tycho.test.util; + +import java.io.File; + @@ -592,27 +599,6 @@ index 0000000..a59d7e6 + type)); + } +} -diff --git a/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/repository/local/testutil/TemporaryLocalMavenRepository.java b/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/repository/local/testutil/TemporaryLocalMavenRepository.java -index f7cc92c..0e6465f 100644 ---- a/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/repository/local/testutil/TemporaryLocalMavenRepository.java -+++ b/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/repository/local/testutil/TemporaryLocalMavenRepository.java -@@ -14,6 +14,7 @@ import java.io.File; - import java.io.IOException; - - import org.eclipse.equinox.internal.p2.core.helpers.FileUtils; -+import org.eclipse.tycho.core.facade.MavenRepositorySystem; - import org.eclipse.tycho.p2.repository.LocalRepositoryP2Indices; - import org.eclipse.tycho.repository.local.LocalArtifactRepository; - import org.eclipse.tycho.repository.local.index.LocalRepositoryP2IndicesImpl; -@@ -72,7 +73,7 @@ public class TemporaryLocalMavenRepository extends ExternalResource { - - public LocalArtifactRepository getLocalArtifactRepository() { - if (repo == null) { -- repo = new LocalArtifactRepository(null, getLocalRepositoryIndex()); -+ repo = new LocalArtifactRepository(null, getLocalRepositoryIndex(), new MavenRepositorySystemStub(getLocalRepositoryRoot())); - } - return repo; - } diff --git a/tycho-core/src/main/java/org/eclipse/tycho/osgi/adapters/MavenRepositorySystemAdapter.java b/tycho-core/src/main/java/org/eclipse/tycho/osgi/adapters/MavenRepositorySystemAdapter.java new file mode 100644 index 0000000..7c22f62 diff --git a/tycho-maven-surefire.patch b/tycho-maven-surefire.patch index 7852950..0d35724 100644 --- a/tycho-maven-surefire.patch +++ b/tycho-maven-surefire.patch @@ -1,4 +1,4 @@ -From ef54fab21914153917e55077baae71b10e9d1f53 Mon Sep 17 00:00:00 2001 +From 2100439cf0625cb1e4b480de2d90d7105443a6ef Mon Sep 17 00:00:00 2001 From: Jan Sievers Date: Tue, 4 Sep 2012 16:02:52 +0200 Subject: [PATCH] POC 386481 update maven surefire to latest version 2.17 @@ -40,7 +40,7 @@ Change-Id: Ibcb439a24add880c4cdafe67b42e29ca3cb14ff1 16 files changed, 118 insertions(+), 38 deletions(-) diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit/META-INF/MANIFEST.MF b/tycho-surefire/org.eclipse.tycho.surefire.junit/META-INF/MANIFEST.MF -index bc764f3..6c0f0d4 100644 +index a2522b5..0063b71 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit/META-INF/MANIFEST.MF +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit/META-INF/MANIFEST.MF @@ -7,5 +7,5 @@ Fragment-Host: org.eclipse.tycho.surefire.osgibooter;bundle-version="0.14.0" @@ -62,10 +62,10 @@ index 499ce76..fe88b19 100644 + jars/,\ plugin.properties diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit4/META-INF/MANIFEST.MF b/tycho-surefire/org.eclipse.tycho.surefire.junit4/META-INF/MANIFEST.MF -index 49246f7..7361cae 100644 +index 8597932..861e0d7 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit4/META-INF/MANIFEST.MF +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit4/META-INF/MANIFEST.MF -@@ -6,7 +6,7 @@ Bundle-Version: 0.20.0 +@@ -6,7 +6,7 @@ Bundle-Version: 0.21.0 Fragment-Host: org.eclipse.tycho.surefire.osgibooter;bundle-version="0.14.0" Bundle-RequiredExecutionEnvironment: J2SE-1.5, JavaSE-1.6 @@ -86,10 +86,10 @@ index b787149..fe88b19 100644 + jars/,\ plugin.properties diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit47/META-INF/MANIFEST.MF b/tycho-surefire/org.eclipse.tycho.surefire.junit47/META-INF/MANIFEST.MF -index 5e0aea7..2d3c2f6 100644 +index a26db94..6e0cebb 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit47/META-INF/MANIFEST.MF +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit47/META-INF/MANIFEST.MF -@@ -6,11 +6,14 @@ Bundle-Version: 0.20.0 +@@ -6,11 +6,14 @@ Bundle-Version: 0.21.0 Fragment-Host: org.eclipse.tycho.surefire.osgibooter;bundle-version="0.16.0" Bundle-RequiredExecutionEnvironment: J2SE-1.5 Bundle-ClassPath: ., @@ -120,7 +120,7 @@ index 61905c2..41bdc39 100644 about.html,\ about_files/ diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml -index 0b8c582..0147a32 100644 +index 9e0bfb6..e217cdf 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml @@ -44,6 +44,16 @@ @@ -163,7 +163,7 @@ index eaa8dc4..3b8ca14 100644 } diff --git a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/META-INF/MANIFEST.MF b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/META-INF/MANIFEST.MF -index b45a0a9..1c772c0 100644 +index fb1165d..6d4b688 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/META-INF/MANIFEST.MF +++ b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/META-INF/MANIFEST.MF @@ -4,8 +4,10 @@ Require-Bundle: org.eclipse.osgi;bundle-version="3.2.2", @@ -176,11 +176,11 @@ index b45a0a9..1c772c0 100644 + jars/surefire-api-2.15.jar, + jars/maven-surefire-common-2.15.jar, + jars/plexus-utils-3.0.jar - Bundle-Version: 0.20.0 + Bundle-Version: 0.21.0 Bundle-Name: Tycho Surefire OSGi Booter Eclipse Application (Incubation) Bundle-ManifestVersion: 2 diff --git a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml -index 92a30b9..6702533 100644 +index 36b75b6..27aa6f6 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml +++ b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml @@ -52,6 +52,16 @@ @@ -201,10 +201,10 @@ index 92a30b9..6702533 100644 diff --git a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java -index 56b2264..1ac5599 100644 +index c1de8ec..b81b853 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java +++ b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java -@@ -18,20 +18,25 @@ import java.io.IOException; +@@ -19,20 +19,25 @@ import java.io.IOException; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; @@ -232,7 +232,7 @@ index 56b2264..1ac5599 100644 import org.apache.maven.surefire.testset.TestRequest; import org.apache.maven.surefire.util.RunOrder; import org.eclipse.core.runtime.CoreException; -@@ -56,7 +61,7 @@ public class OsgiSurefireBooter { +@@ -57,7 +62,7 @@ public class OsgiSurefireBooter { List includes = getIncludesExcludes(testProps.getProperty("includes")); List excludes = getIncludesExcludes(testProps.getProperty("excludes")); @@ -241,7 +241,7 @@ index 56b2264..1ac5599 100644 boolean inForkedVM = true; boolean trimStacktrace = true; boolean useSystemClassloader = false; -@@ -65,26 +70,31 @@ public class OsgiSurefireBooter { +@@ -66,26 +71,31 @@ public class OsgiSurefireBooter { boolean printSummary = true; boolean disableXmlReport = false; ClassLoader testClassLoader = getBundleClassLoader(plugin); @@ -333,7 +333,7 @@ index c94d3ea..fc606b0 100644 } diff --git a/tycho-surefire/pom.xml b/tycho-surefire/pom.xml -index f97e666..f6bf5aa 100644 +index 476ffd9..6e16c20 100644 --- a/tycho-surefire/pom.xml +++ b/tycho-surefire/pom.xml @@ -26,7 +26,7 @@ @@ -346,10 +346,10 @@ index f97e666..f6bf5aa 100644 diff --git a/tycho-surefire/tycho-surefire-plugin/pom.xml b/tycho-surefire/tycho-surefire-plugin/pom.xml -index a772203..05dc1f3 100644 +index 0106500..c7a601a 100644 --- a/tycho-surefire/tycho-surefire-plugin/pom.xml +++ b/tycho-surefire/tycho-surefire-plugin/pom.xml -@@ -101,5 +101,10 @@ +@@ -106,5 +106,10 @@ tycho-p2-facade ${project.version} @@ -361,21 +361,21 @@ index a772203..05dc1f3 100644 diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/TestMojo.java b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/TestMojo.java -index 4554384..be22b0a 100644 +index 2305a2a..bd0cf5c 100644 --- a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/TestMojo.java +++ b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/TestMojo.java -@@ -20,6 +20,7 @@ import java.net.MalformedURLException; +@@ -19,6 +19,7 @@ import java.io.IOException; + import java.net.MalformedURLException; import java.util.ArrayList; import java.util.Arrays; - import java.util.HashMap; +import java.util.Collections; + import java.util.LinkedHashMap; import java.util.List; import java.util.Map; - import java.util.Properties; -@@ -35,9 +36,10 @@ import org.apache.maven.model.Dependency; - import org.apache.maven.plugin.AbstractMojo; - import org.apache.maven.plugin.MojoExecutionException; - import org.apache.maven.plugin.MojoFailureException; +@@ -40,9 +41,10 @@ import org.apache.maven.plugins.annotations.LifecyclePhase; + import org.apache.maven.plugins.annotations.Mojo; + import org.apache.maven.plugins.annotations.Parameter; + import org.apache.maven.plugins.annotations.ResolutionScope; +import org.apache.maven.plugin.surefire.util.DirectoryScanner; import org.apache.maven.project.MavenProject; import org.apache.maven.repository.RepositorySystem; @@ -384,7 +384,7 @@ index 4554384..be22b0a 100644 import org.apache.maven.toolchain.Toolchain; import org.apache.maven.toolchain.ToolchainManager; import org.codehaus.plexus.util.FileUtils; -@@ -904,6 +906,27 @@ public class TestMojo extends AbstractMojo { +@@ -858,6 +860,27 @@ public class TestMojo extends AbstractMojo { result.put("perCoreThreadCount", String.valueOf(perCoreThreadCount)); result.put("useUnlimitedThreads", String.valueOf(useUnlimitedThreads)); } @@ -412,7 +412,7 @@ index 4554384..be22b0a 100644 return result; } -@@ -948,7 +971,7 @@ public class TestMojo extends AbstractMojo { +@@ -902,7 +925,7 @@ public class TestMojo extends AbstractMojo { case 0: getLog().info("All tests passed!"); break; @@ -421,7 +421,7 @@ index 4554384..be22b0a 100644 String message = "No tests found."; if (failIfNoTests) { throw new MojoFailureException(message); -@@ -956,7 +979,7 @@ public class TestMojo extends AbstractMojo { +@@ -910,7 +933,7 @@ public class TestMojo extends AbstractMojo { getLog().warn(message); } break; @@ -444,5 +444,5 @@ index edcc46a..5d62d3d 100644 public Version getVersion() { -- -1.8.5.3 +1.9.3 diff --git a/tycho-running-env-only.patch b/tycho-running-env-only.patch index a8f2e7e..c50df3c 100644 --- a/tycho-running-env-only.patch +++ b/tycho-running-env-only.patch @@ -1,4 +1,4 @@ -From db3ae15ecb4c25d1da6c87946b9dca0a94f8ad9d Mon Sep 17 00:00:00 2001 +From f2455f1142b7fc8570139d5fec8b5f22ebe5542c Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Thu, 10 Jul 2014 15:26:50 +0100 Subject: [PATCH] Add "running env only" option to the p2-director-plugin. @@ -12,27 +12,27 @@ to only the current running target environment. 3 files changed, 23 insertions(+) diff --git a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/AbstractProductMojo.java b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/AbstractProductMojo.java -index 78bc542..aacd244 100644 +index c34cb72..d605091 100644 --- a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/AbstractProductMojo.java +++ b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/AbstractProductMojo.java -@@ -110,6 +110,16 @@ abstract class AbstractProductMojo extends AbstractMojo { - */ +@@ -106,6 +106,16 @@ abstract class AbstractProductMojo extends AbstractMojo { private List products; -+ /** + /** + *

+ * Assemble and archive product installations for the running environment only. Setting this to + * true will omit all target environments that do not exactly match the running environment. + *

-+ * ++ * + * @parameter expression="${director.running.env.only}" + */ + private boolean runningEnvOnly; + - MavenProject getProject() { - return project; - } -@@ -142,4 +152,11 @@ abstract class AbstractProductMojo extends AbstractMojo { ++ /** + * Kill the forked process after a certain number of seconds. If set to 0, wait forever for the + * process, never timing out. + */ +@@ -148,4 +158,11 @@ abstract class AbstractProductMojo extends AbstractMojo { static String getOsWsArch(TargetEnvironment env, char separator) { return env.getOs() + separator + env.getWs() + separator + env.getArch(); } @@ -45,10 +45,10 @@ index 78bc542..aacd244 100644 + } } diff --git a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/DirectorMojo.java b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/DirectorMojo.java -index c3dd2fb..5ed00f3 100644 +index 8bd539f..f95ce7e 100644 --- a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/DirectorMojo.java +++ b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/DirectorMojo.java -@@ -116,6 +116,9 @@ public final class DirectorMojo extends AbstractProductMojo { +@@ -114,6 +114,9 @@ public final class DirectorMojo extends AbstractProductMojo { RepositoryReferences sources = getSourceRepositories(); for (Product product : products) { for (TargetEnvironment env : getEnvironments()) { @@ -59,10 +59,10 @@ index c3dd2fb..5ed00f3 100644 File destination = getProductMaterializeDirectory(product, env); diff --git a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java -index d482cf5..611fa85 100644 +index 6a5c967..0e8df2a 100644 --- a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java +++ b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java -@@ -123,6 +123,9 @@ public final class ProductArchiverMojo extends AbstractProductMojo { +@@ -129,6 +129,9 @@ public final class ProductArchiverMojo extends AbstractProductMojo { for (Product product : config.getProducts()) { for (TargetEnvironment env : getEnvironments()) { @@ -73,5 +73,5 @@ index d482cf5..611fa85 100644 if (format != null) { format = format.trim(); -- -1.9.0 +1.9.3 diff --git a/tycho-use-custom-resolver.patch b/tycho-use-custom-resolver.patch index 23b7c91..0459a23 100644 --- a/tycho-use-custom-resolver.patch +++ b/tycho-use-custom-resolver.patch @@ -1,4 +1,4 @@ -From 04001d5e56fe2f4711b1299466d52f138aed41e8 Mon Sep 17 00:00:00 2001 +From 27881a1bc14a5914990485cfea9f5cc50160bab3 Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Tue, 12 Jun 2012 10:38:51 -0400 Subject: [PATCH] Implement a custom resolver for Tycho in local mode. @@ -34,14 +34,14 @@ Change-Id: Ia1ece07ece2412bc4a88901631f3f651ad2b634b .../facade/TargetPlatformConfigurationStub.java | 5 ++- .../eclipse/tycho/core/locking/FileLockerImpl.java | 26 ++++++++++--- .../core/maven/TychoMavenLifecycleParticipant.java | 45 ++++++++++++++++++++++ - .../tycho/core/osgitools/AbstractTychoProject.java | 24 ++++++++++++ + .../tycho/core/osgitools/AbstractTychoProject.java | 23 +++++++++++ .../tycho/core/osgitools/OsgiBundleProject.java | 29 +++++++++++++- .../DefaultTargetPlatformConfigurationReader.java | 6 ++- - .../p2/resolver/P2TargetPlatformResolver.java | 10 +++++ - 11 files changed, 231 insertions(+), 28 deletions(-) + .../tycho/p2/resolver/P2DependencyResolver.java | 10 +++++ + 11 files changed, 230 insertions(+), 28 deletions(-) diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetDefinitionResolver.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetDefinitionResolver.java -index d3c5ed9..027a884 100644 +index e8f7c3f..159dc42 100644 --- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetDefinitionResolver.java +++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetDefinitionResolver.java @@ -22,6 +22,8 @@ import java.util.Set; @@ -53,7 +53,7 @@ index d3c5ed9..027a884 100644 import org.eclipse.equinox.p2.core.IProvisioningAgent; import org.eclipse.equinox.p2.core.ProvisionException; import org.eclipse.equinox.p2.metadata.IInstallableUnit; -@@ -116,9 +118,13 @@ public class TargetDefinitionResolver { +@@ -122,9 +124,13 @@ public class TargetDefinitionResolver { List metadataRepositories = new ArrayList(); for (Repository repository : iuLocationDefinition.getRepositories()) { @@ -111,10 +111,10 @@ index 5d6bc1f..8281167 100644 private File getBaseDir() { diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformFactoryImpl.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformFactoryImpl.java -index 8d02003..63c5f0c 100644 +index 6554f43..2f9eb69 100644 --- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformFactoryImpl.java +++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformFactoryImpl.java -@@ -28,6 +28,9 @@ import org.eclipse.core.runtime.URIUtil; +@@ -32,6 +32,9 @@ import org.eclipse.core.runtime.URIUtil; import org.eclipse.equinox.p2.core.IProvisioningAgent; import org.eclipse.equinox.p2.core.ProvisionException; import org.eclipse.equinox.p2.metadata.IInstallableUnit; @@ -124,7 +124,7 @@ index 8d02003..63c5f0c 100644 import org.eclipse.equinox.p2.query.IQueryResult; import org.eclipse.equinox.p2.query.QueryUtil; import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager; -@@ -269,9 +272,43 @@ public class TargetPlatformFactoryImpl implements TargetPlatformFactory { +@@ -272,9 +275,43 @@ public class TargetPlatformFactoryImpl implements TargetPlatformFactory { metadataRepositories.add(localMetadataRepository); } @@ -170,7 +170,7 @@ index 8d02003..63c5f0c 100644 + } } - if (includeLocalMavenRepo && logger.isDebugEnabled()) { + result.addAll(pomDependenciesContent.gatherMavenInstallableUnits()); diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryReader.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryReader.java index 8d36462..b5c8c55 100644 --- a/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryReader.java @@ -234,10 +234,10 @@ index 8d36462..b5c8c55 100644 + } } diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/target/facade/TargetPlatformConfigurationStub.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/target/facade/TargetPlatformConfigurationStub.java -index 0be3e6f..3fecf39 100644 +index 9505cb5..c9919a2 100644 --- a/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/target/facade/TargetPlatformConfigurationStub.java +++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/target/facade/TargetPlatformConfigurationStub.java -@@ -58,7 +58,10 @@ public class TargetPlatformConfigurationStub { +@@ -56,7 +56,10 @@ public class TargetPlatformConfigurationStub { } public void addP2Repository(MavenRepositoryLocation location) { @@ -297,7 +297,7 @@ index 86253bd..cef15d2 100644 throw new RuntimeException(e); } catch (IOException e) { diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/maven/TychoMavenLifecycleParticipant.java b/tycho-core/src/main/java/org/eclipse/tycho/core/maven/TychoMavenLifecycleParticipant.java -index 08daf3c..a5f269c 100644 +index 59335b9..646ad62 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/core/maven/TychoMavenLifecycleParticipant.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/core/maven/TychoMavenLifecycleParticipant.java @@ -11,6 +11,8 @@ @@ -367,10 +367,10 @@ index 08daf3c..a5f269c 100644 resolver.setupProject(session, project, DefaultReactorProject.adapt(project)); } diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/AbstractTychoProject.java b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/AbstractTychoProject.java -index 695133d..542a0f7 100644 +index f2602ec..c5755a0 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/AbstractTychoProject.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/AbstractTychoProject.java -@@ -20,6 +20,9 @@ import org.eclipse.tycho.artifacts.TargetPlatform; +@@ -19,6 +19,9 @@ import org.eclipse.tycho.artifacts.DependencyArtifacts; import org.eclipse.tycho.core.TargetPlatformConfiguration; import org.eclipse.tycho.core.TychoConstants; import org.eclipse.tycho.core.TychoProject; @@ -379,8 +379,8 @@ index 695133d..542a0f7 100644 +import org.eclipse.tycho.core.ee.shared.ExecutionEnvironment; import org.eclipse.tycho.core.ee.shared.ExecutionEnvironmentConfiguration; import org.eclipse.tycho.core.facade.TargetEnvironment; - import org.eclipse.tycho.core.osgitools.targetplatform.LocalTargetPlatformResolver; -@@ -92,17 +95,38 @@ public abstract class AbstractTychoProject extends AbstractLogEnabled implements + import org.eclipse.tycho.core.osgitools.targetplatform.LocalDependencyResolver; +@@ -91,15 +94,35 @@ public abstract class AbstractTychoProject extends AbstractLogEnabled implements String configuredForcedProfile = tpConfiguration.getExecutionEnvironment(); if (configuredForcedProfile != null) { @@ -415,15 +415,12 @@ index 695133d..542a0f7 100644 + return null; + } + } -+ - public TargetPlatform getTargetPlatform(MavenProject project) { - return (TargetPlatform) project.getContextValue(TychoConstants.CTX_TARGET_PLATFORM); - } + } diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiBundleProject.java b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiBundleProject.java -index 62518f6..09b14a3 100644 +index f7f5df1..710c8a9 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiBundleProject.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiBundleProject.java -@@ -45,7 +45,9 @@ import org.eclipse.tycho.core.BundleProject; +@@ -47,7 +47,9 @@ import org.eclipse.tycho.core.BundleProject; import org.eclipse.tycho.core.PluginDescription; import org.eclipse.tycho.core.TychoConstants; import org.eclipse.tycho.core.TychoProject; @@ -433,7 +430,7 @@ index 62518f6..09b14a3 100644 import org.eclipse.tycho.core.ee.shared.ExecutionEnvironment; import org.eclipse.tycho.core.ee.shared.ExecutionEnvironmentConfiguration; import org.eclipse.tycho.core.facade.BuildPropertiesParser; -@@ -487,6 +489,7 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro +@@ -489,6 +491,7 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro String pdeProfile = getEclipsePluginProject(DefaultReactorProject.adapt(project)).getBuildProperties() .getJreCompilationProfile(); if (pdeProfile != null) { @@ -441,7 +438,7 @@ index 62518f6..09b14a3 100644 sink.setProfileConfiguration(pdeProfile.trim(), "build.properties"); } else { -@@ -504,7 +507,31 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro +@@ -506,7 +509,31 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro if (envs.isEmpty()) { return null; } @@ -491,11 +488,11 @@ index 4a1f157..65cbf47 100644 setTargetPlatformResolver(result, configuration); -diff --git a/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2TargetPlatformResolver.java b/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2TargetPlatformResolver.java -index 5bc5dfa..52e8200 100644 ---- a/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2TargetPlatformResolver.java -+++ b/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2TargetPlatformResolver.java -@@ -200,6 +200,16 @@ public class P2TargetPlatformResolver extends AbstractTargetPlatformResolver imp +diff --git a/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2DependencyResolver.java b/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2DependencyResolver.java +index 255df24..33db567 100644 +--- a/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2DependencyResolver.java ++++ b/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2DependencyResolver.java +@@ -201,6 +201,16 @@ public class P2DependencyResolver extends AbstractLogEnabled implements Dependen pomDependencies.setProjectLocation(project.getBasedir()); } @@ -513,5 +510,5 @@ index 5bc5dfa..52e8200 100644 addEntireP2RepositoryToTargetPlatform(repository, tpConfiguration); } -- -1.9.0 +1.9.3 diff --git a/tycho.spec b/tycho.spec index 4ce3404..27b0e36 100644 --- a/tycho.spec +++ b/tycho.spec @@ -18,15 +18,15 @@ %define __requires_exclude osgi* Name: tycho -Version: 0.20.0 -Release: 18%{?dist} +Version: 0.21.0 +Release: 1%{?dist} Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven Group: Development/Libraries # license file is missing but all files having some licensing information are ASL 2.0 License: ASL 2.0 URL: http://eclipse.org/tycho -Source0: http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/snapshot/tycho-0.20.0.tar.bz2 +Source0: http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/snapshot/tycho-0.21.0.tar.bz2 # this is a workaround for maven-plugin-plugin changes that happened after # version 2.4.3 (impossible to have empty mojo created as aggregate). This @@ -40,16 +40,15 @@ Source4: eclipse-bootstrap.tar.xz %endif Patch0: %{name}-fix-build.patch -Patch1: %{name}-eclipse-luna.patch # Upstream builds against maven-surefire 2.12.3 -Patch2: %{name}-maven-surefire.patch -Patch3: %{name}-fix-surefire.patch -Patch4: %{name}-use-custom-resolver.patch -Patch5: %{name}-maven-delegation.patch +Patch1: %{name}-maven-surefire.patch +Patch2: %{name}-fix-surefire.patch +Patch3: %{name}-use-custom-resolver.patch +Patch4: %{name}-maven-delegation.patch # Additional changes needed just for bootstrap build -Patch6: %{name}-fix-bootstrap-build.patch +Patch5: %{name}-fix-bootstrap-build.patch # Patch director plugin to only assemble products for the current arch -Patch7: %{name}-running-env-only.patch +Patch6: %{name}-running-env-only.patch BuildArch: noarch @@ -157,15 +156,14 @@ Requires: jpackage-utils This package contains the API documentation for %{name}. %prep -%setup -q -n %{name}-0.20.0 +%setup -q -n %{name}-0.21.0 %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 -%patch7 -p1 +%patch6 -p1 find tycho-core -iname '*html' -delete @@ -185,6 +183,20 @@ popd # These units cannot be found during a regular build sed -i '/^ org.ow2.asm:asm-all +%pom_xpath_set "pom:dependency[pom:artifactId='asm-debug-all']/pom:artifactId" "asm-all" tycho-artifactcomparator + +# org.hamcrest -> org.hamcrest.core +%pom_xpath_set "pom:requirement[pom:id='org.hamcrest']/pom:id" "org.hamcrest.core" tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests + +# we don't have org.apache.commons:commons-compress:jar:sources +%pom_xpath_remove "pom:dependency[pom:classifier='sources' and pom:artifactId='commons-compress']" tycho-p2/tycho-p2-director-plugin + + # Bootstrap Build %if %{eclipse_bootstrap} tar -xf %{SOURCE4} @@ -192,12 +204,12 @@ tar -xf %{SOURCE4} %if %{tycho_bootstrap} -%patch6 -p1 +%patch5 -p1 # Perform the 'minimal' (bootstrap) build of Tycho %{SOURCE2} %{eclipse_bootstrap} -%patch6 -p1 -R +%patch5 -p1 -R cp %{SOURCE3} ./ %if %{eclipse_bootstrap} @@ -343,6 +355,9 @@ install -m 644 $osgiStateJarPath $RPM_BUILD_ROOT%{_javadir}/%{name}/osgi.compati %{_javadocdir}/%{name} %changelog +* Thu Jul 24 2014 Roland Grunberg - 0.21.0-1 +- Update to 0.21.0 Release. + * Fri Jul 11 2014 Mat Booth - 0.20.0-18 - Allow director plugin to only assemble products for the current arch - Drop some unneeded BR/Rs on surefire (maven-local pulls these in)