Update to latest tycho snapshot

Bootstrap build
This commit is contained in:
Mat Booth 2018-05-02 11:23:15 +01:00
parent d98b1b8c51
commit e13cf1d478
14 changed files with 353 additions and 1069 deletions

3
.gitignore vendored
View File

@ -11,3 +11,6 @@ maven-repo.tar.xz
/fedoraproject-p2-*.tar.xz
/eclipse-bootstrap-neon.tar.xz
/eclipse-bootstrap-oxygen.tar.xz
/fedoraproject-p2-290f67a4c717599b2f5166ea89aa5365571314b1.tar.gz
/tycho-d9ce75d316caae823be78527b7b690182b602895.tar.gz
/eclipse-bootstrap-photon.tar.xz

View File

@ -0,0 +1,82 @@
--- tycho-core/src/main/java/org/eclipse/tycho/core/locking/FileLockServiceImpl.java.orig 2018-04-30 14:30:10.281927855 +0100
+++ tycho-core/src/main/java/org/eclipse/tycho/core/locking/FileLockServiceImpl.java 2018-04-30 14:30:58.973755768 +0100
@@ -29,7 +29,7 @@
private Location anyLocation;
public FileLockServiceImpl() {
- anyLocation = new BasicLocation(null, null, false, null, new ConfigValues(new HashMap<String, String>()),
+ anyLocation = new BasicLocation(null, null, false, null, new ConfigValues(new HashMap<String, String>(), new HashMap<Throwable, Integer>()),
new EquinoxContainer(null), new AtomicBoolean(false));
}
--- tycho-core/pom.xml.orig 2018-04-30 14:24:51.873051601 +0100
+++ tycho-core/pom.xml 2018-04-30 14:25:46.426859073 +0100
@@ -123,7 +123,7 @@
<artifactId>plexus-archiver</artifactId>
</dependency>
<dependency>
- <groupId>org.eclipse.platform</groupId>
+ <groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.osgi.compatibility.state</artifactId>
</dependency>
<dependency>
--- sisu-equinox/sisu-equinox-embedder/pom.xml.orig 2018-04-30 14:25:12.892977419 +0100
+++ sisu-equinox/sisu-equinox-embedder/pom.xml 2018-04-30 14:25:46.427859069 +0100
@@ -30,7 +30,7 @@
<artifactId>plexus-component-annotations</artifactId>
</dependency>
<dependency>
- <groupId>org.eclipse.platform</groupId>
+ <groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.osgi</artifactId>
</dependency>
<dependency>
--- tycho-compiler-jdt/pom.xml.orig 2018-04-30 14:57:02.459229391 +0100
+++ tycho-compiler-jdt/pom.xml 2018-04-30 14:56:08.265420993 +0100
@@ -29,7 +29,7 @@
<dependencies>
<dependency>
- <groupId>org.eclipse.jdt</groupId>
+ <groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
</dependency>
<dependency>
@@ -47,7 +47,7 @@
<artifactId>maven-core</artifactId>
</dependency>
<dependency>
- <groupId>org.eclipse.jdt</groupId>
+ <groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.jdt.compiler.apt</artifactId>
</dependency>
<dependency>
--- pom.xml.orig 2018-04-30 14:24:58.019029911 +0100
+++ pom.xml 2018-04-30 14:56:08.264420997 +0100
@@ -217,22 +217,22 @@
<version>3.1</version>
</dependency>
<dependency>
- <groupId>org.eclipse.platform</groupId>
+ <groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<version>${equinoxVersionMaven}</version>
</dependency>
<dependency>
- <groupId>org.eclipse.platform</groupId>
+ <groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.osgi.compatibility.state</artifactId>
<version>${equinoxCompatVersionMaven}</version>
</dependency>
<dependency>
- <groupId>org.eclipse.jdt</groupId>
+ <groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
<version>${jdtVersionMaven}</version>
</dependency>
<dependency>
- <groupId>org.eclipse.jdt</groupId>
+ <groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.jdt.compiler.apt</artifactId>
<version>${jdtAptVersionMaven}</version>
</dependency>

View File

@ -0,0 +1,176 @@
From d4d161e7ccfb21503e906229a37000eb9a821284 Mon Sep 17 00:00:00 2001
From: Jan Sievers <jan.sievers@sap.com>
Date: Tue, 4 Sep 2012 16:02:52 +0200
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
through Bundle-ClassPath. As a result, it must copy over and include
system jars in its Bundle-ClassPath. We use Fedora system jars to
satisfy these dependencies but even these jars differ slightly in terms
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: I9ef0239eed887fa47c380efcdce968934c788c9f
---
pom.xml | 2 +-
.../META-INF/MANIFEST.MF | 5 ++--
.../org.eclipse.tycho.surefire.junit/pom.xml | 5 ++++
.../META-INF/MANIFEST.MF | 5 +++-
.../org.eclipse.tycho.surefire.junit4/pom.xml | 10 ++++++++
.../META-INF/MANIFEST.MF | 8 ++++---
.../org.eclipse.tycho.surefire.junit47/pom.xml | 10 ++++++++
.../META-INF/MANIFEST.MF | 7 +++---
.../org.eclipse.tycho.surefire.osgibooter/pom.xml | 5 ++++
.../surefire/osgibooter/OsgiSurefireBooter.java | 20 ++++++++++------
tycho-surefire/pom.xml | 2 +-
.../java/org/eclipse/tycho/surefire/TestMojo.java | 27 +++++++++++++++++++---
12 files changed, 85 insertions(+), 21 deletions(-)
diff --git a/pom.xml b/pom.xml
index c43cc8d..6e5fde4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -88,7 +88,7 @@
<pluginToolsVersion>3.3</pluginToolsVersion>
<maven-version>3.0</maven-version>
<!-- NOTE: when updating surefire version, double-check Import-Package statements generated by bnd-maven-plugin and possibly adapt instructions in various bnd.bnd files -->
- <surefire-version>2.19.1</surefire-version>
+ <surefire-version>2.21.0</surefire-version>
<!-- dependencies to Eclipse artifacts deployed by tycho-releng/ -->
<equinoxVersion>3.12.100</equinoxVersion>
diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml
index f99c319..0224cc6 100644
--- a/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml
+++ b/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml
@@ -36,6 +36,11 @@
<artifactId>surefire-junit3</artifactId>
<version>${surefire-version}</version>
</artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>common-junit3</artifactId>
+ <version>${surefire-version}</version>
+ </artifactItem>
</artifactItems>
</configuration>
</plugin>
diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml
index 9628b06..2a09e91 100644
--- a/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml
+++ b/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml
@@ -36,6 +36,16 @@
<artifactId>surefire-junit4</artifactId>
<version>${surefire-version}</version>
</artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>common-junit3</artifactId>
+ <version>${surefire-version}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>common-junit4</artifactId>
+ <version>${surefire-version}</version>
+ </artifactItem>
</artifactItems>
</configuration>
</plugin>
diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml
index dc49a46..db453ac 100644
--- a/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml
+++ b/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml
@@ -46,6 +46,16 @@
<artifactId>surefire-grouper</artifactId>
<version>${surefire-version}</version>
</artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>common-junit4</artifactId>
+ <version>${surefire-version}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>common-junit3</artifactId>
+ <version>${surefire-version}</version>
+ </artifactItem>
</artifactItems>
</configuration>
</plugin>
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 991edc1..83732d5 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,9 +5,11 @@ Require-Bundle: org.eclipse.osgi;bundle-version="3.2.2",
Eclipse-AutoStart: true
Bundle-Version: 1.2.0.qualifier
Bundle-ClassPath: .,
- jars/surefire-booter-2.19.1.jar,
- jars/surefire-api-2.19.1.jar,
- jars/maven-surefire-common-2.19.1.jar
+ jars/surefire-booter-2.21.0.jar,
+ jars/surefire-api-2.21.0.jar,
+ jars/surefire-logger-api-2.21.0.jar,
+ jars/maven-surefire-common-2.21.0.jar,
+ jars/plexus-utils-3.0.jar
Bundle-Name: Tycho Surefire OSGi Booter Eclipse Application
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 82700eb..3fbc3a3 100644
--- a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml
+++ b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml
@@ -59,6 +59,11 @@
</artifactItem>
<artifactItem>
<groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-logger-api</artifactId>
+ <version>${surefire-version}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-booter</artifactId>
<version>${surefire-version}</version>
</artifactItem>
@@ -67,6 +72,11 @@
<artifactId>maven-surefire-common</artifactId>
<version>${surefire-version}</version>
</artifactItem>
+ <artifactItem>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0</version>
+ </artifactItem>
</artifactItems>
</configuration>
</execution>
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 033766c4..fe8105b9 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
@@ -28,6 +28,7 @@ import java.util.Properties;
import java.util.Set;
import org.apache.maven.plugin.surefire.StartupReportConfiguration;
+import org.apache.maven.plugin.surefire.log.api.NullConsoleLogger;
import org.apache.maven.plugin.surefire.report.DefaultReporterFactory;
import org.apache.maven.surefire.booter.BooterConstants;
import org.apache.maven.surefire.booter.ClassLoaderConfiguration;
@@ -97,11 +98,11 @@ public class OsgiSurefireBooter {
ProviderConfiguration providerConfiguration = new ProviderConfiguration(dirScannerParams,
new RunOrderParameters(runOrder, null), failIfNoTests, reporterConfig, null, testRequest,
extractProviderProperties(testProps), null, false, Collections.<CommandLineOption> emptyList(),
- skipAfterFailureCount, Shutdown.DEFAULT);
+ skipAfterFailureCount, Shutdown.DEFAULT, 0);
StartupReportConfiguration startupReportConfig = new StartupReportConfiguration(useFile, printSummary,
StartupReportConfiguration.PLAIN_REPORT_FORMAT, redirectTestOutputToFile, disableXmlReport, reportsDir,
- trimStacktrace, null, "TESTHASH", false, rerunFailingTestsCount);
- ReporterFactory reporterFactory = new DefaultReporterFactory(startupReportConfig);
+ trimStacktrace, null, new File(reportsDir, "TESTHASH"), false, rerunFailingTestsCount, null);
+ ReporterFactory reporterFactory = new DefaultReporterFactory(startupReportConfig, new NullConsoleLogger());
// API indicates we should use testClassLoader below but surefire also tries
// to load surefire classes using this classloader
RunResult result = ProviderFactory.invokeProvider(null, createCombinedClassLoader(testPlugin), reporterFactory,

View File

@ -1,3 +1,3 @@
SHA512 (fedoraproject-p2-b8b13f9.tar.xz) = e271fbf57573b104190392adad369b03937af4f799d9696284904537ee55e49d5c9f311719669fa165f6949f484bf0583487b9c66ac5bea5bb10a18e51066def
SHA512 (org.eclipse.tycho-tycho-1.0.0.tar.xz) = 31a082931e578c03d1a7e435944c0d61b1062a99b54c25ae67a705858691855fbd163eba01642210a7a11376e53f7ffa65b29df1f41f3f2dc71771df9d13f10a
SHA512 (eclipse-bootstrap-oxygen.tar.xz) = 3d5694dd0d97334ec780c8e8df9d884f55b892e445a9afa371acb62bfb6d242a369728f7411d798a8274b2efa5c7cfbe1c7195c60e3992c88a520f9dda2fe55c
SHA512 (fedoraproject-p2-290f67a4c717599b2f5166ea89aa5365571314b1.tar.gz) = 5ddfa3e7c1dc3d64335d836d74d7325904f294e0ab1782de41a8815b09ddf42f0c47a263c3a6217626aaf293a17788d01174c327e17b192a0f451d07d5655c49
SHA512 (tycho-d9ce75d316caae823be78527b7b690182b602895.tar.gz) = 7522ecb017e8c0fac93454386f41b34751462fb26238d2e5047ecc191254d2356b70a94f5f726f547b1631a678ce310b272bf33121a756385297dfd3190059e8
SHA512 (eclipse-bootstrap-photon.tar.xz) = c18687eecd7d79bbd0722e8effc89d32a8fe31f2c9fe978cc73cfe9679d5a7fd01d8e12483404e3257d86817b7a12b4dcdfbd88316855a06d8f43da71a3c49a8

View File

@ -5,8 +5,8 @@
eclipse_bootstrap=$1
preV=$2
v="$preV-SNAPSHOT"
osgiV='3.12.0.v20170419-1339'
osgiCompatV='1.0.300.v20170419-1339'
osgiV='3.13.0.v20180428-1222'
osgiCompatV='1.1.100.v20180428-1222'
fp2V='0.0.1-SNAPSHOT'
bundles=()
bundles[0]='tycho-bundles/org.eclipse.tycho.embedder.shared'
@ -35,7 +35,7 @@ externalDeps[6]="org.eclipse.equinox.p2.director.app,org.eclipse.equinox.framewo
xtraExternalDeps[0]="org.eclipse.osgi,org.eclipse.core.runtime,org.eclipse.equinox.common,org.eclipse.equinox.p2.metadata,org.eclipse.equinox.p2.repository,org.eclipse.equinox.p2.core,org.eclipse.equinox.p2.publisher.eclipse,org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.p2.repository.tools,org.eclipse.equinox.app,slf4j.api"
reactorprojs=( 'tycho-embedder-api' 'tycho-metadata-model' 'sisu-equinox/sisu-equinox-api' 'sisu-equinox/sisu-equinox-embedder' 'tycho-core' 'tycho-packaging-plugin' 'tycho-p2/tycho-p2-facade' 'tycho-maven-plugin' 'tycho-p2/tycho-p2-repository-plugin' 'tycho-p2/tycho-p2-publisher-plugin' 'target-platform-configuration' 'tycho-artifactcomparator' 'sisu-equinox/sisu-equinox-launching' 'tycho-p2/tycho-p2-plugin' 'tycho-compiler-jdt' 'tycho-compiler-plugin' )
reactorprojs=( 'tycho-embedder-api' 'tycho-metadata-model' 'sisu-equinox/sisu-equinox-api' 'sisu-equinox/sisu-equinox-embedder' 'tycho-core' 'tycho-packaging-plugin' 'tycho-p2/tycho-p2-facade' 'tycho-maven-plugin' 'tycho-p2/tycho-p2-repository-plugin' 'tycho-p2/tycho-p2-publisher-plugin' 'target-platform-configuration' 'tycho-artifactcomparator' 'sisu-equinox/sisu-equinox-launching' 'tycho-p2/tycho-p2-plugin' 'tycho-lib-detector' 'tycho-compiler-jdt' 'tycho-compiler-plugin' )
for ((i=0; i < ${#xtraBundles[@]}; i++)) ;do
echo ''
@ -90,7 +90,7 @@ popd
for proj in ${reactorprojs[@]} ; do
isolateProject ${proj}
xmvn -B -o -e -f "${proj}/pom.xml" -Dmaven.repo.local=$(pwd)/.m2 -Dmaven.test.skip=true \
-Dmaven.compiler.source=1.7 -Dmaven.compiler.target=1.7 -Dproject.build.sourceEncoding=UTF-8 \
-Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8 -Dproject.build.sourceEncoding=UTF-8 \
clean install
unifyProject ${proj}
done

View File

@ -1,47 +1,3 @@
diff --git a/tycho-artifactcomparator/pom.xml b/tycho-artifactcomparator/pom.xml
index adfdd95..81ad821 100644
--- a/tycho-artifactcomparator/pom.xml
+++ b/tycho-artifactcomparator/pom.xml
@@ -51,6 +51,15 @@
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-metadata</artifactId>
+ <version>1.5.5</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-metadata</goal>
+ <goal>generate-test-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
</plugins>
</build>
diff --git a/tycho-compiler-jdt/pom.xml b/tycho-compiler-jdt/pom.xml
index 4c0c304..bfa9030 100644
--- a/tycho-compiler-jdt/pom.xml
+++ b/tycho-compiler-jdt/pom.xml
@@ -26,8 +26,17 @@
<build>
<plugins>
<plugin>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-metadata</artifactId>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-metadata</artifactId>
+ <version>1.5.5</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-metadata</goal>
+ <goal>generate-test-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
</plugins>
</build>
diff --git a/tycho-compiler-plugin/pom.xml b/tycho-compiler-plugin/pom.xml
index 923405d..33ce36d 100644
--- a/tycho-compiler-plugin/pom.xml
@ -70,32 +26,7 @@ diff --git a/tycho-core/pom.xml b/tycho-core/pom.xml
index 9f79a46..10628cf 100644
--- a/tycho-core/pom.xml
+++ b/tycho-core/pom.xml
@@ -59,11 +59,19 @@
</testResource>
</testResources>
<plugins>
- <plugin>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-metadata</artifactId>
- </plugin>
-
+ <plugin>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-metadata</artifactId>
+ <version>1.5.5</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-metadata</goal>
+ <goal>generate-test-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
@@ -148,12 +156,6 @@
@@ -148,12 +148,6 @@
</dependency>
<dependency>
@ -126,7 +57,7 @@ diff --git a/tycho-p2/tycho-p2-plugin/pom.xml b/tycho-p2/tycho-p2-plugin/pom.xml
index e25b6d9..7e8a7f2 100644
--- a/tycho-p2/tycho-p2-plugin/pom.xml
+++ b/tycho-p2/tycho-p2-plugin/pom.xml
@@ -53,21 +53,23 @@
@@ -53,13 +53,6 @@
<artifactId>tycho-artifactcomparator</artifactId>
<version>${project.version}</version>
</dependency>
@ -140,27 +71,6 @@ index e25b6d9..7e8a7f2 100644
</dependencies>
<build>
<plugins>
- <plugin>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-metadata</artifactId>
- </plugin>
+ <plugin>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-metadata</artifactId>
+ <version>1.5.5</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-metadata</goal>
+ <goal>generate-test-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
diff --git a/tycho-p2/tycho-p2-publisher-plugin/pom.xml b/tycho-p2/tycho-p2-publisher-plugin/pom.xml
index e52cf18..bcd8c91 100644
--- a/tycho-p2/tycho-p2-publisher-plugin/pom.xml
@ -207,27 +117,3 @@ index 0990b2d..7dd1d68 100644
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
@@ -83,10 +70,19 @@
<build>
<plugins>
- <plugin>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-metadata</artifactId>
- </plugin>
+ <plugin>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-metadata</artifactId>
+ <version>1.5.5</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-metadata</goal>
+ <goal>generate-test-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>

View File

@ -5,50 +5,8 @@ Subject: [PATCH] Fix the Tycho build to work on Fedora.
Minor fixes of limited scope needed to have Tycho building on Fedora.
Tycho upstream currently depends upon 0.15.0 when building
0.16.0-SNAPSHOT, which doesn't have reactor plugin version checking. In
Fedora we depend on the previously built version which has that version
checking. We must keep previous build version strings different to avoid
a cyclic dependency, but doing so causes the version checking to fail,
so we must provide a way to disable it. Disable by default.
Change-Id: Ic8c0514c1fa10ee53580d2654ac6a363ccd66814
---
.../eclipse/tycho/p2/target/ee/CustomEEResolutionHandler.java | 2 +-
.../src/main/java/org/eclipse/tycho/test/util/HttpServer.java | 8 ++++++--
.../tycho/core/maven/TychoMavenLifecycleParticipant.java | 4 +++-
.../eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java | 2 +-
.../org/eclipse/tycho/test/AbstractTychoIntegrationTest.java | 11 +++++------
8 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/ee/CustomEEResolutionHandler.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/ee/CustomEEResolutionHandler.java
index 7afa13e..82962f9 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/ee/CustomEEResolutionHandler.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/ee/CustomEEResolutionHandler.java
@@ -59,7 +59,7 @@ class CustomEEResolutionHandler extends ExecutionEnvironmentResolutionHandler {
String name = capability.getName();
String version = capability.getVersion().toString();
- if (JREAction.NAMESPACE_OSGI_EE.equals(namespace)) {
+ if ("osgi.ee".equals(namespace)) {
result.add(new SystemCapability(Type.OSGI_EE, name, version));
} else if (PublisherHelper.CAPABILITY_NS_JAVA_PACKAGE.equals(namespace)) {
result.add(new SystemCapability(Type.JAVA_PACKAGE, name, version));
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 b00c344..bc05c2d 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
@@ -102,7 +102,9 @@ public class TychoMavenLifecycleParticipant extends AbstractMavenLifecyclePartic
}
private void validate(List<MavenProject> projects) throws MavenExecutionException {
- validateConsistentTychoVersion(projects);
+ if (System.getProperty("tycho.enableVersionCheck") != 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 097bdeb..f90b10c 100644
--- a/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java
@ -71,6 +29,3 @@ index 097bdeb..f90b10c 100644
}
return verifier;
--
2.1.0

View File

@ -48,9 +48,9 @@ index 9658fbc..efd0a2c 100644
--- a/tycho-bundles/org.eclipse.tycho.core.shared.tests/META-INF/MANIFEST.MF
+++ b/tycho-bundles/org.eclipse.tycho.core.shared.tests/META-INF/MANIFEST.MF
@@ -7,3 +7,4 @@ Fragment-Host: org.eclipse.tycho.core.shared
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Require-Bundle: org.junit;bundle-version="4.8.2"
Bundle-Vendor: %providerName
Automatic-Module-Name: org.eclipse.tycho.core.shared.tests
+Import-Package: org.eclipse.tycho.p2.repository
diff --git a/tycho-bundles/org.eclipse.tycho.core.shared/src/main/java/org/eclipse/tycho/core/shared/MavenContext.java b/tycho-bundles/org.eclipse.tycho.core.shared/src/main/java/org/eclipse/tycho/core/shared/MavenContext.java
index d63c1f1..cd8594d 100644
@ -309,7 +309,7 @@ diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java
index 50fe92f..3044e97 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/target/TargetPlatformBundlePublisherTest.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/target/TargetPlatformBundlePublisherTest.java
@@ -31,6 +31,7 @@ import org.eclipse.tycho.p2.repository.RepositoryLayoutHelper;
@@ -32,6 +32,7 @@ import org.eclipse.tycho.p2.repository.RepositoryLayoutHelper;
import org.eclipse.tycho.repository.p2base.artifact.provider.IRawArtifactProvider;
import org.eclipse.tycho.repository.streaming.testutil.ProbeRawArtifactSink;
import org.eclipse.tycho.test.util.LogVerifier;
@ -317,7 +317,7 @@ index 50fe92f..3044e97 100644
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -56,7 +57,7 @@ public class TargetPlatformBundlePublisherTest {
@@ -57,7 +58,7 @@ public class TargetPlatformBundlePublisherTest {
logVerifier.expectNoWarnings();
localRepositoryRoot = tempFolder.getRoot();
@ -426,7 +426,7 @@ index 0195871..44a0f30 100644
this.logger = logger;
}
@@ -206,8 +208,11 @@ public class TargetPlatformBundlePublisher {
@@ -204,8 +206,11 @@ public class TargetPlatformBundlePublisher {
*/
private static class PublishedBundlesArtifactRepository extends ArtifactRepositoryBaseImpl<GAVArtifactDescriptor> {
@ -439,7 +439,7 @@ index 0195871..44a0f30 100644
}
void addPublishedArtifact(IArtifactDescriptor baseDescriptor, IArtifactFacade mavenArtifact) {
@@ -252,7 +257,7 @@ public class TargetPlatformBundlePublisher {
@@ -250,7 +255,7 @@ public class TargetPlatformBundlePublisher {
@Override
protected File internalGetArtifactStorageLocation(IArtifactDescriptor descriptor) {
MavenRepositoryCoordinates coord = toInternalDescriptor(descriptor).getMavenCoordinates();

View File

@ -1,12 +0,0 @@
--- tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/LicenseFeatureHelper.java~ 2015-06-09 14:56:22.068303547 +0200
+++ tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/LicenseFeatureHelper.java 2015-06-09 14:58:37.379329080 +0200
@@ -117,8 +117,7 @@
// mavenArchiver ignores license feature files that are also present in 'this' feature
// i.e. if there is a conflict, files from 'this' feature win
- DefaultArchivedFileSet result = new DefaultArchivedFileSet();
- result.setArchive(licenseFeature);
+ DefaultArchivedFileSet result = new DefaultArchivedFileSet(licenseFeature);
result.setIncludes(includes.toArray(new String[includes.size()]));
result.setExcludes(excludes.toArray(new String[excludes.size()]));

View File

@ -131,25 +131,24 @@ echo ${arr[@]}
}
function isolateProject () {
sed -i "/<artifactId>org.eclipse.osgi<\/artifactId>/ a <version>${osgiV}</version>" "$1/pom.xml"
sed -i "/<artifactId>org.eclipse.osgi.compatibility.state<\/artifactId>/ a <version>${osgiCompatV}</version>" "$1/pom.xml"
cp $1/pom.xml $1/pom.xml.boot
cp $1/pom.xml $1/pom.xml.bak
sed -i '/<parent>/,/<\/parent>/ d' "$1/pom.xml"
if [ $# -eq 2 ]; then
sed -i "/<modelVersion>/ a <groupId>org.eclipse.tycho<\/groupId><version>$2<\/version>" "$1/pom.xml"
else
sed -i "/<modelVersion>/ a <groupId>org.eclipse.tycho<\/groupId><version>${v}<\/version>" "$1/pom.xml"
fi
sed -i -e "/<artifactId>org.eclipse.osgi</ a <version>${osgiV}</version>" \
-e "/<artifactId>org.eclipse.osgi.compatibility.state</ a <version>${osgiCompatV}</version>" \
-e '/<parent>/,/<\/parent>/ d' "$1/pom.xml"
if ! grep -q generate-metadata "$1/pom.xml" ; then
sed -i -e "/<artifactId>plexus-component-metadata</ a <version>1.5.5</version><executions><execution><goals><goal>generate-metadata</goal></goals></execution></executions>" "$1/pom.xml"
fi
if [ $# -eq 2 ]; then
sed -i "/<modelVersion>/ a <groupId>org.eclipse.tycho<\/groupId><version>$2<\/version>" "$1/pom.xml"
else
sed -i "/<modelVersion>/ a <groupId>org.eclipse.tycho<\/groupId><version>${v}<\/version>" "$1/pom.xml"
fi
}
function unifyProject () {
cp $1/pom.xml.bak $1/pom.xml
sed -i "/<version>${osgiV}<\/version>/ d" "$1/pom.xml"
sed -i "/<version>${osgiCompatV}<\/version>/ d" "$1/pom.xml"
cp $1/pom.xml.boot $1/pom.xml
}
function readBSN () {

View File

@ -1,389 +0,0 @@
From d4d161e7ccfb21503e906229a37000eb9a821284 Mon Sep 17 00:00:00 2001
From: Jan Sievers <jan.sievers@sap.com>
Date: Tue, 4 Sep 2012 16:02:52 +0200
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
through Bundle-ClassPath. As a result, it must copy over and include
system jars in its Bundle-ClassPath. We use Fedora system jars to
satisfy these dependencies but even these jars differ slightly in terms
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: I9ef0239eed887fa47c380efcdce968934c788c9f
---
pom.xml | 2 +-
.../META-INF/MANIFEST.MF | 5 ++--
.../org.eclipse.tycho.surefire.junit/pom.xml | 5 ++++
.../META-INF/MANIFEST.MF | 5 +++-
.../org.eclipse.tycho.surefire.junit4/pom.xml | 10 ++++++++
.../META-INF/MANIFEST.MF | 8 ++++---
.../org.eclipse.tycho.surefire.junit47/pom.xml | 10 ++++++++
.../META-INF/MANIFEST.MF | 7 +++---
.../org.eclipse.tycho.surefire.osgibooter/pom.xml | 5 ++++
.../surefire/osgibooter/OsgiSurefireBooter.java | 20 ++++++++++------
tycho-surefire/pom.xml | 2 +-
.../java/org/eclipse/tycho/surefire/TestMojo.java | 27 +++++++++++++++++++---
12 files changed, 85 insertions(+), 21 deletions(-)
diff --git a/pom.xml b/pom.xml
index c43cc8d..6e5fde4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -390,7 +390,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.17</version>
+ <version>2.19.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
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 da31140..fb5803f 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.23.0
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.17.jar
+Require-Bundle: org.junit;bundle-version="[3.8.0,5.0.0)"
+Bundle-ClassPath: jars/surefire-junit3-2.19.1.jar,
+ jars/common-junit3-2.19.1.jar
Bundle-Vendor: %providerName
diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml
index f99c319..0224cc6 100644
--- a/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml
+++ b/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml
@@ -44,6 +44,11 @@
<artifactId>surefire-junit3</artifactId>
<version>${surefire-version}</version>
</artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>common-junit3</artifactId>
+ <version>${surefire-version}</version>
+ </artifactItem>
</artifactItems>
</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 50be5ea..97760e2 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,9 +6,12 @@ Bundle-Version: 0.23.0
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.17.jar
+Bundle-ClassPath: jars/surefire-junit4-2.19.1.jar,
+ jars/common-junit3-2.19.1.jar,
+ jars/common-junit4-2.19.1.jar
Import-Package: junit.framework;version="3.0.0",
org.junit;version="4.0.0",
org.junit.runner;version="4.0.0",
+ org.junit.runner.manipulation;version="4.0.0",
org.junit.runner.notification;version="4.0.0"
Bundle-Vendor: %providerName
diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml
index 9628b06..2a09e91 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 @@
<artifactId>surefire-junit4</artifactId>
<version>${surefire-version}</version>
</artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>common-junit3</artifactId>
+ <version>${surefire-version}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>common-junit4</artifactId>
+ <version>${surefire-version}</version>
+ </artifactItem>
</artifactItems>
</configuration>
</execution>
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 595265b..1ac6c5d 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,9 +6,11 @@ Bundle-Version: 0.23.0
Fragment-Host: org.eclipse.tycho.surefire.osgibooter;bundle-version="0.16.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .,
- jars/surefire-junit47-2.17.jar,
- jars/common-junit48-2.17.jar,
- jars/surefire-grouper-2.17.jar
+ jars/surefire-junit47-2.19.1.jar,
+ jars/common-junit48-2.19.1.jar,
+ jars/surefire-grouper-2.19.1.jar,
+ jars/common-junit3-2.19.1.jar,
+ jars/common-junit4-2.19.1.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/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml
index dc49a46..db453ac 100644
--- a/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml
+++ b/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml
@@ -54,6 +54,16 @@
<artifactId>surefire-grouper</artifactId>
<version>${surefire-version}</version>
</artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>common-junit4</artifactId>
+ <version>${surefire-version}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>common-junit3</artifactId>
+ <version>${surefire-version}</version>
+ </artifactItem>
</artifactItems>
</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 991edc1..83732d5 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,9 +5,10 @@ Require-Bundle: org.eclipse.osgi;bundle-version="3.2.2",
Eclipse-AutoStart: true
Bundle-Version: 1.0.0
Bundle-ClassPath: .,
- jars/surefire-booter-2.17.jar,
- jars/surefire-api-2.17.jar,
- jars/maven-surefire-common-2.17.jar
+ jars/surefire-booter-2.19.1.jar,
+ jars/surefire-api-2.19.1.jar,
+ jars/maven-surefire-common-2.19.1.jar,
+ jars/plexus-utils-3.0.jar
Bundle-Name: Tycho Surefire OSGi Booter Eclipse Application
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 82700eb..3fbc3a3 100644
--- a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml
+++ b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml
@@ -57,6 +57,11 @@
<artifactId>maven-surefire-common</artifactId>
<version>${surefire-version}</version>
</artifactItem>
+ <artifactItem>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0</version>
+ </artifactItem>
</artifactItems>
</configuration>
</execution>
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 19eeab9..31e9d3e 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
@@ -21,7 +21,9 @@
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.Enumeration;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
@@ -36,12 +38,15 @@
import org.apache.maven.surefire.booter.PropertiesWrapper;
import org.apache.maven.surefire.booter.ProviderConfiguration;
import org.apache.maven.surefire.booter.ProviderFactory;
+import org.apache.maven.surefire.booter.Shutdown;
import org.apache.maven.surefire.booter.StartupConfiguration;
+import org.apache.maven.surefire.cli.CommandLineOption;
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.TestListResolver;
import org.apache.maven.surefire.testset.TestRequest;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
@@ -62,7 +67,11 @@
File reportsDir = new File(testProps.getProperty("reportsdirectory"));
String provider = testProps.getProperty("testprovider");
String runOrder = testProps.getProperty("runOrder");
- PropertiesWrapper wrapper = new PropertiesWrapper(testProps);
+ Map<String, String> testPropsMap = new HashMap<String, String>();
+ for (Map.Entry e : testProps.entrySet()) {
+ testPropsMap.put((String) e.getKey(), (String) e.getValue());
+ }
+ PropertiesWrapper wrapper = new PropertiesWrapper(testPropsMap);
List<String> suiteXmlFiles = wrapper.getStringList(BooterConstants.TEST_SUITE_XML_FILES);
boolean forkRequested = true;
@@ -79,16 +88,17 @@
new ClassLoaderConfiguration(useSystemClassloader, useManifestOnlyJar), forkRequested, inForkedVM);
// TODO dir scanning with no includes done here (done in TestMojo already)
// but without dirScannerParams we get an NPE accessing runOrder
- DirectoryScannerParameters dirScannerParams = new DirectoryScannerParameters(testClassesDir, emptyList(),
- emptyList(), emptyList(), failIfNoTests, runOrder);
+ DirectoryScannerParameters dirScannerParams = new DirectoryScannerParameters(testClassesDir, Collections.<String>emptyList(),
+ Collections.<String>emptyList(), Collections.<String>emptyList(), failIfNoTests, runOrder);
ReporterConfiguration reporterConfig = new ReporterConfiguration(reportsDir, trimStacktrace);
- TestRequest testRequest = new TestRequest(suiteXmlFiles, testClassesDir, null);
+ TestRequest testRequest = new TestRequest(suiteXmlFiles, testClassesDir, new TestListResolver(Collections.<String> emptyList()));
ProviderConfiguration providerConfiguration = new ProviderConfiguration(dirScannerParams,
new RunOrderParameters(runOrder, null), failIfNoTests, reporterConfig, null, testRequest,
- extractProviderProperties(testProps), null, false);
+ extractProviderProperties(testProps), null, false, Collections.<CommandLineOption>emptyList(),
+ 0, Shutdown.DEFAULT);
StartupReportConfiguration startupReportConfig = new StartupReportConfiguration(useFile, printSummary,
StartupReportConfiguration.PLAIN_REPORT_FORMAT, redirectTestOutputToFile, disableXmlReport, reportsDir,
- trimStacktrace, null, "TESTHASH", false);
+ trimStacktrace, null, "TESTHASH", false, 0);
ReporterFactory reporterFactory = new DefaultReporterFactory(startupReportConfig);
// API indicates we should use testClassLoader below but surefire also tries
// to load surefire classes using this classloader
@@ -107,12 +117,12 @@
/*
* See TestMojo#mergeProviderProperties
*/
- private static Properties extractProviderProperties(Properties surefireProps) {
- Properties providerProps = new Properties();
+ private static Map<String, String> extractProviderProperties(Properties surefireProps) {
+ Map<String, String> providerProps = new HashMap<String, String>();
for (Map.Entry entry : surefireProps.entrySet()) {
String key = (String) entry.getKey();
if (key.startsWith("__provider.")) {
- providerProps.put(key.substring("__provider.".length()), entry.getValue());
+ providerProps.put(key.substring("__provider.".length()), (String)entry.getValue());
}
}
return providerProps;
diff --git a/tycho-surefire/pom.xml b/tycho-surefire/pom.xml
index cb2b826..bbe5f29 100644
--- a/tycho-surefire/pom.xml
+++ b/tycho-surefire/pom.xml
@@ -26,7 +26,7 @@
<name>Tycho Surefire Parent</name>
<properties>
- <surefire-version>2.17</surefire-version>
+ <surefire-version>2.19.1</surefire-version>
<!-- NOTE: when updating surefire version above, run BND manually to find Import-Package
statements to JUnit packages required for org.eclipse.tycho.surefire.junit* OSGi wrappers.
Surefire jars are shaded but not fully self-contained (various package dependencies to org.apache.maven.*
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 9f1e332..62a16fb 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
@@ -21,6 +21,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
+import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -48,6 +49,7 @@
import org.apache.maven.surefire.booter.BooterConstants;
import org.apache.maven.surefire.booter.PropertiesWrapper;
import org.apache.maven.surefire.booter.ProviderParameterNames;
+import org.apache.maven.surefire.testset.TestListResolver;
import org.apache.maven.surefire.util.DefaultScanResult;
import org.apache.maven.surefire.util.ScanResult;
import org.apache.maven.toolchain.Toolchain;
@@ -865,7 +867,7 @@
}
private void createSurefireProperties(TestFrameworkProvider provider) throws MojoExecutionException {
- PropertiesWrapper wrapper = new PropertiesWrapper(new Properties());
+ PropertiesWrapper wrapper = new PropertiesWrapper(new HashMap<String, String>());
wrapper.setProperty("testpluginname", getTestBundleSymbolicName());
wrapper.setProperty("testclassesdirectory", testClassesDirectory.getAbsolutePath());
wrapper.setProperty("reportsdirectory", reportsDirectory.getAbsolutePath());
@@ -873,8 +875,10 @@
wrapper.setProperty("failifnotests", String.valueOf(failIfNoTests));
wrapper.setProperty("runOrder", runOrder);
- Properties mergedProviderProperties = getMergedProviderProperties();
- mergedProviderProperties.putAll(provider.getProviderSpecificProperties());
+ Map<String, String> mergedProviderProperties = getMergedProviderPropertiesMap();
+ for (Map.Entry<?, ?> entry : provider.getProviderSpecificProperties().entrySet()){
+ mergedProviderProperties.put((String)entry.getKey(), (String)entry.getValue().toString());
+ }
ScanResult scanResult = scanForTests();
scanResult.writeTo(mergedProviderProperties);
for (Map.Entry<?, ?> entry : mergedProviderProperties.entrySet()) {
@@ -911,6 +915,24 @@
return result;
}
+ private Map<String, String> getMergedProviderPropertiesMap() {
+ Map<String, String> result = new HashMap<String, String>();
+ for (Map.Entry e : providerProperties.entrySet()) {
+ result.put((String) e.getKey(), (String) e.getValue());
+ }
+ if (parallel != null) {
+ result.put(ProviderParameterNames.PARALLEL_PROP, parallel.name());
+ if (threadCount > 0) {
+ result.put(ProviderParameterNames.THREADCOUNT_PROP, String.valueOf(threadCount));
+ }
+ result.put(/* JUnitCoreParameters.PERCORETHREADCOUNT_KEY */"perCoreThreadCount",
+ String.valueOf(perCoreThreadCount));
+ result.put(/* JUnitCoreParameters.USEUNLIMITEDTHREADS_KEY */"useUnlimitedThreads",
+ String.valueOf(useUnlimitedThreads));
+ }
+ return result;
+ }
+
protected ScanResult scanForTests() {
List<String> defaultIncludes = Arrays.asList("**/Test*.class", "**/*Test.class", "**/*TestCase.class");
List<String> defaultExcludes = Arrays.asList("**/*$*");
@@ -936,12 +958,20 @@
} else {
excludeList = defaultExcludes;
}
- DirectoryScanner scanner = new DirectoryScanner(testClassesDirectory, includeList, excludeList,
- Collections.<String> emptyList());
+ DirectoryScanner scanner = new DirectoryScanner(testClassesDirectory,
+ new TestListResolver(includeList, excludes != null ? excludes : defaultExcludes));
DefaultScanResult scanResult = scanner.scan();
return scanResult;
}
+ private void storeProperties(Map<String, String> p, File file) throws MojoExecutionException {
+ Properties props = new Properties();
+ for (Map.Entry<String, String> entry : p.entrySet()) {
+ props.setProperty(entry.getKey(), entry.getValue());
+ }
+ storeProperties(props, file);
+ }
+
private void storeProperties(Properties p, File file) throws MojoExecutionException {
try {
BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file));
--- a/tycho-surefire/org.eclipse.tycho.surefire.testng/META-INF/MANIFEST.MF 2016-11-02 13:58:17.436696677 +0000
+++ b/tycho-surefire/org.eclipse.tycho.surefire.testng/META-INF/MANIFEST.MF 2016-11-02 14:00:25.344188489 +0000
@@ -6,10 +6,10 @@
Fragment-Host: org.eclipse.tycho.surefire.osgibooter
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ClassPath: .,
- jars/surefire-testng-2.17.jar,
- jars/surefire-testng-utils-2.17.jar,
- jars/surefire-grouper-2.17.jar,
- jars/common-java5-2.17.jar
+ jars/surefire-testng-2.19.1.jar,
+ jars/surefire-testng-utils-2.19.1.jar,
+ jars/surefire-grouper-2.19.1.jar,
+ jars/common-java5-2.19.1.jar
Import-Package: org.testng,
org.testng.xml
Bundle-Vendor: %providerName

View File

@ -1,411 +0,0 @@
From d4d161e7ccfb21503e906229a37000eb9a821284 Mon Sep 17 00:00:00 2001
From: Jan Sievers <jan.sievers@sap.com>
Date: Tue, 4 Sep 2012 16:02:52 +0200
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
through Bundle-ClassPath. As a result, it must copy over and include
system jars in its Bundle-ClassPath. We use Fedora system jars to
satisfy these dependencies but even these jars differ slightly in terms
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: I9ef0239eed887fa47c380efcdce968934c788c9f
---
pom.xml | 2 +-
.../META-INF/MANIFEST.MF | 5 ++--
.../org.eclipse.tycho.surefire.junit/pom.xml | 5 ++++
.../META-INF/MANIFEST.MF | 5 +++-
.../org.eclipse.tycho.surefire.junit4/pom.xml | 10 ++++++++
.../META-INF/MANIFEST.MF | 8 ++++---
.../org.eclipse.tycho.surefire.junit47/pom.xml | 10 ++++++++
.../META-INF/MANIFEST.MF | 7 +++---
.../org.eclipse.tycho.surefire.osgibooter/pom.xml | 5 ++++
.../surefire/osgibooter/OsgiSurefireBooter.java | 20 ++++++++++------
tycho-surefire/pom.xml | 2 +-
.../java/org/eclipse/tycho/surefire/TestMojo.java | 27 +++++++++++++++++++---
12 files changed, 85 insertions(+), 21 deletions(-)
diff --git a/pom.xml b/pom.xml
index c43cc8d..6e5fde4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -390,7 +390,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.17</version>
+ <version>2.20.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
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 da31140..fb5803f 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.23.0
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.17.jar
+Require-Bundle: org.junit;bundle-version="[3.8.0,5.0.0)"
+Bundle-ClassPath: jars/surefire-junit3-2.20.1.jar,
+ jars/common-junit3-2.20.1.jar
Bundle-Vendor: %providerName
diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml
index f99c319..0224cc6 100644
--- a/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml
+++ b/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml
@@ -44,6 +44,11 @@
<artifactId>surefire-junit3</artifactId>
<version>${surefire-version}</version>
</artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>common-junit3</artifactId>
+ <version>${surefire-version}</version>
+ </artifactItem>
</artifactItems>
</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 50be5ea..97760e2 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,9 +6,12 @@ Bundle-Version: 0.23.0
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.17.jar
+Bundle-ClassPath: jars/surefire-junit4-2.20.1.jar,
+ jars/common-junit3-2.20.1.jar,
+ jars/common-junit4-2.20.1.jar
Import-Package: junit.framework;version="3.0.0",
org.junit;version="4.0.0",
org.junit.runner;version="4.0.0",
+ org.junit.runner.manipulation;version="4.0.0",
org.junit.runner.notification;version="4.0.0"
Bundle-Vendor: %providerName
diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml
index 9628b06..2a09e91 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 @@
<artifactId>surefire-junit4</artifactId>
<version>${surefire-version}</version>
</artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>common-junit3</artifactId>
+ <version>${surefire-version}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>common-junit4</artifactId>
+ <version>${surefire-version}</version>
+ </artifactItem>
</artifactItems>
</configuration>
</execution>
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 595265b..1ac6c5d 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,9 +6,11 @@ Bundle-Version: 0.23.0
Fragment-Host: org.eclipse.tycho.surefire.osgibooter;bundle-version="0.16.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .,
- jars/surefire-junit47-2.17.jar,
- jars/common-junit48-2.17.jar,
- jars/surefire-grouper-2.17.jar
+ jars/surefire-junit47-2.20.1.jar,
+ jars/common-junit48-2.20.1.jar,
+ jars/surefire-grouper-2.20.1.jar,
+ jars/common-junit3-2.20.1.jar,
+ jars/common-junit4-2.20.1.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/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml
index dc49a46..db453ac 100644
--- a/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml
+++ b/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml
@@ -54,6 +54,16 @@
<artifactId>surefire-grouper</artifactId>
<version>${surefire-version}</version>
</artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>common-junit4</artifactId>
+ <version>${surefire-version}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>common-junit3</artifactId>
+ <version>${surefire-version}</version>
+ </artifactItem>
</artifactItems>
</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 991edc1..83732d5 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,9 +5,11 @@ Require-Bundle: org.eclipse.osgi;bundle-version="3.2.2",
Eclipse-AutoStart: true
Bundle-Version: 1.0.0
Bundle-ClassPath: .,
- jars/surefire-booter-2.17.jar,
- jars/surefire-api-2.17.jar,
- jars/maven-surefire-common-2.17.jar
+ jars/surefire-booter-2.20.1.jar,
+ jars/surefire-api-2.20.1.jar,
+ jars/surefire-logger-api-2.20.1.jar,
+ jars/maven-surefire-common-2.20.1.jar,
+ jars/plexus-utils-3.0.jar
Bundle-Name: Tycho Surefire OSGi Booter Eclipse Application
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 82700eb..3fbc3a3 100644
--- a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml
+++ b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml
@@ -49,6 +49,11 @@
</artifactItem>
<artifactItem>
<groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-logger-api</artifactId>
+ <version>${surefire-version}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-booter</artifactId>
<version>${surefire-version}</version>
</artifactItem>
@@ -57,6 +62,11 @@
<artifactId>maven-surefire-common</artifactId>
<version>${surefire-version}</version>
</artifactItem>
+ <artifactItem>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0</version>
+ </artifactItem>
</artifactItems>
</configuration>
</execution>
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 19eeab9..31e9d3e 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
@@ -21,13 +21,16 @@
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.Enumeration;
+import java.util.HashMap;
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.log.api.NullConsoleLogger;
import org.apache.maven.plugin.surefire.report.DefaultReporterFactory;
import org.apache.maven.surefire.booter.BooterConstants;
import org.apache.maven.surefire.booter.ClassLoaderConfiguration;
@@ -36,12 +39,15 @@
import org.apache.maven.surefire.booter.PropertiesWrapper;
import org.apache.maven.surefire.booter.ProviderConfiguration;
import org.apache.maven.surefire.booter.ProviderFactory;
+import org.apache.maven.surefire.booter.Shutdown;
import org.apache.maven.surefire.booter.StartupConfiguration;
+import org.apache.maven.surefire.cli.CommandLineOption;
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.TestListResolver;
import org.apache.maven.surefire.testset.TestRequest;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
@@ -62,7 +68,11 @@
File reportsDir = new File(testProps.getProperty("reportsdirectory"));
String provider = testProps.getProperty("testprovider");
String runOrder = testProps.getProperty("runOrder");
- PropertiesWrapper wrapper = new PropertiesWrapper(testProps);
+ Map<String, String> testPropsMap = new HashMap<String, String>();
+ for (Map.Entry e : testProps.entrySet()) {
+ testPropsMap.put((String) e.getKey(), (String) e.getValue());
+ }
+ PropertiesWrapper wrapper = new PropertiesWrapper(testPropsMap);
List<String> suiteXmlFiles = wrapper.getStringList(BooterConstants.TEST_SUITE_XML_FILES);
boolean forkRequested = true;
@@ -79,17 +89,18 @@
new ClassLoaderConfiguration(useSystemClassloader, useManifestOnlyJar), forkRequested, inForkedVM);
// TODO dir scanning with no includes done here (done in TestMojo already)
// but without dirScannerParams we get an NPE accessing runOrder
- DirectoryScannerParameters dirScannerParams = new DirectoryScannerParameters(testClassesDir, emptyList(),
- emptyList(), emptyList(), failIfNoTests, runOrder);
+ DirectoryScannerParameters dirScannerParams = new DirectoryScannerParameters(testClassesDir, Collections.<String>emptyList(),
+ Collections.<String>emptyList(), Collections.<String>emptyList(), failIfNoTests, runOrder);
ReporterConfiguration reporterConfig = new ReporterConfiguration(reportsDir, trimStacktrace);
- TestRequest testRequest = new TestRequest(suiteXmlFiles, testClassesDir, null);
+ TestRequest testRequest = new TestRequest(suiteXmlFiles, testClassesDir, new TestListResolver(Collections.<String> emptyList()));
ProviderConfiguration providerConfiguration = new ProviderConfiguration(dirScannerParams,
new RunOrderParameters(runOrder, null), failIfNoTests, reporterConfig, null, testRequest,
- extractProviderProperties(testProps), null, false);
+ extractProviderProperties(testProps), null, false, Collections.<CommandLineOption>emptyList(),
+ 0, Shutdown.DEFAULT, 0);
StartupReportConfiguration startupReportConfig = new StartupReportConfiguration(useFile, printSummary,
StartupReportConfiguration.PLAIN_REPORT_FORMAT, redirectTestOutputToFile, disableXmlReport, reportsDir,
- trimStacktrace, null, "TESTHASH", false);
- ReporterFactory reporterFactory = new DefaultReporterFactory(startupReportConfig);
+ trimStacktrace, null, new File(reportsDir, "TESTHASH"), false, 0, null);
+ ReporterFactory reporterFactory = new DefaultReporterFactory(startupReportConfig, new NullConsoleLogger());
// API indicates we should use testClassLoader below but surefire also tries
// to load surefire classes using this classloader
RunResult result = ProviderFactory.invokeProvider(null, createCombinedClassLoader(testPlugin), reporterFactory,
@@ -107,12 +118,12 @@
/*
* See TestMojo#mergeProviderProperties
*/
- private static Properties extractProviderProperties(Properties surefireProps) {
- Properties providerProps = new Properties();
+ private static Map<String, String> extractProviderProperties(Properties surefireProps) {
+ Map<String, String> providerProps = new HashMap<String, String>();
for (Map.Entry entry : surefireProps.entrySet()) {
String key = (String) entry.getKey();
if (key.startsWith("__provider.")) {
- providerProps.put(key.substring("__provider.".length()), entry.getValue());
+ providerProps.put(key.substring("__provider.".length()), (String)entry.getValue());
}
}
return providerProps;
diff --git a/tycho-surefire/pom.xml b/tycho-surefire/pom.xml
index cb2b826..bbe5f29 100644
--- a/tycho-surefire/pom.xml
+++ b/tycho-surefire/pom.xml
@@ -26,7 +26,7 @@
<name>Tycho Surefire Parent</name>
<properties>
- <surefire-version>2.17</surefire-version>
+ <surefire-version>2.20.1</surefire-version>
<!-- NOTE: when updating surefire version above, run BND manually to find Import-Package
statements to JUnit packages required for org.eclipse.tycho.surefire.junit* OSGi wrappers.
Surefire jars are shaded but not fully self-contained (various package dependencies to org.apache.maven.*
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 9f1e332..62a16fb 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
@@ -21,6 +21,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
+import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -48,6 +49,7 @@
import org.apache.maven.surefire.booter.BooterConstants;
import org.apache.maven.surefire.booter.PropertiesWrapper;
import org.apache.maven.surefire.booter.ProviderParameterNames;
+import org.apache.maven.surefire.testset.TestListResolver;
import org.apache.maven.surefire.util.DefaultScanResult;
import org.apache.maven.surefire.util.ScanResult;
import org.apache.maven.toolchain.Toolchain;
@@ -865,7 +867,7 @@
}
private void createSurefireProperties(TestFrameworkProvider provider) throws MojoExecutionException {
- PropertiesWrapper wrapper = new PropertiesWrapper(new Properties());
+ PropertiesWrapper wrapper = new PropertiesWrapper(new HashMap<String, String>());
wrapper.setProperty("testpluginname", getTestBundleSymbolicName());
wrapper.setProperty("testclassesdirectory", testClassesDirectory.getAbsolutePath());
wrapper.setProperty("reportsdirectory", reportsDirectory.getAbsolutePath());
@@ -873,8 +875,10 @@
wrapper.setProperty("failifnotests", String.valueOf(failIfNoTests));
wrapper.setProperty("runOrder", runOrder);
- Properties mergedProviderProperties = getMergedProviderProperties();
- mergedProviderProperties.putAll(provider.getProviderSpecificProperties());
+ Map<String, String> mergedProviderProperties = getMergedProviderPropertiesMap();
+ for (Map.Entry<?, ?> entry : provider.getProviderSpecificProperties().entrySet()){
+ mergedProviderProperties.put((String)entry.getKey(), (String)entry.getValue().toString());
+ }
ScanResult scanResult = scanForTests();
scanResult.writeTo(mergedProviderProperties);
for (Map.Entry<?, ?> entry : mergedProviderProperties.entrySet()) {
@@ -911,6 +915,24 @@
return result;
}
+ private Map<String, String> getMergedProviderPropertiesMap() {
+ Map<String, String> result = new HashMap<String, String>();
+ for (Map.Entry e : providerProperties.entrySet()) {
+ result.put((String) e.getKey(), (String) e.getValue());
+ }
+ if (parallel != null) {
+ result.put(ProviderParameterNames.PARALLEL_PROP, parallel.name());
+ if (threadCount > 0) {
+ result.put(ProviderParameterNames.THREADCOUNT_PROP, String.valueOf(threadCount));
+ }
+ result.put(/* JUnitCoreParameters.PERCORETHREADCOUNT_KEY */"perCoreThreadCount",
+ String.valueOf(perCoreThreadCount));
+ result.put(/* JUnitCoreParameters.USEUNLIMITEDTHREADS_KEY */"useUnlimitedThreads",
+ String.valueOf(useUnlimitedThreads));
+ }
+ return result;
+ }
+
protected ScanResult scanForTests() {
List<String> defaultIncludes = Arrays.asList("**/Test*.class", "**/*Test.class", "**/*TestCase.class");
List<String> defaultExcludes = Arrays.asList("**/*$*");
@@ -936,12 +958,20 @@
} else {
excludeList = defaultExcludes;
}
- DirectoryScanner scanner = new DirectoryScanner(testClassesDirectory, includeList, excludeList,
- Collections.<String> emptyList());
+ DirectoryScanner scanner = new DirectoryScanner(testClassesDirectory,
+ new TestListResolver(includeList, excludes != null ? excludes : defaultExcludes));
DefaultScanResult scanResult = scanner.scan();
return scanResult;
}
+ private void storeProperties(Map<String, String> p, File file) throws MojoExecutionException {
+ Properties props = new Properties();
+ for (Map.Entry<String, String> entry : p.entrySet()) {
+ props.setProperty(entry.getKey(), entry.getValue());
+ }
+ storeProperties(props, file);
+ }
+
private void storeProperties(Properties p, File file) throws MojoExecutionException {
try {
BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file));
--- a/tycho-surefire/org.eclipse.tycho.surefire.testng/META-INF/MANIFEST.MF 2016-11-02 13:58:17.436696677 +0000
+++ b/tycho-surefire/org.eclipse.tycho.surefire.testng/META-INF/MANIFEST.MF 2016-11-02 14:00:25.344188489 +0000
@@ -6,10 +6,10 @@
Fragment-Host: org.eclipse.tycho.surefire.osgibooter
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ClassPath: .,
- jars/surefire-testng-2.17.jar,
- jars/surefire-testng-utils-2.17.jar,
- jars/surefire-grouper-2.17.jar,
- jars/common-java5-2.17.jar
+ jars/surefire-testng-2.20.1.jar,
+ jars/surefire-testng-utils-2.20.1.jar,
+ jars/surefire-grouper-2.20.1.jar,
+ jars/common-java5-2.20.1.jar
Import-Package: org.testng,
org.testng.xml
Bundle-Vendor: %providerName

View File

@ -101,7 +101,7 @@ index 1d3a029..2ec5c59 100644
import org.eclipse.tycho.core.shared.MavenContext;
import org.eclipse.tycho.core.shared.MavenLogger;
import org.eclipse.tycho.p2.impl.Activator;
@@ -48,6 +55,13 @@ class RemoteRepositoryCacheManager extends CacheManager {
@@ -51,6 +55,13 @@ class RemoteRepositoryCacheManager extends CacheManager {
@Override
public File createCache(URI repositoryLocation, String prefix, IProgressMonitor monitor)
throws IOException, ProvisionException {
@ -169,12 +169,12 @@ index 66a252f..0195871 100644
import org.eclipse.tycho.p2.repository.MavenRepositoryCoordinates;
import org.eclipse.tycho.repository.local.GAVArtifactDescriptor;
import org.eclipse.tycho.repository.p2base.artifact.provider.IRawArtifactFileProvider;
@@ -218,15 +219,6 @@ public class TargetPlatformBundlePublisher {
@@ -216,15 +217,6 @@ public class TargetPlatformBundlePublisher {
GAVArtifactDescriptor descriptorForRepository = new GAVArtifactDescriptor(baseDescriptor,
repositoryCoordinates);
- File requiredArtifactLocation = new File(getBaseDir(), descriptorForRepository.getMavenCoordinates()
- .getLocalRepositoryPath());
- File requiredArtifactLocation = new File(getBaseDir(),
- descriptorForRepository.getMavenCoordinates().getLocalRepositoryPath());
- File actualArtifactLocation = mavenArtifact.getLocation();
- if (!equivalentPaths(requiredArtifactLocation, actualArtifactLocation)) {
- throw new AssertionFailedException(
@ -185,7 +185,7 @@ index 66a252f..0195871 100644
internalAddInternalDescriptor(descriptorForRepository);
}
@@ -259,8 +251,9 @@ public class TargetPlatformBundlePublisher {
@@ -257,8 +249,9 @@ public class TargetPlatformBundlePublisher {
@Override
protected File internalGetArtifactStorageLocation(IArtifactDescriptor descriptor) {
@ -350,12 +350,10 @@ diff --git a/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product
index 7c99168..28ad59f 100644
--- a/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product
+++ b/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product
@@ -77,6 +77,11 @@
@@ -79,6 +79,9 @@
<plugin id="org.sat4j.core"/>
<plugin id="org.sat4j.pb"/>
<plugin id="org.tukaani.xz"/>
+ <plugin id="org.eclipse.osgi.util"/>
+ <plugin id="org.apache.felix.scr"/>
+ <plugin id="org.kxml2"/>
+ <plugin id="org.xmlpull"/>
+ <plugin id="org.fedoraproject.p2"/>

View File

@ -6,63 +6,60 @@
# This basically uses javac + xmvn to build only the Tycho components
# required to perform a full Tycho build
# Most common usage : A library (in Fedora) used by Tycho's runtime broke API
%global tycho_bootstrap 0
%global tycho_bootstrap 1
# Set 'eclipse_bootstrap' if Eclipse from buildroot cannot help build Tycho
# This basically provides a location for usage of pre-bundled Eclipse
# Possible uses : Need to build Tycho before Eclipse in fresh buildroot
%global eclipse_bootstrap 0
# When building version under development (non-release)
# %%global snap -SNAPSHOT
%global snap %{nil}
%global eclipse_bootstrap 1
%global git_tag tycho-1.0.0
%global git_tag d9ce75d316caae823be78527b7b690182b602895
%global fp_p2_git_tag 290f67a4c717599b2f5166ea89aa5365571314b1
%global fp_p2_sha b8b13f9
%global fp_p2_version 0.0.1
%global fp_p2_snap -SNAPSHOT
%define __requires_exclude osgi*
Name: tycho
Version: 1.0.0
Release: 11%{?dist}
Version: 1.2.0
Release: 0.1.gitd9ce75d%{?dist}
Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven
# license file is missing but all files having some licensing information are ASL 2.0
License: ASL 2.0 and EPL
URL: http://eclipse.org/tycho
Source0: http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/snapshot/org.eclipse.tycho-%{git_tag}.tar.xz
# Tycho project source
Source0: https://github.com/eclipse/tycho/archive/%{git_tag}/tycho-%{git_tag}.tar.gz
# Eclipse Plugin Project supporting filesystem as p2 repository
Source1: https://github.com/rgrunber/fedoraproject-p2/archive/%{fp_p2_git_tag}/fedoraproject-p2-%{fp_p2_git_tag}.tar.gz
# 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
# should be fixed upstream properly
Source1: EmptyMojo.java
Source2: tycho-scripts.sh
Source3: tycho-bootstrap.sh
Source4: tycho-debundle.sh
Source2: EmptyMojo.java
Source3: tycho-scripts.sh
Source4: tycho-bootstrap.sh
Source5: tycho-debundle.sh
# Script that can be used to install or simulate installation of P2
# artifacts. It is used in OSGi requires generation.
Source6: p2-install.sh
# Fedora Eclipse bundles needed to build Tycho when Eclipse is not present
# or when the Eclipse that is present is not compatible
%if %{eclipse_bootstrap}
Source5: eclipse-bootstrap-oxygen.tar.xz
Source10: eclipse-bootstrap-photon.tar.xz
%endif
# Eclipse Plugin Project supporting filesystem as p2 repository
# https://github.com/rgrunber/fedoraproject-p2
# Generated using 'git archive --prefix=fedoraproject-p2/ -o fedoraproject-p2-%%{fp_p2_sha}.tar %%{fp_p2_sha} && xz fedoraproject-p2-%%{fp_p2_sha}.tar'
Source6: fedoraproject-p2-%{fp_p2_sha}.tar.xz
# Script that can be used to install or simulate installation of P2
# artifacts. It is used in OSGi requires generation.
Source7: p2-install.sh
Patch0: %{name}-fix-build.patch
Patch1: tycho-surefire-2.20.patch
Patch2: tycho-surefire-2.19.patch
Patch3: %{name}-use-custom-resolver.patch
Patch4: %{name}-maven-delegation.patch
Patch0: tycho-fix-build.patch
Patch1: tycho-maven-archiver-3.0.1.patch
Patch2: %{name}-use-custom-resolver.patch
Patch3: %{name}-maven-delegation.patch
# Changes needed for building against photon
Patch4: build-against-photon-equinox.patch
# Changes needed for building against latest surefire
Patch5: build-against-surefire-2.21.patch
# Additional changes needed just for bootstrap build
Patch5: %{name}-fix-bootstrap-build.patch
# Accepted upstream: https://git.eclipse.org/r/49897
Patch7: %{name}-port-to-plexus-archiver-3.0.1.patch
Patch8: tycho-maven-archiver-3.0.1.patch
Patch10: %{name}-fix-bootstrap-build.patch
BuildArch: noarch
@ -79,7 +76,11 @@ BuildRequires: apache-commons-exec
BuildRequires: bcel
BuildRequires: decentxml
BuildRequires: easymock
BuildRequires: ecj >= 1:4.5.2-2
BuildRequires: junit
BuildRequires: junit5
BuildRequires: apiguardian
BuildRequires: ecj >= 1:4.7.3a-1
BuildRequires: bnd-maven-plugin
BuildRequires: maven-plugin-testing-harness
BuildRequires: xmvn-parent-pom
BuildRequires: maven-plugin-bundle
@ -93,7 +94,6 @@ BuildRequires: %{name}
%endif
%if %{eclipse_bootstrap}
# Dependencies for Eclipse bundles we use
BuildRequires: eclipse-filesystem
BuildRequires: apache-commons-jxpath
BuildRequires: felix-scr
BuildRequires: glassfish-jsp-api
@ -114,7 +114,7 @@ BuildRequires: mockito
Requires: maven-local
Requires: xmvn-minimal >= 3
Requires: ecj >= 1:4.5.2-2
Requires: ecj >= 1:4.7.3a-1
%if ! %{eclipse_bootstrap}
Requires: eclipse-platform >= 1:4.7.0
%endif
@ -153,32 +153,27 @@ possible. One important design goal in Tycho is to make sure there is
no duplication of metadata between POM and OSGi metadata.
%package javadoc
Summary: Javadocs for %{name}
Summary: Javadocs for %{name}
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q -n org.eclipse.tycho-%{git_tag}
# Prepare fedoraproject-p2
tar -xf %{SOURCE6}
%pom_disable_module org.fedoraproject.p2.tests fedoraproject-p2
%setup -q -n tycho-%{git_tag} -a 1
mv fedoraproject-p2-%{fp_p2_git_tag} fedoraproject-p2
%patch0 -p1
%if 0%{?fedora} >= 28
%patch1 -p1
%else
%patch1
%patch2 -p1
%endif
%patch3 -p1
%patch4 -p1
%patch7 -p0
%patch8 -p0
%patch4
%patch5 -p1
sed -i -e 's/>%{version}-SNAPSHOT</>%{version}</' $(grep -rl '>%{version}-SNAPSHOT<' --include=pom.xml)
sed -i -e 's/\.qualifier//' $(find tycho-{surefire,bundles} -maxdepth 3 -name MANIFEST.MF)
# This is submitted upstream: https://bugs.eclipse.org/bugs/show_bug.cgi?id=534248
sed -i -e 's/org.apache.maven.it.util.DirectoryScanner/org.apache.maven.shared.utils.io.DirectoryScanner/g' tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java
# Move from org.sonatype.aether to org.eclipse.aether
@ -189,7 +184,7 @@ sed -i 's/public int getPriority/public float getPriority/g' tycho-core/src/main
# place empty mojo in place
mkdir -p tycho-maven-plugin/src/main/java/org/fedoraproject
pushd tycho-maven-plugin/src/main/java/org/fedoraproject
cp %{SOURCE1} .
cp %{SOURCE2} .
popd
# These units cannot be found during a regular build
@ -216,7 +211,7 @@ sed -i -e 's/org\.mockito/org.mockito.mockito-core/' \
# Bootstrap Build
%if %{eclipse_bootstrap}
# Unpack a compatible version of Eclipse we can use to build against
tar -xf %{SOURCE5}
tar -xf %{SOURCE10}
# Install OSGi bundles into local repo to override any incompatible system version
# that may be already installed
pushd bootstrap
@ -231,13 +226,13 @@ popd
%if %{tycho_bootstrap}
%patch5 -p1
%patch10 -p1
# Perform the 'minimal' (bootstrap) build of Tycho
cp %{SOURCE2} %{SOURCE3} .
cp %{SOURCE3} %{SOURCE4} .
./tycho-bootstrap.sh %{eclipse_bootstrap} %{version}
%patch5 -p1 -R
%patch10 -p1 -R
# Non-Bootstrap Build
%else
@ -276,9 +271,6 @@ sed -i '
%pom_xpath_remove "pom:dependency[pom:classifier='tests']" tycho-compiler-plugin
%pom_xpath_remove "pom:dependency[pom:classifier='tests']" tycho-packaging-plugin
# Glassfish instead of tomcat servlet api (fix submitted upstream ebz#515691)
sed -i -e "s|javax.servlet|javax.servlet-api|g" tycho-bundles/org.eclipse.tycho.test.utils/META-INF/MANIFEST.MF
# Avoid duplicate execution of clean when generating javadocs, see ebz#399756
%pom_add_plugin :maven-clean-plugin tycho-bundles/tycho-standalone-p2-director "
<executions>
@ -293,6 +285,7 @@ sed -i -e "s|javax.servlet|javax.servlet-api|g" tycho-bundles/org.eclipse.tycho.
# Add fp-p2 to main build
%pom_xpath_inject "pom:modules" "<module>fedoraproject-p2</module>"
%pom_disable_module org.fedoraproject.p2.tests fedoraproject-p2
%build
%mvn_build -f -- \
@ -310,15 +303,15 @@ sed -i -e 's|type>eclipse.*<|type>jar<|' .xmvn-reactor
%install
# Get debundling scripts
cp %{SOURCE2} %{SOURCE4} .
cp %{SOURCE3} %{SOURCE5} .
%if ! %{eclipse_bootstrap}
# Debundle p2 runtime
./%{name}-debundle.sh $(pwd)/tycho-bundles/tycho-bundles-external \
./tycho-debundle.sh $(pwd)/tycho-bundles/tycho-bundles-external \
$(pwd)/tycho-bundles/tycho-bundles-external/target/tycho-bundles-external-manifest.txt
# Debundle standalone p2 director
./%{name}-debundle.sh $(pwd)/tycho-bundles/tycho-standalone-p2-director
./tycho-debundle.sh $(pwd)/tycho-bundles/tycho-standalone-p2-director
%endif
# Install our own copy of OSGi runtime when bootstrapping to avoid external dep on Eclipse
@ -337,7 +330,7 @@ done
%if ! %{eclipse_bootstrap}
install -pm 644 tycho-bundles/tycho-bundles-external/target/tycho-bundles-external-manifest.txt %{buildroot}%{_javadir}/tycho
%add_maven_depmap org.eclipse.tycho:tycho-bundles-external:txt:manifest:%{version}%{snap} tycho/tycho-bundles-external-manifest.txt
%add_maven_depmap org.eclipse.tycho:tycho-bundles-external:txt:manifest:%{version} tycho/tycho-bundles-external-manifest.txt
%endif
# For some reason fp-p2 is treated as a compat version, this prevents that
@ -346,7 +339,7 @@ sed -i '/<resolvedVersion>/d' %{buildroot}%{_datadir}/maven-metadata/tycho.xml
# p2-install script
install -dm 755 %{buildroot}%{_javadir}-utils/
install -pm 755 %{SOURCE7} %{buildroot}%{_javadir}-utils/
install -pm 755 %{SOURCE6} %{buildroot}%{_javadir}-utils/
# Symlink XMvn P2 plugin with all dependencies so that it can be loaded by XMvn
xmvn_libdir=$(realpath $(dirname $(readlink -f $(which xmvn)))/../lib)
@ -367,6 +360,10 @@ ln -s %{_javadir}/tycho/org.fedoraproject.p2.jar %{buildroot}${xmvn_libdir}/inst
%files javadoc -f .mfiles-javadoc
%changelog
* Mon Apr 30 2018 Mat Booth <mat.booth@redhat.com> - 1.2.0-0.1.gitd9ce75d
- Update to latest tycho snapshot
- Bootstrap build
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild