tycho/tycho-fix-build.patch

250 lines
12 KiB
Diff
Raw Normal View History

From 9306067c39af629e88a4f0c04523f21b96890c2c Mon Sep 17 00:00:00 2001
2012-06-12 15:06:31 +00:00
From: Roland Grunberg <rgrunber@redhat.com>
Date: Tue, 12 Jun 2012 09:56:38 -0400
Subject: [PATCH] Fix the Tycho build to work on Fedora.
2012-06-12 15:06:31 +00:00
Minor fixes of limited scope needed to have Tycho building on Fedora.
2012-08-07 14:44:21 +00:00
Remove org.eclipse.equinox.concurrent until present in Fedora Eclipse.
2012-09-24 21:06:48 +00:00
Tycho upstream currently depends upon 0.15.0 when building
0.16.0-SNAPSHOT, which doesn't have reactor plugin version checking. In
Fedora we depend on the previously built version which has that version
checking. We must keep previous build version strings different to avoid
a cyclic dependency, but doing so causes the version checking to fail,
so we must provide a way to disable it. Disable by default.
2013-02-28 19:02:25 +00:00
Update to using Jetty 9 API.
Add support for compact profiles (http://openjdk.java.net/jeps/161).
2012-06-12 15:06:31 +00:00
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(-)
2012-06-12 15:06:31 +00:00
diff --git a/pom.xml b/pom.xml
2014-03-25 13:46:29 +00:00
index ef34822..685cce7 100644
2012-06-12 15:06:31 +00:00
--- a/pom.xml
+++ b/pom.xml
2014-03-25 13:46:29 +00:00
@@ -243,11 +243,6 @@ $CMD -DpomFile=org.eclipse.jdt.compiler.apt.pom \
2012-06-12 15:06:31 +00:00
<version>${jdtVersion}</version>
</dependency>
<dependency>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>org.eclipse.jdt.compiler.apt</artifactId>
- <version>${jdtAptVersion}</version>
- </dependency>
- <dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-booter</artifactId>
<version>2.10</version>
2012-08-07 14:44:21 +00:00
diff --git a/tycho-artifactcomparator/pom.xml b/tycho-artifactcomparator/pom.xml
2014-03-25 13:46:29 +00:00
index a7836dc..50d90d9 100644
2012-08-07 14:44:21 +00:00
--- a/tycho-artifactcomparator/pom.xml
+++ b/tycho-artifactcomparator/pom.xml
@@ -24,7 +24,7 @@
2012-08-07 14:44:21 +00:00
<dependency>
<!-- CQ https://dev.eclipse.org/ipzilla/show_bug.cgi?id=6591 -->
<groupId>org.ow2.asm</groupId>
2012-08-07 14:44:21 +00:00
- <artifactId>asm-debug-all</artifactId>
+ <artifactId>asm-all</artifactId>
<version>4.0</version>
</dependency>
<dependency>
@@ -54,4 +54,4 @@
</plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
2013-10-24 18:52:56 +00:00
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
2014-03-25 13:46:29 +00:00
index f934b66..5145072 100644
2013-10-24 18:52:56 +00:00
--- 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
Require-Bundle: org.junit,
org.eclipse.equinox.p2.publisher,
org.eclipse.equinox.ds,
- org.mockito
+ org.mockito.mockito-core
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
2014-03-25 13:46:29 +00:00
index fefde17..73c00f2 100644
2013-10-24 18:52:56 +00:00
--- 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 @@
<!-- 403196 give p2 resolver a hint so that package imports of org.mockito can be resolved -->
<requirement>
<type>eclipse-plugin</type>
- <id>org.hamcrest</id>
+ <id>org.hamcrest.core</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
2012-10-17 16:06:40 +00:00
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
--- 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 {
String name = capability.getName();
String version = capability.getVersion().toString();
- if (JREAction.NAMESPACE_OSGI_EE.equals(namespace)) {
+ if ("osgi.ee".equals(namespace)) {
result.add(new SystemCapability(Type.OSGI_EE, name, version));
} else if (PublisherHelper.CAPABILITY_NS_JAVA_PACKAGE.equals(namespace)) {
result.add(new SystemCapability(Type.JAVA_PACKAGE, name, version));
2013-02-28 19:02:25 +00:00
diff --git a/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/HttpServer.java b/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/HttpServer.java
2013-04-02 15:40:08 +00:00
index 57b4e10..47423e5 100644
2013-02-28 19:02:25 +00:00
--- a/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/HttpServer.java
+++ b/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/HttpServer.java
2013-04-02 15:40:08 +00:00
@@ -17,9 +17,13 @@ import java.util.List;
import java.util.Map;
import java.util.Random;
+import org.eclipse.jetty.security.ConstraintMapping;
+import org.eclipse.jetty.security.ConstraintSecurityHandler;
+import org.eclipse.jetty.security.HashLoginService;
2013-02-28 19:02:25 +00:00
+import org.eclipse.jetty.server.AbstractNetworkConnector;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.bio.SocketConnector;
+import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
2013-04-02 15:40:08 +00:00
import org.junit.rules.ExternalResource;
@@ -77,7 +81,7 @@ public class HttpServer extends ExternalResource {
2013-02-28 19:02:25 +00:00
2013-04-02 15:40:08 +00:00
private static RunningServer startServerOnPort(int port) throws Exception {
Server jetty = new Server();
2013-02-28 19:02:25 +00:00
- Connector connector = new SocketConnector();
2013-04-02 15:40:08 +00:00
+ AbstractNetworkConnector connector = new ServerConnector(jetty);
2013-02-28 19:02:25 +00:00
connector.setPort(port);
2013-04-02 15:40:08 +00:00
jetty.addConnector(connector);
2012-08-07 14:44:21 +00:00
diff --git a/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product b/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product
2014-03-25 13:46:29 +00:00
index c10de9e..aaba0d3 100644
2012-08-07 14:44:21 +00:00
--- a/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product
+++ b/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product
2013-04-02 15:40:08 +00:00
@@ -42,7 +42,6 @@
2012-08-07 14:44:21 +00:00
<plugin id="org.eclipse.ecf.ssl" fragment="true"/>
<plugin id="org.eclipse.equinox.app"/>
<plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.concurrent"/>
<plugin id="org.eclipse.equinox.ds"/>
<plugin id="org.eclipse.equinox.frameworkadmin"/>
<plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
diff --git a/tycho-bundles/tycho-standalone-p2-director/p2 Director.product b/tycho-bundles/tycho-standalone-p2-director/p2 Director.product
2013-04-02 15:40:08 +00:00
index 62b354d..11f65fb 100644
2012-08-07 14:44:21 +00:00
--- a/tycho-bundles/tycho-standalone-p2-director/p2 Director.product
+++ b/tycho-bundles/tycho-standalone-p2-director/p2 Director.product
2013-04-02 15:40:08 +00:00
@@ -42,7 +42,6 @@
2012-08-07 14:44:21 +00:00
<plugin id="org.eclipse.ecf.ssl" fragment="true"/>
<plugin id="org.eclipse.equinox.app"/>
<plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.concurrent"/>
<plugin id="org.eclipse.equinox.ds"/>
<plugin id="org.eclipse.equinox.frameworkadmin"/>
<plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
2012-06-12 15:06:31 +00:00
diff --git a/tycho-compiler-jdt/pom.xml b/tycho-compiler-jdt/pom.xml
2014-03-25 13:46:29 +00:00
index dca4f8f..815ca50 100644
2012-06-12 15:06:31 +00:00
--- a/tycho-compiler-jdt/pom.xml
+++ b/tycho-compiler-jdt/pom.xml
@@ -38,10 +38,6 @@
<artifactId>org.eclipse.jdt.core</artifactId>
</dependency>
<dependency>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>org.eclipse.jdt.compiler.apt</artifactId>
- </dependency>
- <dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-api</artifactId>
</dependency>
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
--- 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<EEVersion> {
public enum EEType {
// order is significant for comparison
- OSGI_MINIMUM("OSGi/Minimum"), CDC_FOUNDATION("CDC/Foundation"), JRE("JRE"), JAVA_SE("JavaSE");
+ OSGI_MINIMUM("OSGi/Minimum"), CDC_FOUNDATION("CDC/Foundation"), JRE("JRE"), JAVA_SE("JavaSE"), JAVA_SE_COMPACT1(
+ "JavaSE/compact1"), JAVA_SE_COMPACT2("JavaSE/compact2"), JAVA_SE_COMPACT3("JavaSE/compact3");
private final String profileName;
@@ -50,6 +51,16 @@ public class EEVersion implements Comparable<EEVersion> {
* @see java.lang.Comparable#compareTo(java.lang.Object)
*/
public int compareTo(EEVersion other) {
+ // JavaSE/compact{1..3} > JavaSE-N except when N = 1.8
+ final Version JAVA8 = Version.parseVersion("1.8");
+ if (type.equals(EEType.JAVA_SE) && version.equals(JAVA8)
+ && other.type.profileName.contains("JavaSE/compact")) {
+ return 1;
+
+ } else if (other.type.equals(EEType.JAVA_SE) && other.version.equals(JAVA8)
+ && type.profileName.contains("JavaSE/compact")) {
+ return -1;
+ }
int result = type.compareTo(other.type);
if (result != 0) {
return result;
2012-09-24 21:06:48 +00:00
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
2013-10-24 18:52:56 +00:00
index 08daf3c..d003619 100644
2012-09-24 21:06:48 +00:00
--- 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
2013-10-24 18:52:56 +00:00
@@ -77,7 +77,9 @@ public class TychoMavenLifecycleParticipant extends AbstractMavenLifecyclePartic
2012-09-24 21:06:48 +00:00
}
private void validate(List<MavenProject> projects) throws MavenExecutionException {
- validateConsistentTychoVersion(projects);
+ if (System.getProperty("tycho.enableVersionCheck") != null) {
2012-09-24 21:06:48 +00:00
+ validateConsistentTychoVersion(projects);
+ }
validateUniqueBaseDirs(projects);
}
2012-08-07 14:44:21 +00:00
diff --git a/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java b/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java
2013-10-24 18:52:56 +00:00
index a8173df..cf2cf57 100644
2012-08-07 14:44:21 +00:00
--- a/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java
+++ b/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java
2013-10-24 18:52:56 +00:00
@@ -110,12 +110,11 @@ public abstract class AbstractTychoIntegrationTest {
2012-08-07 14:44:21 +00:00
verifier.getCliOptions().add(customOptions);
}
- if (System.getProperty(SYSPROP_STATELOCATION) != null) {
- verifier.setForkJvm(false);
- String m2eresolver = System.getProperty("tychodev-maven.ext.class.path"); // XXX
- if (m2eresolver != null) {
- verifier.addCliOption("-Dmaven.ext.class.path=" + m2eresolver);
- }
+ String m2eState = System.getProperty("m2eclipse.workspace.state");
+ String m2eResolver = System.getProperty("m2eclipse.workspace.resolver");
+
+ if (m2eState != null && m2eResolver != null) {
+ verifier.getVerifierProperties().put("m2eclipse.workspace.state", m2eState);
}
return verifier;
2012-06-12 15:06:31 +00:00
--
1.9.0
2012-06-12 15:06:31 +00:00