From b90c413777d24c1970ed2c8bb43946e73a16a1e7 Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Mon, 24 Sep 2012 17:06:48 -0400 Subject: [PATCH] Update to latest 0.16.0 SNAPSHOT. --- sources | 2 +- tycho-bootstrap.patch | 36 +- tycho-fix-build.patch | 27 +- tycho-fix-surefire.patch | 144 ++------ tycho-maven-surefire.patch | 615 ++++++++++++++++++++++++++++---- tycho-use-custom-resolver.patch | 160 +++++---- tycho.spec | 15 +- 7 files changed, 718 insertions(+), 281 deletions(-) diff --git a/sources b/sources index 0e882cd..5143db1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7a11dc2efbcc5904ad8d5c199fcee33a org.eclipse.tycho-df2c3591ae0e641a8d12c13ca9c1058eaf8439b2.tar.bz2 +6b2889160641b8470bc12fd50b3ee3fa org.eclipse.tycho-d7f8850f746dd72e0a97c1fdf32c06ce794fb83d.tar.bz2 diff --git a/tycho-bootstrap.patch b/tycho-bootstrap.patch index ee7765a..eb07ca7 100644 --- a/tycho-bootstrap.patch +++ b/tycho-bootstrap.patch @@ -1,5 +1,5 @@ diff --git a/pom.xml b/pom.xml -index 3a27718..a4a3ed1 100644 +index 1868f9a..61ff701 100644 --- a/pom.xml +++ b/pom.xml @@ -63,7 +63,7 @@ @@ -77,7 +77,7 @@ index a7a8629..ce749e7 100644 target-platform-configuration diff --git a/tycho-artifactcomparator/pom.xml b/tycho-artifactcomparator/pom.xml -index a6ff6f7..a638bac 100644 +index 11bcb70..720feb5 100644 --- a/tycho-artifactcomparator/pom.xml +++ b/tycho-artifactcomparator/pom.xml @@ -16,7 +16,7 @@ @@ -116,7 +116,7 @@ index 2cffad0..e87c76b 100644 org.eclipse.tycho.core.shared.tests diff --git a/tycho-bundles/org.eclipse.tycho.core.shared/META-INF/MANIFEST.MF b/tycho-bundles/org.eclipse.tycho.core.shared/META-INF/MANIFEST.MF -index 739b3e7..e5f7e32 100644 +index 22e8105..2ec4dcb 100644 --- a/tycho-bundles/org.eclipse.tycho.core.shared/META-INF/MANIFEST.MF +++ b/tycho-bundles/org.eclipse.tycho.core.shared/META-INF/MANIFEST.MF @@ -1,7 +1,7 @@ @@ -194,7 +194,7 @@ index 1d71dbb..2aa0e42 100644 org.eclipse.tycho.noopsecurity 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 2d52b8f..442da34 100644 +index 9ac1b2c..4f71bc1 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 @@ -2,7 +2,7 @@ Manifest-Version: 1.0 @@ -205,7 +205,7 @@ index 2d52b8f..442da34 100644 +Bundle-Version: 0.16.0 Bundle-Vendor: %providerName Bundle-RequiredExecutionEnvironment: J2SE-1.5 - Require-Bundle: org.eclipse.tycho.p2.maven.repository, + Fragment-Host: org.eclipse.tycho.p2.maven.repository 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 296a0f6..85310b8 100644 --- a/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/pom.xml @@ -220,7 +220,7 @@ index 296a0f6..85310b8 100644 org.eclipse.tycho.p2.maven.repository.tests diff --git a/tycho-bundles/org.eclipse.tycho.p2.maven.repository/META-INF/MANIFEST.MF b/tycho-bundles/org.eclipse.tycho.p2.maven.repository/META-INF/MANIFEST.MF -index 0143eeb..304024a 100644 +index f4b71b6..5a23f51 100644 --- a/tycho-bundles/org.eclipse.tycho.p2.maven.repository/META-INF/MANIFEST.MF +++ b/tycho-bundles/org.eclipse.tycho.p2.maven.repository/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 @@ -723,7 +723,7 @@ index b0f47ca..206a28d 100644 tycho-source-plugin 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 c7767ba..74437ab 100644 +index 73c0ef9..dc89431 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 @@ -2,7 +2,7 @@ Manifest-Version: 1.0 @@ -749,7 +749,7 @@ index 188c45c..9ff127c 100644 org.eclipse.tycho.surefire.junit 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 632039f..c6fcd7f 100644 +index 85ecad7..0227c8c 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 @@ -2,7 +2,7 @@ Manifest-Version: 1.0 @@ -762,7 +762,7 @@ index 632039f..c6fcd7f 100644 Bundle-RequiredExecutionEnvironment: J2SE-1.5, JavaSE-1.6 diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml -index f7e6791..ace0538 100644 +index ecf287c..4701d48 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml @@ -17,7 +17,7 @@ @@ -775,7 +775,7 @@ index f7e6791..ace0538 100644 org.eclipse.tycho.surefire.junit4 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 50d53dd..680c4eb 100644 +index 8176947..fb00291 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 @@ -2,7 +2,7 @@ Manifest-Version: 1.0 @@ -788,7 +788,7 @@ index 50d53dd..680c4eb 100644 Bundle-RequiredExecutionEnvironment: J2SE-1.5 Bundle-ClassPath: ., diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml -index 9be536a..336c8ac 100644 +index dd3b995..df730e1 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml @@ -17,7 +17,7 @@ @@ -801,20 +801,20 @@ index 9be536a..336c8ac 100644 org.eclipse.tycho.surefire.junit47 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 d510010..ce8fc7d 100644 +index 92eaa7f..7f3481e 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 @@ -8,7 +8,7 @@ Bundle-ClassPath: ., - jars/surefire-api-2.10.jar, - jars/plexus-utils-3.0.jar, - jars/maven-surefire-common-2.10.jar + jars/surefire-api-2.12.3.jar, + jars/maven-surefire-common-2.12.3.jar, + jars/plexus-utils-3.0.jar -Bundle-Version: 0.16.0.qualifier +Bundle-Version: 0.16.0 Bundle-Name: Tycho Surefire OSGi Booter Eclipse Application (Incubation) Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.eclipse.tycho.surefire.osgibooter;singleton:=true diff --git a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml -index b6040a5..0c7c7a0 100644 +index ef1cbcc..23829a2 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml +++ b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml @@ -17,7 +17,7 @@ @@ -827,7 +827,7 @@ index b6040a5..0c7c7a0 100644 org.eclipse.tycho.surefire.osgibooter diff --git a/tycho-surefire/pom.xml b/tycho-surefire/pom.xml -index fe415d7..eab06be 100644 +index a3ff67f..79a1a2d 100644 --- a/tycho-surefire/pom.xml +++ b/tycho-surefire/pom.xml @@ -17,7 +17,7 @@ @@ -840,7 +840,7 @@ index fe415d7..eab06be 100644 tycho-surefire diff --git a/tycho-surefire/tycho-surefire-plugin/pom.xml b/tycho-surefire/tycho-surefire-plugin/pom.xml -index a9e2f1d..8a099eb 100644 +index e24eb32..2970388 100644 --- a/tycho-surefire/tycho-surefire-plugin/pom.xml +++ b/tycho-surefire/tycho-surefire-plugin/pom.xml @@ -17,7 +17,7 @@ diff --git a/tycho-fix-build.patch b/tycho-fix-build.patch index 6425964..c4ab83c 100644 --- a/tycho-fix-build.patch +++ b/tycho-fix-build.patch @@ -1,4 +1,4 @@ -From 19866503693224e992e2c3caa0b0c978bfe9aee5 Mon Sep 17 00:00:00 2001 +From e82aad8024d9cddf6e997292c190cf4347f773ce 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. @@ -7,6 +7,13 @@ Minor fixes of limited scope needed to have Tycho building on Fedora. Remove org.eclipse.equinox.concurrent until present in Fedora Eclipse. +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. (skipTychoVersionCheck) + Change-Id: Ic8c0514c1fa10ee53580d2654ac6a363ccd66814 --- pom.xml | 5 ----- @@ -15,9 +22,10 @@ Change-Id: Ic8c0514c1fa10ee53580d2654ac6a363ccd66814 tycho-bundles/tycho-bundles-target/tycho.target | 4 ---- .../tycho-standalone-p2-director/p2 Director.product | 1 - tycho-compiler-jdt/pom.xml | 4 ---- + .../tycho/core/maven/TychoMavenLifecycleParticipant.java | 4 +++- .../org/eclipse/tycho/test/AbstractTychoIntegrationTest.java | 11 +++++------ .../org/eclipse/tycho/testing/EmptyLifecycleExecutor.java | 8 ++++++++ - 8 files changed, 15 insertions(+), 23 deletions(-) + 9 files changed, 18 insertions(+), 24 deletions(-) diff --git a/pom.xml b/pom.xml index dc7c1f5..1868f9a 100644 @@ -109,6 +117,21 @@ index 01b9a9e..c373e6a 100644 org.codehaus.plexus plexus-compiler-api +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 3efb896..cccb6ff 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 +@@ -84,7 +84,9 @@ public class TychoMavenLifecycleParticipant extends AbstractMavenLifecyclePartic + } + + private void validate(List projects) throws MavenExecutionException { +- validateConsistentTychoVersion(projects); ++ if (System.getProperty("skipTychoVersionCheck") == null) { ++ validateConsistentTychoVersion(projects); ++ } + validateUniqueBaseDirs(projects); + } + 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 index 5c4dcb3..9830aee 100644 --- a/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java diff --git a/tycho-fix-surefire.patch b/tycho-fix-surefire.patch index a10c7bc..da4604f 100644 --- a/tycho-fix-surefire.patch +++ b/tycho-fix-surefire.patch @@ -1,7 +1,7 @@ -From 15d879a19f9704b823d38dfc390ba23ef666a422 Mon Sep 17 00:00:00 2001 +From e0f650e736c27c6872082a153561c0739b19edc7 Mon Sep 17 00:00:00 2001 From: Roland Grunberg -Date: Tue, 29 May 2012 14:27:27 -0400 -Subject: [PATCH 2/4] Resolve all necessary dependencies for Tycho Surefire. +Date: Fri, 21 Sep 2012 10:58:09 -0400 +Subject: [PATCH] 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 @@ -13,37 +13,18 @@ of provided classes. This patch addresses this issue. Basically, the jars added to the Bundle-ClassPath in this patch, provide the additional classes that are in the original jars used upstream. -Change-Id: I678a961226d5ca27542a2b79a069b995cd3613eb +Change-Id: I9ef0239eed887fa47c380efcdce968934c788c9f --- - pom.xml | 2 +- .../org.eclipse.tycho.surefire.junit/META-INF/MANIFEST.MF | 5 +++-- - .../org.eclipse.tycho.surefire.junit/build.properties | 2 +- tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml | 5 +++++ .../org.eclipse.tycho.surefire.junit4/META-INF/MANIFEST.MF | 4 +++- - .../org.eclipse.tycho.surefire.junit4/build.properties | 2 +- tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml | 10 ++++++++++ .../org.eclipse.tycho.surefire.junit47/META-INF/MANIFEST.MF | 4 +++- - .../org.eclipse.tycho.surefire.junit47/build.properties | 2 ++ tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml | 10 ++++++++++ - .../org.eclipse.tycho.surefire.osgibooter/META-INF/MANIFEST.MF | 3 ++- - tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml | 5 +++++ - 12 files changed, 46 insertions(+), 8 deletions(-) + 6 files changed, 34 insertions(+), 4 deletions(-) -diff --git a/pom.xml b/pom.xml -index 1868f9a..3a27718 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -79,7 +79,7 @@ - 3.8.2 - 1.5.5 - 1.14 -- 2.0.4 -+ 3.0 - 1.4.2 - 1.0-beta-6 - 1.3 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 c9281d6..c7767ba 100644 +index 66c569d..73c0ef9 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.16.0.qualifier @@ -51,22 +32,11 @@ index c9281d6..c7767ba 100644 Bundle-RequiredExecutionEnvironment: J2SE-1.5, JavaSE-1.6 -Require-Bundle: org.junit;bundle-version="[3.8.0,4.0.0)" --Bundle-ClassPath: jars/surefire-junit3-2.10.jar +-Bundle-ClassPath: jars/surefire-junit3-2.12.3.jar +Require-Bundle: org.junit;bundle-version="[3.8.0,4.9.0)" -+Bundle-ClassPath: jars/surefire-junit3-2.10.jar, -+ jars/common-junit3-2.10.jar ++Bundle-ClassPath: jars/surefire-junit3-2.12.3.jar, ++ jars/common-junit3-2.12.3.jar Bundle-Vendor: %providerName -diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit/build.properties b/tycho-surefire/org.eclipse.tycho.surefire.junit/build.properties -index 499ce76..fe88b19 100644 ---- a/tycho-surefire/org.eclipse.tycho.surefire.junit/build.properties -+++ b/tycho-surefire/org.eclipse.tycho.surefire.junit/build.properties -@@ -9,5 +9,5 @@ - # Sonatype Inc. - initial API and implementation - ############################################################################### - bin.includes = META-INF/,\ -- jars/surefire-junit3-2.10.jar,\ -+ 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 f9feec9..188c45c 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml @@ -84,33 +54,22 @@ index f9feec9..188c45c 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 c2e019c..632039f 100644 +index 8acb207..85ecad7 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.16.0.qualifier Fragment-Host: org.eclipse.tycho.surefire.osgibooter;bundle-version="0.14.0" Bundle-RequiredExecutionEnvironment: J2SE-1.5, JavaSE-1.6 --Bundle-ClassPath: jars/surefire-junit4-2.10.jar -+Bundle-ClassPath: jars/surefire-junit4-2.10.jar, -+ jars/common-junit3-2.10.jar, -+ jars/common-junit4-2.10.jar - Import-Package: junit.framework;version="4.0.0", +-Bundle-ClassPath: jars/surefire-junit4-2.12.3.jar ++Bundle-ClassPath: jars/surefire-junit4-2.12.3.jar, ++ jars/common-junit3-2.12.3.jar, ++ jars/common-junit4-2.12.3.jar + Import-Package: junit.framework;version="3.0.0", org.junit;version="4.0.0", org.junit.runner;version="4.0.0", -diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit4/build.properties b/tycho-surefire/org.eclipse.tycho.surefire.junit4/build.properties -index b787149..fe88b19 100644 ---- a/tycho-surefire/org.eclipse.tycho.surefire.junit4/build.properties -+++ b/tycho-surefire/org.eclipse.tycho.surefire.junit4/build.properties -@@ -9,5 +9,5 @@ - # Sonatype Inc. - initial API and implementation - ############################################################################### - bin.includes = META-INF/,\ -- jars/surefire-junit4-2.10.jar,\ -+ 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 f1f821e..f7e6791 100644 +index f1f821e..ecf287c 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 @@ @@ -121,7 +80,7 @@ index f1f821e..f7e6791 100644 + org.apache.maven.surefire + common-junit3 + ${surefire-version} -+ ++ + + org.apache.maven.surefire + common-junit4 @@ -131,39 +90,26 @@ index f1f821e..f7e6791 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 59d4c36..50d53dd 100644 +index 50ed65d..8176947 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,7 +6,9 @@ Bundle-Version: 0.16.0.qualifier - Fragment-Host: org.eclipse.tycho.surefire.osgibooter;bundle-version="0.16.0" - Bundle-RequiredExecutionEnvironment: J2SE-1.5 +@@ -8,7 +8,9 @@ Bundle-RequiredExecutionEnvironment: J2SE-1.5 Bundle-ClassPath: ., -- jars/surefire-junit47-2.10.jar -+ jars/surefire-junit47-2.10.jar, -+ jars/common-junit3-2.10.jar, -+ jars/common-junit4-2.10.jar - Import-Package: junit.framework;version="[4.7,5)", + jars/surefire-junit47-2.12.3.jar, + jars/common-junit48-2.12.3.jar, +- jars/surefire-grouper-2.12.3.jar ++ jars/surefire-grouper-2.12.3.jar, ++ jars/common-junit3-2.12.3.jar, ++ jars/common-junit4-2.12.3.jar + Import-Package: junit.framework;version="3.0.0", org.junit;version="[4.7,5)", org.junit.runner;version="[4.7,5)", -diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit47/build.properties b/tycho-surefire/org.eclipse.tycho.surefire.junit47/build.properties -index 716961d..ad4ed57 100644 ---- a/tycho-surefire/org.eclipse.tycho.surefire.junit47/build.properties -+++ b/tycho-surefire/org.eclipse.tycho.surefire.junit47/build.properties -@@ -11,6 +11,8 @@ - bin.includes = .,\ - META-INF/,\ - jars/surefire-junit47-2.10.jar,\ -+ jars/common-junit3-2.10.jar,\ -+ jars/common-junit4-2.10.jar,\ - plugin.properties,\ - 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 61beabb..9be536a 100644 +index 623631d..dd3b995 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 @@ - surefire-junit47 +@@ -54,6 +54,16 @@ + surefire-grouper ${surefire-version} + @@ -175,40 +121,10 @@ index 61beabb..9be536a 100644 + org.apache.maven.surefire + common-junit3 + ${surefire-version} -+ - - - -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 9c418b3..1bdb8cb 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", - Eclipse-AutoStart: true - Bundle-ClassPath: ., - jars/surefire-booter-2.10.jar, -- jars/surefire-api-2.10.jar -+ jars/surefire-api-2.10.jar, -+ jars/plexus-utils-3.0.jar - Bundle-Version: 0.16.0.qualifier - 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 9582aef..87f1f23 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 @@ - surefire-booter - ${surefire-version} - -+ -+ org.codehaus.plexus -+ plexus-utils -+ ${plexusUtilsVersion} + -- -1.7.11.2 +1.7.11.4 diff --git a/tycho-maven-surefire.patch b/tycho-maven-surefire.patch index ad4286e..65ede3c 100644 --- a/tycho-maven-surefire.patch +++ b/tycho-maven-surefire.patch @@ -1,151 +1,620 @@ -From e907892903141709326414a573d8703a5dccef47 Mon Sep 17 00:00:00 2001 -From: Roland Grunberg -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. +From fadaca9cd7c89634ee6bf0676fdf6cb0a0013f3a Mon Sep 17 00:00:00 2001 +From: Jan Sievers +Date: Tue, 4 Sep 2012 16:02:52 +0200 +Subject: [PATCH 1/3] POC 386481 update maven surefire to latest version + 2.12.3 -Change-Id: I69ceee1cb2abe86bc6ca080ddde6676bf995347a +while SUREFIRE-825 and SUREFIRE-876 are fixed, +there are several new problems: + +1. The junit47 provider is broken again (probably + due to junit bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=318299 +2. the internal structure of surefire chnaged significantly + (new jars need to be pulled into OSGi, the Surefire + booter/starter API changed, directory scanning must now + be done in the TestMojo already +3. The most sever issue here is that we don't have the dependencies + of surefire under control and what used to be more or less self-contained + (surefire-api and surefire-booter) now drags in lots of dependencies + which we don't really want to wrap in OSGi. I only added those actually + needed by what we are using, the correct list of dependent jars would + be much longer. + +Change-Id: Ibcb439a24add880c4cdafe67b42e29ca3cb14ff1 --- - .../surefire/junitcore/OsgiEnabledJUnitCoreProvider.java | 2 +- - .../META-INF/MANIFEST.MF | 3 ++- - .../org.eclipse.tycho.surefire.osgibooter/pom.xml | 7 +++++++ - .../tycho/surefire/osgibooter/OsgiSurefireBooter.java | 15 ++++++++------- - .../surefire/osgibooter/TychoClasspathConfiguration.java | 5 +++++ - .../main/java/org/eclipse/tycho/surefire/TestMojo.java | 4 ++-- - 6 files changed, 25 insertions(+), 11 deletions(-) + .../META-INF/MANIFEST.MF | 2 +- + .../build.properties | 2 +- + .../META-INF/MANIFEST.MF | 2 +- + .../build.properties | 2 +- + .../META-INF/MANIFEST.MF | 7 +- + .../build.properties | 3 +- + .../org.eclipse.tycho.surefire.junit47/pom.xml | 10 ++ + .../junitcore/OsgiEnabledJUnitCoreProvider.java | 126 --------------------- + .../junitcore/OsgiEnabledJUnitCoreRunListener.java | 100 ---------------- + .../META-INF/MANIFEST.MF | 6 +- + .../org.eclipse.tycho.surefire.osgibooter/pom.xml | 10 ++ + .../surefire/osgibooter/OsgiSurefireBooter.java | 34 ++++-- + tycho-surefire/pom.xml | 2 +- + tycho-surefire/tycho-surefire-plugin/pom.xml | 5 + + .../java/org/eclipse/tycho/surefire/TestMojo.java | 29 ++++- + .../surefire/provider/impl/JUnit47Provider.java | 2 +- + 16 files changed, 89 insertions(+), 253 deletions(-) + delete mode 100644 tycho-surefire/org.eclipse.tycho.surefire.junit47/src/org/apache/maven/surefire/junitcore/OsgiEnabledJUnitCoreProvider.java + delete mode 100644 tycho-surefire/org.eclipse.tycho.surefire.junit47/src/org/apache/maven/surefire/junitcore/OsgiEnabledJUnitCoreRunListener.java +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 c9281d6..66c569d 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" + Bundle-RequiredExecutionEnvironment: J2SE-1.5, + JavaSE-1.6 + Require-Bundle: org.junit;bundle-version="[3.8.0,4.0.0)" +-Bundle-ClassPath: jars/surefire-junit3-2.10.jar ++Bundle-ClassPath: jars/surefire-junit3-2.12.3.jar + Bundle-Vendor: %providerName +diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit/build.properties b/tycho-surefire/org.eclipse.tycho.surefire.junit/build.properties +index 499ce76..fe88b19 100644 +--- a/tycho-surefire/org.eclipse.tycho.surefire.junit/build.properties ++++ b/tycho-surefire/org.eclipse.tycho.surefire.junit/build.properties +@@ -9,5 +9,5 @@ + # Sonatype Inc. - initial API and implementation + ############################################################################### + bin.includes = META-INF/,\ +- jars/surefire-junit3-2.10.jar,\ ++ 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 c7ba8a9..8acb207 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.16.0.qualifier + Fragment-Host: org.eclipse.tycho.surefire.osgibooter;bundle-version="0.14.0" + Bundle-RequiredExecutionEnvironment: J2SE-1.5, + JavaSE-1.6 +-Bundle-ClassPath: jars/surefire-junit4-2.10.jar ++Bundle-ClassPath: jars/surefire-junit4-2.12.3.jar + Import-Package: junit.framework;version="3.0.0", + org.junit;version="4.0.0", + org.junit.runner;version="4.0.0", +diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit4/build.properties b/tycho-surefire/org.eclipse.tycho.surefire.junit4/build.properties +index b787149..fe88b19 100644 +--- a/tycho-surefire/org.eclipse.tycho.surefire.junit4/build.properties ++++ b/tycho-surefire/org.eclipse.tycho.surefire.junit4/build.properties +@@ -9,5 +9,5 @@ + # Sonatype Inc. - initial API and implementation + ############################################################################### + bin.includes = META-INF/,\ +- jars/surefire-junit4-2.10.jar,\ ++ 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 14fb3ff..50ed65d 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.16.0.qualifier + Fragment-Host: org.eclipse.tycho.surefire.osgibooter;bundle-version="0.16.0" + Bundle-RequiredExecutionEnvironment: J2SE-1.5 + Bundle-ClassPath: ., +- jars/surefire-junit47-2.10.jar ++ jars/surefire-junit47-2.12.3.jar, ++ jars/common-junit48-2.12.3.jar, ++ jars/surefire-grouper-2.12.3.jar + Import-Package: junit.framework;version="3.0.0", + org.junit;version="[4.7,5)", + org.junit.runner;version="[4.7,5)", + org.junit.runner.notification;version="[4.7,5)", + org.junit.runners;version="[4.7,5)", +- org.junit.runners.model;version="[4.7,5)" ++ org.junit.runners.model;version="[4.7,5)", ++ org.junit.runner.manipulation;version="[4.7,5)" + Bundle-Vendor: %providerName +diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit47/build.properties b/tycho-surefire/org.eclipse.tycho.surefire.junit47/build.properties +index 716961d..2589258 100644 +--- a/tycho-surefire/org.eclipse.tycho.surefire.junit47/build.properties ++++ b/tycho-surefire/org.eclipse.tycho.surefire.junit47/build.properties +@@ -10,8 +10,7 @@ + ############################################################################### + bin.includes = .,\ + META-INF/,\ +- jars/surefire-junit47-2.10.jar,\ ++ jars/,\ + plugin.properties,\ + about.html,\ + about_files/ +-source.. = src/ +diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml +index 61beabb..623631d 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 @@ + surefire-junit47 + ${surefire-version} + ++ ++ org.apache.maven.surefire ++ common-junit48 ++ ${surefire-version} ++ ++ ++ org.apache.maven.surefire ++ surefire-grouper ++ ${surefire-version} ++ + + + diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit47/src/org/apache/maven/surefire/junitcore/OsgiEnabledJUnitCoreProvider.java b/tycho-surefire/org.eclipse.tycho.surefire.junit47/src/org/apache/maven/surefire/junitcore/OsgiEnabledJUnitCoreProvider.java -index eaa8dc4..ea3a628 100644 +deleted file mode 100644 +index eaa8dc4..0000000 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit47/src/org/apache/maven/surefire/junitcore/OsgiEnabledJUnitCoreProvider.java -+++ b/tycho-surefire/org.eclipse.tycho.surefire.junit47/src/org/apache/maven/surefire/junitcore/OsgiEnabledJUnitCoreProvider.java -@@ -115,7 +115,7 @@ public class OsgiEnabledJUnitCoreProvider - org.junit.runner.notification.RunListener jUnit4RunListener = new OsgiEnabledJUnitCoreRunListener( listener, testSetMap ); - customRunListeners.add( 0, jUnit4RunListener ); - ++++ /dev/null +@@ -1,126 +0,0 @@ +-package org.apache.maven.surefire.junitcore; +- +-/* +- * Licensed to the Apache Software Foundation (ASF) under one +- * or more contributor license agreements. See the NOTICE file +- * distributed with this work for additional information +- * regarding copyright ownership. The ASF licenses this file +- * to you under the Apache License, Version 2.0 (the +- * "License"); you may not use this file except in compliance +- * with the License. You may obtain a copy of the License at +- * +- * http://www.apache.org/licenses/LICENSE-2.0 +- * +- * Unless required by applicable law or agreed to in writing, +- * software distributed under the License is distributed on an +- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +- * KIND, either express or implied. See the License for the +- * specific language governing permissions and limitations +- * under the License. +- */ +- +-import java.util.Iterator; +-import java.util.List; +-import java.util.Map; +-import java.util.concurrent.ConcurrentHashMap; +- +-import org.apache.maven.surefire.common.junit4.JUnit4RunListenerFactory; +-import org.apache.maven.surefire.common.junit4.JUnit4TestChecker; +-import org.apache.maven.surefire.providerapi.AbstractProvider; +-import org.apache.maven.surefire.providerapi.ProviderParameters; +-import org.apache.maven.surefire.report.ConsoleLogger; +-import org.apache.maven.surefire.report.ConsoleOutputCapture; +-import org.apache.maven.surefire.report.ConsoleOutputReceiver; +-import org.apache.maven.surefire.report.ReporterException; +-import org.apache.maven.surefire.report.ReporterFactory; +-import org.apache.maven.surefire.report.RunListener; +-import org.apache.maven.surefire.suite.RunResult; +-import org.apache.maven.surefire.testset.TestSetFailedException; +-import org.apache.maven.surefire.util.DirectoryScanner; +-import org.apache.maven.surefire.util.ScannerFilter; +-import org.apache.maven.surefire.util.TestsToRun; +- +-/** +- * This class is a workaround for surefire bug {@link http://jira.codehaus.org/browse/SUREFIRE-876 }. It's a copy of +- * {@link JUnitCoreProvider} with the only change to use OsgiEnabledJUnitCoreRunListener instead of +- * JUnitCoreRunListener. TODO remove and use {@link JUnitCoreProvider} instead when surefire release with proposed +- * bugfix is available. +- * +- * @author Kristian Rosenvold +- * @author Jan Sievers (SAP) +- */ +-public class OsgiEnabledJUnitCoreProvider +- extends AbstractProvider +-{ +- private final ClassLoader testClassLoader; +- +- private final DirectoryScanner directoryScanner; +- +- private final JUnitCoreParameters jUnitCoreParameters; +- +- private final ScannerFilter scannerFilter; +- +- private final List customRunListeners; +- +- private final ProviderParameters providerParameters; +- +- private TestsToRun testsToRun; +- +- +- public OsgiEnabledJUnitCoreProvider( ProviderParameters providerParameters ) +- { +- this.providerParameters = providerParameters; +- this.testClassLoader = providerParameters.getTestClassLoader(); +- this.directoryScanner = providerParameters.getDirectoryScanner(); +- this.jUnitCoreParameters = new JUnitCoreParameters( providerParameters.getProviderProperties() ); +- this.scannerFilter = new JUnit4TestChecker( testClassLoader ); +- customRunListeners = JUnit4RunListenerFactory. +- createCustomListeners( providerParameters.getProviderProperties().getProperty( "listener" ) ); +- +- } +- +- public Boolean isRunnable() +- { +- return Boolean.TRUE; +- } +- +- public Iterator getSuites() +- { +- testsToRun = scanClassPath(); +- return testsToRun.iterator(); +- } +- +- public RunResult invoke( Object forkTestSet ) +- throws TestSetFailedException, ReporterException +- { +- final String message = "Concurrency config is " + jUnitCoreParameters.toString() + "\n"; +- final ReporterFactory reporterFactory = providerParameters.getReporterFactory(); +- +- final ConsoleLogger consoleLogger = providerParameters.getConsoleLogger(); +- consoleLogger.info( message ); +- +- if ( testsToRun == null ) +- { +- testsToRun = forkTestSet == null ? scanClassPath() : TestsToRun.fromClass( (Class) forkTestSet ); +- } +- final Map testSetMap = new ConcurrentHashMap(); +- +- RunListener listener = ConcurrentReporterManager.createInstance( testSetMap, reporterFactory, +- jUnitCoreParameters.isParallelClasses(), +- jUnitCoreParameters.isParallelBoth(), +- consoleLogger ); +- +- ConsoleOutputCapture.startCapture( (ConsoleOutputReceiver) listener ); +- +- org.junit.runner.notification.RunListener jUnit4RunListener = new OsgiEnabledJUnitCoreRunListener( listener, testSetMap ); +- customRunListeners.add( 0, jUnit4RunListener ); +- - JUnitCoreWrapper.execute( testsToRun, jUnitCoreParameters, customRunListeners ); -+ JUnitCoreWrapper.execute( testsToRun, jUnitCoreParameters, customRunListeners, null ); - return reporterFactory.close(); - } - +- return reporterFactory.close(); +- } +- +- private TestsToRun scanClassPath() +- { +- return directoryScanner.locateTestClasses( testClassLoader, scannerFilter ); +- } +-} +diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit47/src/org/apache/maven/surefire/junitcore/OsgiEnabledJUnitCoreRunListener.java b/tycho-surefire/org.eclipse.tycho.surefire.junit47/src/org/apache/maven/surefire/junitcore/OsgiEnabledJUnitCoreRunListener.java +deleted file mode 100644 +index fb6bede..0000000 +--- a/tycho-surefire/org.eclipse.tycho.surefire.junit47/src/org/apache/maven/surefire/junitcore/OsgiEnabledJUnitCoreRunListener.java ++++ /dev/null +@@ -1,100 +0,0 @@ +-package org.apache.maven.surefire.junitcore; +-/* +- * Licensed to the Apache Software Foundation (ASF) under one +- * or more contributor license agreements. See the NOTICE file +- * distributed with this work for additional information +- * regarding copyright ownership. The ASF licenses this file +- * to you under the Apache License, Version 2.0 (the +- * "License"); you may not use this file except in compliance +- * with the License. You may obtain a copy of the License at +- * +- * http://www.apache.org/licenses/LICENSE-2.0 +- * +- * Unless required by applicable law or agreed to in writing, +- * software distributed under the License is distributed on an +- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +- * KIND, either express or implied. See the License for the +- * specific language governing permissions and limitations +- * under the License. +- */ +- +-import java.util.ArrayList; +-import java.util.Map; +-import org.apache.maven.surefire.common.junit4.JUnit4RunListener; +-import org.apache.maven.surefire.report.RunListener; +- +-import org.junit.runner.Description; +-import org.junit.runner.Result; +- +-/** +- * This class is a workaround or surefire bug +- * {@link http://jira.codehaus.org/browse/SUREFIRE-876 } +- * +- * TODO remove when surefire release with proposed bugfix is available +- */ +-public class OsgiEnabledJUnitCoreRunListener +- extends JUnit4RunListener +-{ +- private final Map classMethodCounts; +- +- /** +- * @param reporter the report manager to log testing events to +- * @param classMethodCounts A map of methods +- */ +- public OsgiEnabledJUnitCoreRunListener( RunListener reporter, Map classMethodCounts ) +- { +- super( reporter ); +- this.classMethodCounts = classMethodCounts; +- } +- +- /** +- * Called right before any tests from a specific class are run. +- * +- * @see org.junit.runner.notification.RunListener#testRunStarted(org.junit.runner.Description) +- */ +- public void testRunStarted( Description description ) +- throws Exception +- { +- fillTestCountMap( description ); +- reporter.testSetStarting( null ); // Not entirely meaningful as we can see +- } +- +- @Override +- public void testRunFinished( Result result ) +- throws Exception +- { +- reporter.testSetCompleted( null ); +- } +- +- private void fillTestCountMap( Description description ) +- { +- final ArrayList children = description.getChildren(); +- +- TestSet testSet = new TestSet( description ); +- String itemTestClassName = null; +- for ( Description item : children ) +- { +- if ( item.isTest() && item.getMethodName() != null ) +- { +- testSet.incrementTestMethodCount(); +- if ( itemTestClassName == null ) +- { +- itemTestClassName = item.getClassName(); +- } +- } +- else if ( item.getChildren().size() > 0 ) +- { +- fillTestCountMap( item ); +- } +- else +- { +- classMethodCounts.put( item.getClassName(), testSet ); +- } +- } +- if ( itemTestClassName != null ) +- { +- classMethodCounts.put( itemTestClassName, testSet ); +- } +- } +- +-} 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 1bdb8cb..d510010 100644 +index 9c418b3..92eaa7f 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 +@@ -4,8 +4,10 @@ Require-Bundle: org.eclipse.osgi;bundle-version="3.2.2", + org.eclipse.core.runtime;bundle-version="3.2.0" + 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 +- jars/surefire-booter-2.10.jar, +- jars/surefire-api-2.10.jar ++ jars/surefire-booter-2.12.3.jar, ++ jars/surefire-api-2.12.3.jar, ++ jars/maven-surefire-common-2.12.3.jar, ++ jars/plexus-utils-3.0.jar Bundle-Version: 0.16.0.qualifier 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 87f1f23..b6040a5 100644 +index 9582aef..ef1cbcc 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 @@ - org.codehaus.plexus - plexus-utils - ${plexusUtilsVersion} -+ -+ +@@ -52,6 +52,16 @@ + surefire-booter + ${surefire-version} + + + org.apache.maven.surefire + maven-surefire-common + ${surefire-version} -+ - ++ ++ ++ org.codehaus.plexus ++ plexus-utils ++ 3.0 ++ + 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 791221b..dcd1244 100644 +index 791221b..736e4a7 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 -@@ -27,13 +27,14 @@ import java.util.Set; +@@ -18,20 +18,25 @@ import java.io.IOException; + import java.net.URL; + import java.util.ArrayList; + import java.util.Arrays; ++import java.util.Collections; + import java.util.Enumeration; + import java.util.List; + import java.util.Map; + import java.util.Properties; + import java.util.Set; + ++import org.apache.maven.plugin.surefire.StartupReportConfiguration; ++import org.apache.maven.plugin.surefire.report.DefaultReporterFactory; import org.apache.maven.surefire.booter.ClassLoaderConfiguration; ++import org.apache.maven.surefire.booter.ForkedBooter; import org.apache.maven.surefire.booter.ProviderConfiguration; ++import org.apache.maven.surefire.booter.ProviderFactory; import org.apache.maven.surefire.booter.StartupConfiguration; -import org.apache.maven.surefire.booter.StartupReportConfiguration; -import org.apache.maven.surefire.booter.SurefireStarter; -+import org.apache.maven.plugin.surefire.StartupReportConfiguration; -+import org.apache.maven.plugin.surefire.InPluginVMSurefireStarter; import org.apache.maven.surefire.report.ReporterConfiguration; ++import org.apache.maven.surefire.report.ReporterFactory; import org.apache.maven.surefire.suite.RunResult; import org.apache.maven.surefire.testset.DirectoryScannerParameters; ++import org.apache.maven.surefire.testset.RunOrderParameters; import org.apache.maven.surefire.testset.TestRequest; import org.apache.maven.surefire.util.RunOrder; -+import org.apache.maven.surefire.testset.RunOrderParameters; import org.eclipse.core.runtime.CoreException; - import org.eclipse.core.runtime.IStatus; - import org.eclipse.core.runtime.Status; -@@ -64,22 +65,22 @@ public class OsgiSurefireBooter { +@@ -55,7 +60,7 @@ public class OsgiSurefireBooter { + List includes = getIncludesExcludes(testProps.getProperty("includes")); + List excludes = getIncludesExcludes(testProps.getProperty("excludes")); + +- String forkMode = "never"; ++ boolean forkRequested = true; + boolean inForkedVM = true; + boolean trimStacktrace = true; + boolean useSystemClassloader = false; +@@ -64,28 +69,33 @@ public class OsgiSurefireBooter { boolean printSummary = true; boolean disableXmlReport = false; ClassLoader testClassLoader = getBundleClassLoader(plugin); - ClassLoader surefireClassLoader = SurefireStarter.class.getClassLoader(); -+ ClassLoader surefireClassLoader = InPluginVMSurefireStarter.class.getClassLoader(); ++ ClassLoader surefireClassLoader = ForkedBooter.class.getClassLoader(); TychoClasspathConfiguration classPathConfig = new TychoClasspathConfiguration(testClassLoader, surefireClassLoader); StartupConfiguration startupConfiguration = new StartupConfiguration(provider, classPathConfig, - new ClassLoaderConfiguration(useSystemClassloader, useManifestOnlyJar), forkMode, inForkedVM); +- new ClassLoaderConfiguration(useSystemClassloader, useManifestOnlyJar), forkMode, inForkedVM); ++ new ClassLoaderConfiguration(useSystemClassloader, useManifestOnlyJar), forkRequested, inForkedVM); DirectoryScannerParameters dirScannerParams = new DirectoryScannerParameters(testClassesDir, includes, - excludes, failIfNoTests, RunOrder.FILESYSTEM); -+ excludes, null, failIfNoTests, RunOrder.FILESYSTEM.name()); ++ excludes, Collections.emptyList(), failIfNoTests, RunOrder.FILESYSTEM.toString()); ReporterConfiguration reporterConfig = new ReporterConfiguration(reportsDir, trimStacktrace); TestRequest testRequest = new TestRequest(null, testClassesDir, null); - ProviderConfiguration providerConfiguration = new ProviderConfiguration(dirScannerParams, failIfNoTests, -+ ProviderConfiguration providerConfiguration = new ProviderConfiguration(dirScannerParams, RunOrderParameters.DEFAULT(), failIfNoTests, - reporterConfig, null, testRequest, extractProviderProperties(testProps), null); +- reporterConfig, null, testRequest, extractProviderProperties(testProps), null); ++ ProviderConfiguration providerConfiguration = new ProviderConfiguration(dirScannerParams, ++ RunOrderParameters.DEFAULT(), failIfNoTests, reporterConfig, null, testRequest, ++ extractProviderProperties(testProps), null); StartupReportConfiguration startupReportConfig = new StartupReportConfiguration(useFile, printSummary, StartupReportConfiguration.PLAIN_REPORT_FORMAT, redirectTestOutputToFile, disableXmlReport, reportsDir, - trimStacktrace); - SurefireStarter surefireStarter = new SurefireStarter(startupConfiguration, providerConfiguration, +- startupReportConfig); + trimStacktrace, null, "TESTHASH", false); -+ InPluginVMSurefireStarter surefireStarter = new InPluginVMSurefireStarter(startupConfiguration, providerConfiguration, - startupReportConfig); ++ ++ RunResult result = ProviderFactory.invokeProvider(null, testClassLoader, surefireClassLoader, ++ createReporterFactory(startupReportConfig), providerConfiguration, false, startupConfiguration, true); - RunResult result = surefireStarter.runSuitesInProcess(); -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 { +- RunResult result = surefireStarter.runSuitesInProcess(); + return result.getForkedProcessCode(); } - @Override -+ public ClassLoader createInprocSurefireClassLoader(ClassLoader parent) throws SurefireExecutionException { -+ return surefireClassLoader; ++ private static ReporterFactory createReporterFactory(StartupReportConfiguration startupReportConfig) { ++ return new DefaultReporterFactory(startupReportConfig); + } + -+ @Override - public ClassLoader createTestClassLoader() throws SurefireExecutionException { - return testClassLoader; - } + /* + * See TestMojo#mergeProviderProperties + */ +diff --git a/tycho-surefire/pom.xml b/tycho-surefire/pom.xml +index fe415d7..a3ff67f 100644 +--- a/tycho-surefire/pom.xml ++++ b/tycho-surefire/pom.xml +@@ -26,7 +26,7 @@ + Tycho Surefire Parent (Incubation) + + +- 2.10 ++ 2.12.3 + + + +diff --git a/tycho-surefire/tycho-surefire-plugin/pom.xml b/tycho-surefire/tycho-surefire-plugin/pom.xml +index a9e2f1d..e24eb32 100644 +--- a/tycho-surefire/tycho-surefire-plugin/pom.xml ++++ b/tycho-surefire/tycho-surefire-plugin/pom.xml +@@ -96,5 +96,10 @@ + surefire-api + ${surefire-version} + ++ ++ org.apache.maven.surefire ++ maven-surefire-common ++ ${surefire-version} ++ + + 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 77288dd..9cc2e49 100644 +index 77288dd..74efa24 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 -@@ -670,7 +670,7 @@ public class TestMojo extends AbstractMojo { +@@ -18,6 +18,7 @@ import java.io.IOException; + import java.net.MalformedURLException; + import java.util.ArrayList; + import java.util.Arrays; ++import java.util.Collections; + import java.util.List; + import java.util.Map; + import java.util.Properties; +@@ -33,9 +34,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; ++import org.apache.maven.plugin.surefire.util.DirectoryScanner; + import org.apache.maven.project.MavenProject; + import org.apache.maven.repository.RepositorySystem; +-import org.apache.maven.surefire.suite.RunResult; ++import org.apache.maven.surefire.util.DefaultScanResult; + import org.apache.maven.toolchain.Toolchain; + import org.apache.maven.toolchain.ToolchainManager; + import org.codehaus.plexus.util.FileUtils; +@@ -626,6 +628,27 @@ public class TestMojo extends AbstractMojo { + providerProperties.put("perCoreThreadCount", String.valueOf(perCoreThreadCount)); + providerProperties.put("useUnlimitedThreads", String.valueOf(useUnlimitedThreads)); + } ++ ++ List defaultIncludes = Arrays.asList("**/Test*.class", "**/*Test.class", "**/*TestCase.class"); ++ List defaultExcludes = Arrays.asList("**/Abstract*Test.class", "**/Abstract*TestCase.class", "**/*$*"); ++ List includeList; ++ if (test != null) { ++ String test = this.test; ++ test = test.replace('.', '/'); ++ test = test.endsWith(".class") ? test : test + ".class"; ++ test = test.startsWith("**/") ? test : "**/" + test; ++ includeList = Collections.singletonList(test); ++ } else if (testClass != null) { ++ includeList = Collections.singletonList(testClass.replace('.', '/') + ".class"); ++ } else if (includes != null) { ++ includeList = includes; ++ } else { ++ includeList = defaultIncludes; ++ } ++ DirectoryScanner scanner = new DirectoryScanner(testClassesDirectory, includeList, excludes != null ? excludes ++ : defaultExcludes, Collections. emptyList()); ++ DefaultScanResult scanResult = scanner.scan(); ++ scanResult.writeTo(providerProperties); + for (Map.Entry entry : providerProperties.entrySet()) { + surefireProps.put("__provider." + entry.getKey(), entry.getValue()); + } +@@ -670,7 +693,7 @@ public class TestMojo extends AbstractMojo { case 0: getLog().info("All tests passed!"); break; - case RunResult.NO_TESTS: -+ case 254: ++ case 254/* RunResult.NO_TESTS */: String message = "No tests found."; if (failIfNoTests) { throw new MojoFailureException(message); -@@ -678,7 +678,7 @@ public class TestMojo extends AbstractMojo { +@@ -678,7 +701,7 @@ public class TestMojo extends AbstractMojo { getLog().warn(message); } break; - case RunResult.FAILURE: -+ case 255: ++ case 255/* RunResult.FAILURE */: String errorMessage = "There are test failures.\n\nPlease refer to " + reportsDirectory + " for the individual test results."; if (testFailureIgnore) { +diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit47Provider.java b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit47Provider.java +index 8358883..625b6fc 100644 +--- a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit47Provider.java ++++ b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit47Provider.java +@@ -44,7 +44,7 @@ public class JUnit47Provider extends AbstractJUnitProvider { + } + + public String getSurefireProviderClassName() { +- return "org.apache.maven.surefire.junitcore.OsgiEnabledJUnitCoreProvider"; ++ return "org.apache.maven.surefire.junitcore.JUnitCoreProvider"; + } + + public Version getVersion() { -- -1.7.11.2 +1.7.11.4 diff --git a/tycho-use-custom-resolver.patch b/tycho-use-custom-resolver.patch index 975d3c5..6f3160e 100644 --- a/tycho-use-custom-resolver.patch +++ b/tycho-use-custom-resolver.patch @@ -1,4 +1,4 @@ -From 3f23b14c4853e12d023b1e5a1a330997d034274d Mon Sep 17 00:00:00 2001 +From 301845a76668cd327760b726dfc88ddc1a3b1b50 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. @@ -24,15 +24,15 @@ Change-Id: Ia1ece07ece2412bc4a88901631f3f651ad2b634b .../tycho/p2/target/TargetDefinitionResolver.java | 10 ++-- .../tycho/p2/target/TargetPlatformBuilderImpl.java | 55 ++++++++++++++++++++-- .../core/maven/TychoMavenLifecycleParticipant.java | 16 +++++++ - .../tycho/core/osgitools/AbstractTychoProject.java | 12 ++++- - .../tycho/core/osgitools/OsgiBundleProject.java | 42 ++++++++++++++++- + .../tycho/core/osgitools/AbstractTychoProject.java | 24 ++++++++++ + .../tycho/core/osgitools/OsgiBundleProject.java | 29 +++++++++++- .../DefaultTargetPlatformConfigurationReader.java | 5 +- - .../tycho/osgi/runtime/TychoP2RuntimeLocator.java | 15 ++++++ + .../osgi/runtime/TychoOsgiRuntimeLocator.java | 15 ++++++ .../p2/resolver/P2TargetPlatformResolver.java | 10 ++++ - 8 files changed, 153 insertions(+), 12 deletions(-) + 8 files changed, 154 insertions(+), 10 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 5fdc6a1..838e267 100644 +index 5cc8718..5513dda 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; @@ -43,7 +43,7 @@ index 5fdc6a1..838e267 100644 import org.eclipse.equinox.p2.core.IProvisioningAgent; import org.eclipse.equinox.p2.core.ProvisionException; import org.eclipse.equinox.p2.metadata.IInstallableUnit; -@@ -103,9 +104,12 @@ public class TargetDefinitionResolver { +@@ -104,9 +105,12 @@ public class TargetDefinitionResolver { List metadataRepositories = new ArrayList(); for (Repository repository : iuLocationDefinition.getRepositories()) { @@ -60,7 +60,7 @@ index 5fdc6a1..838e267 100644 IQueryable locationUnits = new CompoundQueryable( 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 fa1cfab..489903e 100644 +index a1be14a..c4fc948 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 @@ -38,6 +38,9 @@ import org.eclipse.equinox.p2.core.IProvisioningAgent; @@ -73,7 +73,7 @@ index fa1cfab..489903e 100644 import org.eclipse.equinox.p2.query.IQueryResult; import org.eclipse.equinox.p2.query.QueryUtil; import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository; -@@ -223,6 +226,12 @@ public class TargetPlatformBuilderImpl implements TargetPlatformBuilder { +@@ -231,6 +234,12 @@ public class TargetPlatformBuilderImpl implements TargetPlatformBuilder { IMetadataRepository metadataRepository = null; IArtifactRepository artifactRepository = null; @@ -86,7 +86,7 @@ index fa1cfab..489903e 100644 try { remoteRepositoryIdManager.addMapping(location.getId(), location.getURL()); -@@ -359,12 +368,48 @@ public class TargetPlatformBuilderImpl implements TargetPlatformBuilder { +@@ -367,12 +376,48 @@ public class TargetPlatformBuilderImpl implements TargetPlatformBuilder { result.addAll(contentPart.getUnits()); } @@ -141,7 +141,7 @@ index fa1cfab..489903e 100644 if (logger.isDebugEnabled()) { IQueryResult locallyInstalledIUs = localMetadataRepository.query(QueryUtil.ALL_UNITS, 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 0dd2fd4..15669a6 100644 +index 3efb896..329893a 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 @@ @@ -149,10 +149,10 @@ index 0dd2fd4..15669a6 100644 import java.io.File; +import java.io.IOException; - import java.util.HashSet; - import java.util.List; - import java.util.Set; -@@ -55,6 +56,21 @@ public class TychoMavenLifecycleParticipant extends AbstractMavenLifecyclePartic + import java.util.ArrayList; + import java.util.Arrays; + import java.util.Collections; +@@ -73,6 +74,21 @@ public class TychoMavenLifecycleParticipant extends AbstractMavenLifecyclePartic registerExecutionListener(session); configureComponents(session); @@ -175,33 +175,81 @@ index 0dd2fd4..15669a6 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 283770a..c642392 100644 +index 695133d..29fb84c 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 -@@ -98,7 +98,17 @@ public abstract class AbstractTychoProject extends AbstractLogEnabled implements - } +@@ -20,6 +20,9 @@ import org.eclipse.tycho.artifacts.TargetPlatform; + import org.eclipse.tycho.core.TargetPlatformConfiguration; + import org.eclipse.tycho.core.TychoConstants; + import org.eclipse.tycho.core.TychoProject; ++import org.eclipse.tycho.core.ee.ExecutionEnvironmentUtils; ++import org.eclipse.tycho.core.ee.UnknownEnvironmentException; ++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 - try { -- return ExecutionEnvironmentUtils.getExecutionEnvironment(profile); -+ ExecutionEnvironment ee = ExecutionEnvironmentUtils.getExecutionEnvironment(profile); + String configuredForcedProfile = tpConfiguration.getExecutionEnvironment(); + if (configuredForcedProfile != null) { ++ overrideToAtLeastJavaSE16(configuredForcedProfile); + sink.overrideProfileConfiguration(configuredForcedProfile, + "target-platform-configuration "); + } + + String configuredDefaultProfile = tpConfiguration.getExecutionEnvironmentDefault(); + if (configuredDefaultProfile != null) { ++ overrideToAtLeastJavaSE16(configuredDefaultProfile); + sink.setProfileConfiguration(configuredDefaultProfile, + "target-platform-configuration "); + } + } + ++ public String overrideToAtLeastJavaSE16 (String profile) { ++ try { ++ ExecutionEnvironment ee = ExecutionEnvironmentUtils.getExecutionEnvironment(profile); + -+ if (System.getProperty("maven.local.mode") != null) { -+ // EE must be at least JavaSE-1.6 -+ final ExecutionEnvironment javaSE16 = ExecutionEnvironmentUtils.getExecutionEnvironment("JavaSE-1.6"); -+ if (ee.compareTo(javaSE16) < 0) { -+ ee = javaSE16; -+ } ++ if (System.getProperty("maven.local.mode") != null) { ++ // EE must be at least JavaSE-1.6 ++ final ExecutionEnvironment javaSE16 = ExecutionEnvironmentUtils.getExecutionEnvironment("JavaSE-1.6"); ++ if (! ee.isCompatibleCompilerTargetLevel(javaSE16.getCompilerTargetLevel())) { ++ ee = javaSE16; + } ++ } + -+ return ee; - } catch (UnknownEnvironmentException e) { - // can't happen, ee is validated during configuration parsing - } ++ return ee.getProfileName(); ++ } catch (UnknownEnvironmentException e) { ++ // can't happen, ee is validated during configuration parsing ++ 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 c4b783e..e83dd72 100644 +index fb73469..efe97ae 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 -@@ -525,12 +525,50 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro +@@ -45,7 +45,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; ++import org.eclipse.tycho.core.ee.ExecutionEnvironmentUtils; + import org.eclipse.tycho.core.ee.StandardExecutionEnvironment; ++import org.eclipse.tycho.core.ee.UnknownEnvironmentException; + import org.eclipse.tycho.core.ee.shared.ExecutionEnvironment; + import org.eclipse.tycho.core.ee.shared.ExecutionEnvironmentConfiguration; + import org.eclipse.tycho.core.facade.BuildPropertiesParser; +@@ -492,6 +494,7 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro + String pdeProfile = getEclipsePluginProject(DefaultReactorProject.adapt(project)).getBuildProperties() + .getJreCompilationProfile(); + if (pdeProfile != null) { ++ pdeProfile = overrideToAtLeastJavaSE16(pdeProfile); + sink.setProfileConfiguration(pdeProfile.trim(), "build.properties"); + + } else { +@@ -509,7 +512,31 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro if (envs.isEmpty()) { return null; } @@ -216,7 +264,7 @@ index c4b783e..e83dd72 100644 + final ExecutionEnvironment javaSE16 = ExecutionEnvironmentUtils.getExecutionEnvironment("JavaSE-1.6"); + while (!envs.isEmpty()) { + tmp = Collections.min(envs); -+ if (tmp.compareTo(javaSE16) >= 0) { ++ if (tmp.isCompatibleCompilerTargetLevel(javaSE16.getCompilerTargetLevel())) { + manifestMinimalEE = tmp; + break; + } @@ -233,32 +281,12 @@ index c4b783e..e83dd72 100644 + return manifestMinimalEE; } - protected ExecutionEnvironment getExecutionEnvironment(MavenProject project, String profile) { - try { -- return ExecutionEnvironmentUtils.getExecutionEnvironment(profile); -+ ExecutionEnvironment ee = ExecutionEnvironmentUtils.getExecutionEnvironment(profile); -+ -+ 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; - } catch (UnknownEnvironmentException e) { - throw new RuntimeException("Unknown execution environment specified in build.properties of project " - + project, e); + } diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/DefaultTargetPlatformConfigurationReader.java b/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/DefaultTargetPlatformConfigurationReader.java -index c2997bc..fafb77e 100644 +index e5efab5..8628d7a 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/DefaultTargetPlatformConfigurationReader.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/DefaultTargetPlatformConfigurationReader.java -@@ -66,7 +66,10 @@ public class DefaultTargetPlatformConfigurationReader { +@@ -64,7 +64,10 @@ public class DefaultTargetPlatformConfigurationReader { + configuration.toString()); } @@ -270,10 +298,10 @@ index c2997bc..fafb77e 100644 setTargetPlatformResolver(result, configuration); -diff --git a/tycho-core/src/main/java/org/eclipse/tycho/osgi/runtime/TychoP2RuntimeLocator.java b/tycho-core/src/main/java/org/eclipse/tycho/osgi/runtime/TychoP2RuntimeLocator.java -index ff4c14a..de02644 100644 ---- a/tycho-core/src/main/java/org/eclipse/tycho/osgi/runtime/TychoP2RuntimeLocator.java -+++ b/tycho-core/src/main/java/org/eclipse/tycho/osgi/runtime/TychoP2RuntimeLocator.java +diff --git a/tycho-core/src/main/java/org/eclipse/tycho/osgi/runtime/TychoOsgiRuntimeLocator.java b/tycho-core/src/main/java/org/eclipse/tycho/osgi/runtime/TychoOsgiRuntimeLocator.java +index 9935c5f..0885aea 100644 +--- a/tycho-core/src/main/java/org/eclipse/tycho/osgi/runtime/TychoOsgiRuntimeLocator.java ++++ b/tycho-core/src/main/java/org/eclipse/tycho/osgi/runtime/TychoOsgiRuntimeLocator.java @@ -22,6 +22,7 @@ import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.ArtifactResolutionException; import org.apache.maven.artifact.resolver.ArtifactResolutionRequest; @@ -288,9 +316,9 @@ index ff4c14a..de02644 100644 import org.eclipse.tycho.locking.facade.FileLocker; +import org.sonatype.aether.util.artifact.DefaultArtifact; - @Component(role = EquinoxRuntimeLocator.class) - public class TychoP2RuntimeLocator implements EquinoxRuntimeLocator { -@@ -189,6 +191,19 @@ public class TychoP2RuntimeLocator implements EquinoxRuntimeLocator { + /** + * Implementation of {@link org.eclipse.sisu.equinox.embedder.EquinoxRuntimeLocator} for Tycho's +@@ -201,6 +203,19 @@ public class TychoOsgiRuntimeLocator implements EquinoxRuntimeLocator { Artifact artifact = repositorySystem.createArtifact(dependency.getGroupId(), dependency.getArtifactId(), dependency.getVersion(), dependency.getType()); @@ -311,10 +339,10 @@ index ff4c14a..de02644 100644 request.setArtifact(artifact); request.setResolveRoot(true).setResolveTransitively(false); 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 4db1bd4..b45a4ea 100644 +index 0d4d61e..ef3264d 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 -@@ -193,6 +193,16 @@ public class P2TargetPlatformResolver extends AbstractTargetPlatformResolver imp +@@ -191,6 +191,16 @@ public class P2TargetPlatformResolver extends AbstractTargetPlatformResolver imp tpBuilder.setProjectLocation(project.getBasedir()); tpBuilder.setIncludePackedArtifacts(configuration.isIncludePackedArtifacts()); diff --git a/tycho.spec b/tycho.spec index 9b3dbaf..fc762d8 100644 --- a/tycho.spec +++ b/tycho.spec @@ -1,5 +1,5 @@ %global bootstrap 1 -%global sha df2c3591ae0e641a8d12c13ca9c1058eaf8439b2 +%global sha d7f8850f746dd72e0a97c1fdf32c06ce794fb83d %if %{bootstrap} %global snap %{nil} @@ -11,7 +11,7 @@ Name: tycho Version: 0.16.0 -Release: 8.df2c35%{?dist} +Release: 7.1.d7f885%{?dist} Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven Group: Development/Libraries @@ -29,9 +29,9 @@ Source2: depmap.xml Source3: copy-platform-all Patch0: %{name}-fix-build.patch -Patch1: %{name}-fix-surefire.patch -# Upstream builds against maven-surefire 2.10 but in rawhide we have 2.12 -Patch2: %{name}-maven-surefire.patch +# Upstream builds against maven-surefire 2.12.3 +Patch1: %{name}-maven-surefire.patch +Patch2: %{name}-fix-surefire.patch Patch3: %{name}-use-custom-resolver.patch # Set some temporary build version so that the bootstrapped build has # a different version from the nonbootstrapped. Otherwise there will @@ -130,7 +130,7 @@ popd %build export MAVEN_OPTS="$MAVEN_OPTS -XX:MaxPermSize=256m" -mvn-rpmbuild -Dmaven.local.depmap.file=%{SOURCE2} -Dmaven.test.skip=true install javadoc:aggregate +mvn-rpmbuild -Dmaven.local.depmap.file=%{SOURCE2} -DskipTychoVersionCheck -Dmaven.test.skip=true install javadoc:aggregate %install @@ -195,7 +195,8 @@ install -pm 755 %{SOURCE3} $RPM_BUILD_ROOT%{_javadir}/%{name}/copy-platform-all %{_javadocdir}/%{name} %changelog -* Wed Oct 3 2012 Krzysztof Daniel 0.16.0-7.1.df2c35 +* Wed Oct 3 2012 Roland Grunberg 0.16.0-7.1.d7f885 +- Update to latest 0.16.0 SNAPSHOT. - First attempts to build without cyclic dependency to JDT. * Mon Aug 27 2012 Roland Grunberg 0.16.0-7.df2c35