Update to 0.15.0.

This commit is contained in:
Roland Grunberg 2012-06-12 11:06:31 -04:00
parent 9f4b1c0760
commit e1d99f384b
8 changed files with 749 additions and 535 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ maven-repo.tar.xz
tycho-0.14.0-6391f1dafb35cbef48753e89c743ee9664a1c79d.tar.xz
tycho-0.14.0.tar.bz2
/tycho-0.14.x.tar.bz2
/tycho-0.15.x.tar.bz2

View File

@ -1 +1 @@
819980acb31e0c06dca4fdd8320c39c1 tycho-0.14.x.tar.bz2
a238f4ebd99940ea798475d760152634 tycho-0.15.x.tar.bz2

File diff suppressed because it is too large Load Diff

View File

@ -1,23 +1,129 @@
--- ./tycho-0.14.0.old/tycho-testing-harness/src/main/java/org/eclipse/tycho/testing/EmptyLifecycleExecutor.java 2012-02-06 10:26:59.000000000 -0500
+++ ./tycho-0.14.0/tycho-testing-harness/src/main/java/org/eclipse/tycho/testing/EmptyLifecycleExecutor.java 2012-02-10 16:25:37.000000000 -0500
@@ -37,6 +37,14 @@
return null;
From b67b6a5ab67eea4cb69d259fb7140a54355df61d Mon Sep 17 00:00:00 2001
From: Roland Grunberg <rgrunber@redhat.com>
Date: Tue, 12 Jun 2012 09:56:38 -0400
Subject: [PATCH 1/4] Fix the Tycho build to work on Fedora.
Minor fixes of limited scope needed to have Tycho building on Fedora.
As of Fedora 17, the default JRE is JDK 1.7. This does not support
JSR14. Many Eclipse OSGi bundles use JSR14 for a build target but since
JDK 1.7 ignores certain information (eg. generics) we must be careful
when using those libraries.
Change-Id: Ic8c0514c1fa10ee53580d2654ac6a363ccd66814
---
pom.xml | 5 -----
tycho-bundles/tycho-bundles-target/tycho.target | 2 --
tycho-compiler-jdt/pom.xml | 4 ----
.../java/org/eclipse/tycho/core/osgitools/OsgiManifest.java | 12 ++++++------
.../tycho/core/osgitools/StandalonePluginConverterTest.java | 8 ++++----
.../org/eclipse/tycho/testing/EmptyLifecycleExecutor.java | 8 ++++++++
6 files changed, 18 insertions(+), 21 deletions(-)
diff --git a/pom.xml b/pom.xml
index 69e68c6..7cfb0cf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -221,11 +221,6 @@ $CMD -DpomFile=org.eclipse.jdt.compiler.apt.pom \
<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>
diff --git a/tycho-bundles/tycho-bundles-target/tycho.target b/tycho-bundles/tycho-bundles-target/tycho.target
index 1cd9a7b..48eb53a 100644
--- a/tycho-bundles/tycho-bundles-target/tycho.target
+++ b/tycho-bundles/tycho-bundles-target/tycho.target
@@ -4,8 +4,6 @@
<target name="Target platform for Tycho's bundles" sequenceNumber="2">
<locations>
<location includeAllPlatforms="false" includeMode="slicer" includeSource="false" type="InstallableUnit">
-<unit id="org.eclipse.equinox.executable.feature.group" version="3.6.0.v20120426-1529-7P7OFvNFLWUl7UmDUz0O8_a2"/>
-<unit id="org.eclipse.sdk.ide" version="4.2.0.I20120503-1800"/>
<repository location="http://download.eclipse.org/eclipse/updates/4.2milestones/"/>
</location>
</locations>
diff --git a/tycho-compiler-jdt/pom.xml b/tycho-compiler-jdt/pom.xml
index 9f7bdd7..6a1102b 100644
--- 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/osgitools/OsgiManifest.java b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiManifest.java
index 2859ab7..993cc58 100644
--- a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiManifest.java
+++ b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiManifest.java
@@ -25,7 +25,7 @@ public class OsgiManifest {
private static final ExecutionEnvironment[] EMPTY_EXEC_ENV = new ExecutionEnvironment[0];
private String location;
- private Headers<String, String> headers;
+ private Headers headers;
// cache for parsed values of commonly used headers
private String bundleSymbolicName;
@@ -78,7 +78,7 @@ public class OsgiManifest {
}
+ public MavenExecutionPlan calculateExecutionPlan(MavenSession session, boolean bool, String... tasks)
+ throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
+ MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
+ PluginManagerException, LifecyclePhaseNotFoundException, LifecycleNotFoundException,
+ PluginVersionResolutionException {
+ return null;
+ }
+
public MavenExecutionPlan calculateExecutionPlan(MavenSession session, String... tasks)
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
--- ./tycho-0.14.0.old/tycho-core/src/test/java/org/eclipse/tycho/core/osgitools/StandalonePluginConverterTest.java 2012-02-06 10:26:59.000000000 -0500
+++ ./tycho-0.14.0/tycho-core/src/test/java/org/eclipse/tycho/core/osgitools/StandalonePluginConverterTest.java 2012-02-10 15:39:49.723000889 -0500
@@ -36,7 +36,7 @@
private String parseMandatoryFirstValue(String headerKey) throws InvalidOSGiManifestException {
- String value = headers.get(headerKey);
+ String value = (String)headers.get(headerKey);
if (value == null) {
throw new InvalidOSGiManifestException(location, "MANIFEST header '" + headerKey + "' not found");
}
@@ -100,12 +100,12 @@ public class OsgiManifest {
&& "dir".equals(bundleShapeElements[0].getValue());
}
- public Headers<String, String> getHeaders() {
+ public Headers getHeaders() {
return headers;
}
public String getValue(String key) {
- return headers.get(key);
+ return (String)headers.get(key);
}
public String getBundleSymbolicName() {
@@ -141,7 +141,7 @@ public class OsgiManifest {
}
private ManifestElement[] parseHeader(String key) {
- String value = headers.get(key);
+ String value = (String)headers.get(key);
if (value == null) {
return null;
}
@@ -154,7 +154,7 @@ public class OsgiManifest {
public ManifestElement[] getManifestElements(String key) throws OsgiManifestParserException {
try {
- return ManifestElement.parseHeader(key, headers.get(key));
+ return ManifestElement.parseHeader(key, (String)headers.get(key));
} catch (BundleException e) {
throw new OsgiManifestParserException(location, e);
}
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
index 42db7f6..a145c57 100644
--- 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
@@ -36,7 +36,7 @@ public class StandalonePluginConverterTest {
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());
@ -26,7 +132,7 @@
Assert.assertEquals("testjar", headers.get("Bundle-SymbolicName"));
}
@@ -44,14 +44,14 @@
@@ -44,14 +44,14 @@ public class StandalonePluginConverterTest {
public void testWriteManifest() throws PluginConversionException, BundleException, IOException {
File tmpManifestFile = folder.newFile("testManifest");
Hashtable<String, String> manifestToWrite = new Hashtable<String, String>();
@ -44,81 +150,25 @@
assertEquals(originalManifest.size(), writtenManifest.size());
for (Enumeration<String> keys = writtenManifest.keys(); keys.hasMoreElements();) {
String key = keys.nextElement();
--- ./tycho-0.14.0.old/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiManifest.java 2012-02-06 10:26:59.000000000 -0500
+++ ./tycho-0.14.0/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiManifest.java 2012-02-10 15:36:32.000000000 -0500
@@ -25,7 +25,7 @@
private static final ExecutionEnvironment[] EMPTY_EXEC_ENV = new ExecutionEnvironment[0];
private String location;
- private Headers<String, String> headers;
+ private Headers headers;
// cache for parsed values of commonly used headers
private String bundleSymbolicName;
@@ -78,7 +78,7 @@
diff --git a/tycho-testing-harness/src/main/java/org/eclipse/tycho/testing/EmptyLifecycleExecutor.java b/tycho-testing-harness/src/main/java/org/eclipse/tycho/testing/EmptyLifecycleExecutor.java
index a9d80d3..3ddbe9c 100644
--- a/tycho-testing-harness/src/main/java/org/eclipse/tycho/testing/EmptyLifecycleExecutor.java
+++ b/tycho-testing-harness/src/main/java/org/eclipse/tycho/testing/EmptyLifecycleExecutor.java
@@ -37,6 +37,14 @@ public class EmptyLifecycleExecutor implements LifecycleExecutor {
return null;
}
private String parseMandatoryFirstValue(String headerKey) throws InvalidOSGiManifestException {
- String value = headers.get(headerKey);
+ String value = (String)headers.get(headerKey);
if (value == null) {
throw new InvalidOSGiManifestException(location, "MANIFEST header '" + headerKey + "' not found");
}
@@ -100,12 +100,12 @@
&& "dir".equals(bundleShapeElements[0].getValue());
}
- public Headers<String, String> getHeaders() {
+ public Headers getHeaders() {
return headers;
}
public String getValue(String key) {
- return headers.get(key);
+ return (String)headers.get(key);
}
public String getBundleSymbolicName() {
@@ -141,7 +141,7 @@
}
private ManifestElement[] parseHeader(String key) {
- String value = headers.get(key);
+ String value = (String)headers.get(key);
if (value == null) {
return null;
}
@@ -154,7 +154,7 @@
public ManifestElement[] getManifestElements(String key) throws OsgiManifestParserException {
try {
- return ManifestElement.parseHeader(key, headers.get(key));
+ return ManifestElement.parseHeader(key, (String)headers.get(key));
} catch (BundleException e) {
throw new OsgiManifestParserException(location, e);
}
--- ./tycho-0.14.x.old/tycho-core/src/main/java/org/eclipse/tycho/core/utils/EEVersion.java 2012-02-24 06:40:15.000000000 -0500
+++ ./tycho-0.14.x/tycho-core/src/main/java/org/eclipse/tycho/core/utils/EEVersion.java 2012-05-03 14:09:09.000000000 -0400
@@ -18,7 +18,7 @@
public enum EEType {
// order is significant for comparison
- OSGI_MINIMUM("OSGi/Minimum"), CDC_FOUNDATION("CDC/Foundation"), JAVA_SE("JavaSE");
+ OSGI_MINIMUM("OSGi/Minimum"), CDC_FOUNDATION("CDC/Foundation"), JRE("JRE"), JAVA_SE("JavaSE");
private final String profileName;
--- ./tycho-0.14.x.old/tycho-core/src/main/java/org/eclipse/tycho/core/utils/ExecutionEnvironment.java 2012-02-24 06:40:15.000000000 -0500
+++ ./tycho-0.14.x/tycho-core/src/main/java/org/eclipse/tycho/core/utils/ExecutionEnvironment.java 2012-05-03 14:09:09.000000000 -0400
@@ -50,8 +50,9 @@
private EEVersion parseEEVersion(String systemCaps) {
if (systemCaps == null && "JRE-1.1".equals(profileName)) {
- // system capabilities entry is missing for JRE-1.1
- return new EEVersion(Version.parseVersion("1.1"), EEType.JAVA_SE);
+ // system capabilities entry is missing for JRE-1.1
+ // TODO remove workaround when https://bugs.eclipse.org/377277 is fixed
+ return new EEVersion(Version.parseVersion("1.1"), EEType.JRE);
}
List<EEVersion> eeVersions = new ArrayList<EEVersion>();
try {
+ public MavenExecutionPlan calculateExecutionPlan(MavenSession session, boolean bool, String... tasks)
+ throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
+ MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
+ PluginManagerException, LifecyclePhaseNotFoundException, LifecycleNotFoundException,
+ PluginVersionResolutionException {
+ return null;
+ }
+
public MavenExecutionPlan calculateExecutionPlan(MavenSession session, String... tasks)
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
--
1.7.11.2

View File

@ -1,7 +1,7 @@
From 5ddb88911071664de0e07f7f247aeeaedecc8cab Mon Sep 17 00:00:00 2001
From 35f7704c0086224e2f307f6e8d0469911d120136 Mon Sep 17 00:00:00 2001
From: Roland Grunberg <rgrunber@redhat.com>
Date: Tue, 29 May 2012 14:27:27 -0400
Subject: [PATCH] Resolve all necessary dependencies for Tycho Surefire.
Subject: [PATCH 2/4] Resolve all necessary dependencies for Tycho Surefire.
When running an Eclipse bundle's tests, Tycho Surefire resolves its
runtime dependencies using a class loader, which is in fact just looking
@ -25,7 +25,7 @@ the additional classes that are in the original jars used upstream.
9 files changed, 31 insertions(+), 7 deletions(-)
diff --git a/pom.xml b/pom.xml
index e9d8624..ca20999 100644
index 69e68c6..42ffc40 100644
--- a/pom.xml
+++ b/pom.xml
@@ -79,7 +79,7 @@
@ -38,10 +38,10 @@ index e9d8624..ca20999 100644
<wagonVersion>1.0-beta-6</wagonVersion>
<securityDispatcherVersion>1.3</securityDispatcherVersion>
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 9264109..a27abe4 100644
index 1417c3a..f9f6cd2 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.14.1
@@ -6,6 +6,7 @@ Bundle-Version: 0.15.0
Fragment-Host: org.eclipse.tycho.surefire.osgibooter;bundle-version="0.14.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5,
JavaSE-1.6
@ -63,7 +63,7 @@ index 499ce76..fe88b19 100644
+ jars/,\
plugin.properties
diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml
index 2a4afc8..ae35035 100644
index b917533..f5699bc 100644
--- a/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml
+++ b/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml
@@ -47,6 +47,11 @@
@ -79,10 +79,10 @@ index 2a4afc8..ae35035 100644
</configuration>
</execution>
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 bbb54a8..82e66d1 100644
index fdf4e6a..de38fb3 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.14.1
@@ -6,7 +6,9 @@ Bundle-Version: 0.15.0
Fragment-Host: org.eclipse.tycho.surefire.osgibooter;bundle-version="0.14.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5,
JavaSE-1.6
@ -105,7 +105,7 @@ index b787149..fe88b19 100644
+ jars/,\
plugin.properties
diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml
index 08ab16a..2ed7c3a 100644
index 0039fc4..d5f35cb 100644
--- a/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml
+++ b/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml
@@ -71,6 +71,16 @@
@ -126,7 +126,7 @@ index 08ab16a..2ed7c3a 100644
</configuration>
</execution>
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 fda57c6..ab5de08 100644
index 06c99c9..c2c4c8c 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
@@ -5,7 +5,8 @@ Require-Bundle: org.eclipse.osgi;bundle-version="3.2.2",
@ -136,11 +136,11 @@ index fda57c6..ab5de08 100644
- jars/surefire-api-2.10.jar
+ jars/surefire-api-2.10.jar,
+ jars/plexus-utils-3.0.jar
Bundle-Version: 0.14.1
Bundle-Version: 0.15.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 cd5b2d7..d1d24da 100644
index 4b65c4a..7a13f1d 100644
--- a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml
+++ b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml
@@ -52,6 +52,11 @@

View File

@ -1,29 +1,55 @@
--- ./tycho-0.14.x.old/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/TestMojo.java 2012-02-24 06:40:15.000000000 -0500
+++ ./tycho-0.14.x/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/TestMojo.java 2012-03-09 15:52:27.000000000 -0500
@@ -594,7 +594,7 @@
case 0:
getLog().info("All tests passed!");
break;
- case RunResult.NO_TESTS:
+ case 254:
String message = "No tests found.";
if (failIfNoTests) {
throw new MojoFailureException(message);
--- ./tycho-0.14.x.old/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/META-INF/MANIFEST.MF 2012-02-24 06:40:15.000000000 -0500
+++ ./tycho-0.14.x/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/META-INF/MANIFEST.MF 2012-03-09 14:53:53.000000000 -0500
@@ -6,7 +6,8 @@
From 038d1819e9b9880783ce187023e1404f5ea12db7 Mon Sep 17 00:00:00 2001
From: Roland Grunberg <rgrunber@redhat.com>
Date: Tue, 12 Jun 2012 10:12:53 -0400
Subject: [PATCH 3/4] Upstream builds against maven-surefire 2.10 but in
rawhide we have 2.12.
Change-Id: I69ceee1cb2abe86bc6ca080ddde6676bf995347a
---
.../META-INF/MANIFEST.MF | 3 ++-
.../org.eclipse.tycho.surefire.osgibooter/pom.xml | 7 +++++++
.../surefire/osgibooter/OsgiSurefireBooter.java | 15 ++++++++-------
.../osgibooter/TychoClasspathConfiguration.java | 5 +++++
.../java/org/eclipse/tycho/surefire/TestMojo.java | 4 ++--
5 files changed, 24 insertions(+), 10 deletions(-)
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 c2c4c8c..9fa7626 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
@@ -6,7 +6,8 @@ Eclipse-AutoStart: true
Bundle-ClassPath: .,
jars/surefire-booter-2.10.jar,
jars/surefire-api-2.10.jar,
- jars/plexus-utils-3.0.jar
+ jars/plexus-utils-3.0.jar,
+ jars/maven-surefire-common-2.10.jar
Bundle-Version: 0.14.1
Bundle-Version: 0.15.0
Bundle-Name: Tycho Surefire OSGi Booter Eclipse Application (Incubation)
Bundle-ManifestVersion: 2
--- ./tycho-0.14.x.old/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java 2012-02-24 06:40:15.000000000 -0500
+++ ./tycho-0.14.x/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java 2012-03-09 15:44:34.000000000 -0500
@@ -26,13 +26,14 @@
diff --git a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml
index 7a13f1d..275c95e 100644
--- a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml
+++ b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml
@@ -56,6 +56,13 @@
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>${plexusUtilsVersion}</version>
+
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>maven-surefire-common</artifactId>
+ <version>${surefire-version}</version>
+
</artifactItem>
</artifactItems>
</configuration>
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 8d46bdb..162a706 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
@@ -26,13 +26,14 @@ import java.util.Set;
import org.apache.maven.surefire.booter.ClassLoaderConfiguration;
import org.apache.maven.surefire.booter.ProviderConfiguration;
import org.apache.maven.surefire.booter.StartupConfiguration;
@ -40,7 +66,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -63,22 +64,22 @@
@@ -63,22 +64,22 @@ public class OsgiSurefireBooter {
boolean printSummary = true;
boolean disableXmlReport = false;
ClassLoader testClassLoader = getBundleClassLoader(plugin);
@ -68,25 +94,11 @@
startupReportConfig);
RunResult result = surefireStarter.runSuitesInProcess();
--- ./tycho-0.14.x.old/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml 2012-02-24 06:40:15.000000000 -0500
+++ ./tycho-0.14.x/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml 2012-03-09 14:45:54.987999986 -0500
@@ -56,6 +56,13 @@
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>${plexusUtilsVersion}</version>
+
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>maven-surefire-common</artifactId>
+ <version>${surefire-version}</version>
+
</artifactItem>
</artifactItems>
</configuration>
--- ./tycho-0.14.x.old/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/TychoClasspathConfiguration.java 2012-02-24 06:40:15.000000000 -0500
+++ ./tycho-0.14.x/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/TychoClasspathConfiguration.java 2012-05-29 16:45:39.000000000 -0400
@@ -30,6 +30,11 @@
diff --git a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/TychoClasspathConfiguration.java b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/TychoClasspathConfiguration.java
index c94d3ea..6c732a5 100644
--- a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/TychoClasspathConfiguration.java
+++ b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/TychoClasspathConfiguration.java
@@ -30,6 +30,11 @@ public class TychoClasspathConfiguration extends ClasspathConfiguration {
}
@Override
@ -98,3 +110,28 @@
public ClassLoader createTestClassLoader() throws SurefireExecutionException {
return testClassLoader;
}
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 a8857f1..83f0e0f 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
@@ -589,7 +589,7 @@ public class TestMojo extends AbstractMojo {
case 0:
getLog().info("All tests passed!");
break;
- case RunResult.NO_TESTS:
+ case 254:
String message = "No tests found.";
if (failIfNoTests) {
throw new MojoFailureException(message);
@@ -597,7 +597,7 @@ public class TestMojo extends AbstractMojo {
getLog().warn(message);
}
break;
- case RunResult.FAILURE:
+ case 255:
String errorMessage = "There are test failures.\n\nPlease refer to " + reportsDirectory
+ " for the individual test results.";
if (testFailureIgnore) {
--
1.7.7.6

View File

@ -1,6 +1,6 @@
From 7d87e41ad0f3356b74d93be8588ef69539edcc91 Mon Sep 17 00:00:00 2001
From 6f332ba550f5d0b29a929503b0d7ca386d337f9c Mon Sep 17 00:00:00 2001
From: Roland Grunberg <rgrunber@redhat.com>
Date: Thu, 7 Jun 2012 16:41:33 -0400
Date: Tue, 12 Jun 2012 10:38:51 -0400
Subject: [PATCH] Implement a custom resolver for Tycho in local mode.
When running in local mode, dependencies should be resolved by looking
@ -16,18 +16,19 @@ for Eclipse bundles. Eclipse Juno platform bundles depend on
javax.annotation. In Fedora this is provided by geronimo-annotation, but
has a dependency on javax.lang.model (since 1.6).
Change-Id: I0609a1caecad753d811c5a93183547b33737657f
Change-Id: Ia1ece07ece2412bc4a88901631f3f651ad2b634b
---
.../tycho/p2/target/TargetDefinitionResolver.java | 8 +++-
.../tycho/p2/target/TargetPlatformBuilderImpl.java | 5 +++
.../core/maven/TychoMavenLifecycleParticipant.java | 15 ++++++++
.../tycho/core/osgitools/OsgiBundleProject.java | 38 +++++++++++++++++++-
.../tycho/osgi/runtime/TychoP2RuntimeLocator.java | 17 +++++++++
.../p2/resolver/P2TargetPlatformResolver.java | 10 +++++
6 files changed, 90 insertions(+), 3 deletions(-)
.../tycho/p2/target/TargetDefinitionResolver.java | 8 +++--
.../tycho/p2/target/TargetPlatformBuilderImpl.java | 6 ++++
.../core/maven/TychoMavenLifecycleParticipant.java | 16 +++++++++
.../core/osgitools/EclipseFeatureProject.java | 22 +++++++++++++
.../tycho/core/osgitools/OsgiBundleProject.java | 38 +++++++++++++++++++++-
.../tycho/osgi/runtime/TychoP2RuntimeLocator.java | 17 ++++++++++
.../p2/resolver/P2TargetPlatformResolver.java | 10 ++++++
7 files changed, 114 insertions(+), 3 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 2d7d3b9..c628e6e 100644
index 6a85c49..d9d6055 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
@@ -24,6 +24,7 @@ import org.eclipse.core.runtime.CoreException;
@ -53,23 +54,24 @@ index 2d7d3b9..c628e6e 100644
IQueryable<IInstallableUnit> locationUnits = new CompoundQueryable<IInstallableUnit>(
diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformBuilderImpl.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformBuilderImpl.java
index 9da87bb..5785029 100644
index e4b4084..8d58a3c 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformBuilderImpl.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformBuilderImpl.java
@@ -255,6 +255,11 @@ public class TargetPlatformBuilderImpl implements TargetPlatformBuilder {
return;
}
@@ -225,6 +225,12 @@ public class TargetPlatformBuilderImpl implements TargetPlatformBuilder {
IMetadataRepository metadataRepository = null;
IArtifactRepository artifactRepository = null;
+ // We cannot resolve a non-file URI in local mode while offline
+ if (System.getProperty("maven.local.mode") != null && offline && !URIUtil.isFileURI(location)) {
+ return;
+ }
+
+
try {
metadataRepository = metadataRepositoryManager.loadRepository(location, monitor);
metadataRepositories.add(metadataRepository);
// TODO always log that a p2 repository is added to the target platform somewhere; used to be either from p2 or the following line
// logger.info("Adding repository (cached) " + location.toASCIIString());
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 80810d6..24efc87 100644
index 0dd2fd4..15669a6 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,7 @@
@ -77,10 +79,10 @@ index 80810d6..24efc87 100644
import java.io.File;
+import java.io.IOException;
import java.util.HashSet;
import java.util.List;
import org.apache.maven.AbstractMavenLifecycleParticipant;
@@ -51,6 +52,21 @@ public class TychoMavenLifecycleParticipant extends AbstractMavenLifecyclePartic
import java.util.Set;
@@ -55,6 +56,21 @@ public class TychoMavenLifecycleParticipant extends AbstractMavenLifecyclePartic
registerExecutionListener(session);
configureComponents(session);
@ -99,11 +101,49 @@ index 80810d6..24efc87 100644
+ }
+ }
+
List<MavenProject> projects = session.getProjects();
for (MavenProject project : projects) {
resolver.setupProject(session, project, DefaultReactorProject.adapt(project));
}
diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/EclipseFeatureProject.java b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/EclipseFeatureProject.java
index 060a844..dbbe51a 100644
--- a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/EclipseFeatureProject.java
+++ b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/EclipseFeatureProject.java
@@ -21,6 +21,9 @@ import org.eclipse.tycho.core.ArtifactDependencyVisitor;
import org.eclipse.tycho.core.ArtifactDependencyWalker;
import org.eclipse.tycho.core.TargetEnvironment;
import org.eclipse.tycho.core.TychoProject;
+import org.eclipse.tycho.core.UnknownEnvironmentException;
+import org.eclipse.tycho.core.utils.ExecutionEnvironment;
+import org.eclipse.tycho.core.utils.ExecutionEnvironmentUtils;
import org.eclipse.tycho.model.Feature;
@Component(role = TychoProject.class, hint = org.eclipse.tycho.ArtifactKey.TYPE_ECLIPSE_FEATURE)
@@ -49,4 +52,23 @@ public class EclipseFeatureProject extends AbstractArtifactBasedProject {
Feature.loadFeature(project.getBasedir());
}
+ @Override
+ public ExecutionEnvironment getExecutionEnvironment(MavenProject project) {
+ ExecutionEnvironment ee = super.getExecutionEnvironment(project);
+
+ if (System.getProperty("maven.local.mode") != null && ee != null) {
+ try {
+ // EE must be at least JavaSE-1.6
+ final ExecutionEnvironment javaSE16 = ExecutionEnvironmentUtils.getExecutionEnvironment("JavaSE-1.6");
+ if (ee.compareTo(javaSE16) < 0) {
+ ee = javaSE16;
+ }
+ } catch (UnknownEnvironmentException e) {
+ // Continue
+ }
+ }
+
+ return ee;
+ }
+
}
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 8d18453..051913e 100644
index fe6383f..d037faf 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
@@ -505,6 +505,28 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro
@ -201,12 +241,12 @@ index 15b3fff..c8f14df 100644
for (MavenProject project : session.getProjects()) {
repositories.addAll(project.getPluginArtifactRepositories());
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 d4bcc9a..57ae997 100644
index ea06289..0768fd0 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
@@ -204,6 +204,16 @@ public class P2TargetPlatformResolver extends AbstractTargetPlatformResolver imp
ee != null ? ee.getProfileName() : null, configuration.isDisableP2Mirrors());
@@ -206,6 +206,16 @@ public class P2TargetPlatformResolver extends AbstractTargetPlatformResolver imp
tpBuilder.setProjectLocation(project.getBasedir());
tpBuilder.setIncludePackedArtifacts(configuration.isIncludePackedArtifacts());
+ // Add Fedora Local P2 Repository when running in local mode
+ if (System.getProperty("maven.local.mode") != null) {
@ -222,5 +262,5 @@ index d4bcc9a..57ae997 100644
addOtherReactorProjectsToTargetPlatform(project, reactorProjects, tpBuilder);
--
1.7.7.6
1.7.11.2

View File

@ -7,16 +7,15 @@
%endif
Name: tycho
Version: 0.14.1
Release: 7%{?dist}
Version: 0.15.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://tycho.sonatype.org/
# http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/snapshot/tycho-0.14.x.tar.bz2
Source0: %{name}-0.14.x.tar.bz2
Source0: http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/snapshot/tycho-0.15.x.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
@ -35,9 +34,7 @@ Patch4: %{name}-fix-swt.patch
# Set some temporary build version so that the bootstrapped build has
# a different version from the nonbootstrapped. Otherwise there will
# be cyclic dependencies.
%if %{bootstrap}
Patch5: %{name}-bootstrap.patch
%endif
BuildArch: noarch
@ -65,6 +62,7 @@ BuildRequires: %{name}
Requires: jpackage-utils
Requires: decentxml
Requires: maven
Requires: maven-dependency-plugin
Requires: maven-shared-verifier
Requires: maven-surefire-provider-junit4
Requires: eclipse-jdt
@ -109,11 +107,11 @@ Requires: jpackage-utils
This package contains the API documentation for %{name}.
%prep
%setup -q -n %{name}-0.14.x
%setup -q -n %{name}-0.15.x
%patch0 -p2
%patch0 -p1
%patch1 -p1
%patch2 -p2
%patch2 -p1
%patch3 -p1
%patch4 -p1
%if %{bootstrap}
@ -130,10 +128,7 @@ popd
%build
export MAVEN_OPTS="$MAVEN_OPTS -XX:MaxPermSize=256m"
export TYCHO_TARGET_PLATFORM=%{_eclipse_base}
mvn-rpmbuild -Dmaven.local.debug=true -X -Dmaven.test.skip=true \
-Dmaven.local.depmap.file=%{SOURCE2} \
-Dtycho.targetPlatform=$TYCHO_TARGET_PLATFORM install javadoc:aggregate
mvn-rpmbuild -Dmaven.local.depmap.file=%{SOURCE2} install javadoc:aggregate
%install
@ -199,6 +194,10 @@ install -pm 755 %{SOURCE3} %{buildroot}%{_javadir}/%{name}/copy-platform-all
%{_javadocdir}/%{name}
%changelog
* Thu Jul 26 2012 Roland Grunberg <rgrunber@redhat.com> 0.15.0-1
- Update to 0.15.0.
- Set BREE to at least JavaSE-1.6 for Eclipse feature bundles.
* Wed Jul 25 2012 Roland Grunberg <rgrunber@redhat.com> 0.14.1-7
- Non-bootstrap build.