commit 94c249b7f48f3c301115cdc257ea0df7d1b58530
Author: Roland Grunberg <rgrunber(a)redhat.com>
Date: Thu Jan 24 15:25:04 2013 -0500
Update with support for XMvn and Maven Surefire 2.13.
Use TYCHO_MVN_{LOCAL,RPMBUILD} to determine how maven was called and
update sources to reflect API changes in Maven Surefire 2.13.
tycho-bootstrap.patch | 4 +-
tycho-fix-surefire.patch | 36 ++++++++++----------
tycho-maven-surefire.patch | 70 +++++++++++++++++++--------------------
tycho-use-custom-resolver.patch | 48 ++++++++++++++-------------
tycho.spec | 8 +++-
5 files changed, 85 insertions(+), 81 deletions(-)
---
diff --git a/tycho-bootstrap.patch b/tycho-bootstrap.patch
index 74cec4b..a8f8000 100644
--- a/tycho-bootstrap.patch
+++ b/tycho-bootstrap.patch
@@ -805,8 +805,8 @@ index 51abc8d..d893a61 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.12.4.jar,
- jars/maven-surefire-common-2.12.4.jar,
+ jars/surefire-api-2.13.jar,
+ jars/maven-surefire-common-2.13.jar,
jars/plexus-utils-3.0.jar
-Bundle-Version: 0.16.0
+Bundle-Version: 0.16.0.qualifier
diff --git a/tycho-fix-surefire.patch b/tycho-fix-surefire.patch
index 37643c4..cc78c79 100644
--- a/tycho-fix-surefire.patch
+++ b/tycho-fix-surefire.patch
@@ -1,7 +1,7 @@
-From 58563564e8c97ac3d25daff9f15812ade423ea6b Mon Sep 17 00:00:00 2001
+From 468686d5055b5a7d67e50e844bfebb7c64cacc30 Mon Sep 17 00:00:00 2001
From: Roland Grunberg <rgrunber(a)redhat.com>
Date: Fri, 21 Sep 2012 10:58:09 -0400
-Subject: [PATCH 3/4] Resolve all necessary dependencies for Tycho Surefire.
+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
@@ -24,7 +24,7 @@ Change-Id: I9ef0239eed887fa47c380efcdce968934c788c9f
6 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit/META-INF/MANIFEST.MF
b/tycho-surefire/org.eclipse.tycho.surefire.junit/META-INF/MANIFEST.MF
-index 4be0ccf..ad76bc9 100644
+index a456dbc..fea0de0 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
@@ -32,10 +32,10 @@ index 4be0ccf..ad76bc9 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.12.4.jar
+-Bundle-ClassPath: jars/surefire-junit3-2.13.jar
+Require-Bundle: org.junit;bundle-version="[3.8.0,4.9.0)"
-+Bundle-ClassPath: jars/surefire-junit3-2.12.4.jar,
-+ jars/common-junit3-2.12.4.jar
++Bundle-ClassPath: jars/surefire-junit3-2.13.jar,
++ jars/common-junit3-2.13.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 dce4c4f..9ff127c 100644
@@ -54,17 +54,17 @@ index dce4c4f..9ff127c 100644
</configuration>
</execution>
diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit4/META-INF/MANIFEST.MF
b/tycho-surefire/org.eclipse.tycho.surefire.junit4/META-INF/MANIFEST.MF
-index 774a85f..916938b 100644
+index 88cc2bb..97524f8 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
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.12.4.jar
-+Bundle-ClassPath: jars/surefire-junit4-2.12.4.jar,
-+ jars/common-junit3-2.12.4.jar,
-+ jars/common-junit4-2.12.4.jar
+-Bundle-ClassPath: jars/surefire-junit4-2.13.jar
++Bundle-ClassPath: jars/surefire-junit4-2.13.jar,
++ jars/common-junit3-2.13.jar,
++ jars/common-junit4-2.13.jar
Import-Package: junit.framework;version="3.0.0",
org.junit;version="4.0.0",
org.junit.runner;version="4.0.0",
@@ -90,17 +90,17 @@ index 92ba3fb..4701d48 100644
</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 9e16141..d0ddf01 100644
+index 22fd6eb..64f1c91 100644
--- a/tycho-surefire/org.eclipse.tycho.surefire.junit47/META-INF/MANIFEST.MF
+++ b/tycho-surefire/org.eclipse.tycho.surefire.junit47/META-INF/MANIFEST.MF
@@ -8,7 +8,9 @@ Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .,
- jars/surefire-junit47-2.12.4.jar,
- jars/common-junit48-2.12.4.jar,
-- jars/surefire-grouper-2.12.4.jar
-+ jars/surefire-grouper-2.12.4.jar,
-+ jars/common-junit3-2.12.4.jar,
-+ jars/common-junit4-2.12.4.jar
+ jars/surefire-junit47-2.13.jar,
+ jars/common-junit48-2.13.jar,
+- jars/surefire-grouper-2.13.jar
++ jars/surefire-grouper-2.13.jar,
++ jars/common-junit3-2.13.jar,
++ jars/common-junit4-2.13.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-maven-surefire.patch b/tycho-maven-surefire.patch
index 20bdc83..f9dc00a 100644
--- a/tycho-maven-surefire.patch
+++ b/tycho-maven-surefire.patch
@@ -1,8 +1,7 @@
-From a8596cd76899fd684fa7ad21ef6fbda17dd0e7ef Mon Sep 17 00:00:00 2001
+From dac3890f02ac6deccf238a1b78754b7c08a1e7b5 Mon Sep 17 00:00:00 2001
From: Jan Sievers <jan.sievers(a)sap.com>
Date: Tue, 4 Sep 2012 16:02:52 +0200
-Subject: [PATCH 2/4] POC 386481 update maven surefire to latest version
- 2.12.4
+Subject: [PATCH] POC 386481 update maven surefire to latest version 2.13
while SUREFIRE-825 and SUREFIRE-876 are fixed,
there are several new problems:
@@ -33,17 +32,17 @@ Change-Id: Ibcb439a24add880c4cdafe67b42e29ca3cb14ff1
.../junitcore/OsgiEnabledJUnitCoreRunListener.java | 100 ----------------
.../META-INF/MANIFEST.MF | 6 +-
.../org.eclipse.tycho.surefire.osgibooter/pom.xml | 10 ++
- .../surefire/osgibooter/OsgiSurefireBooter.java | 34 ++++--
+ .../surefire/osgibooter/OsgiSurefireBooter.java | 36 +++---
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(-)
+ 16 files changed, 90 insertions(+), 254 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 ada8852..4be0ccf 100644
+index ada8852..a456dbc 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"
@@ -51,7 +50,7 @@ index ada8852..4be0ccf 100644
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.4.jar
++Bundle-ClassPath: jars/surefire-junit3-2.13.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
@@ -65,7 +64,7 @@ index 499ce76..fe88b19 100644
+ jars/,\
plugin.properties
diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit4/META-INF/MANIFEST.MF
b/tycho-surefire/org.eclipse.tycho.surefire.junit4/META-INF/MANIFEST.MF
-index ac40634..774a85f 100644
+index ac40634..88cc2bb 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
@@ -73,7 +72,7 @@ index ac40634..774a85f 100644
Bundle-RequiredExecutionEnvironment: J2SE-1.5,
JavaSE-1.6
-Bundle-ClassPath: jars/surefire-junit4-2.10.jar
-+Bundle-ClassPath: jars/surefire-junit4-2.12.4.jar
++Bundle-ClassPath: jars/surefire-junit4-2.13.jar
Import-Package: junit.framework;version="3.0.0",
org.junit;version="4.0.0",
org.junit.runner;version="4.0.0",
@@ -89,7 +88,7 @@ index b787149..fe88b19 100644
+ jars/,\
plugin.properties
diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit47/META-INF/MANIFEST.MF
b/tycho-surefire/org.eclipse.tycho.surefire.junit47/META-INF/MANIFEST.MF
-index 578ad2c..9e16141 100644
+index 578ad2c..22fd6eb 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
@@ -97,9 +96,9 @@ index 578ad2c..9e16141 100644
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .,
- jars/surefire-junit47-2.10.jar
-+ jars/surefire-junit47-2.12.4.jar,
-+ jars/common-junit48-2.12.4.jar,
-+ jars/surefire-grouper-2.12.4.jar
++ jars/surefire-junit47-2.13.jar,
++ jars/common-junit48-2.13.jar,
++ jars/surefire-grouper-2.13.jar
Import-Package: junit.framework;version="3.0.0",
org.junit;version="[4.7,5)",
org.junit.runner;version="[4.7,5)",
@@ -383,7 +382,7 @@ index fb6bede..0000000
-
-}
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 00f8fee..51abc8d 100644
+index 00f8fee..73a0065 100644
--- a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/META-INF/MANIFEST.MF
+++ b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/META-INF/MANIFEST.MF
@@ -4,8 +4,10 @@ Require-Bundle: org.eclipse.osgi;bundle-version="3.2.2",
@@ -392,9 +391,9 @@ index 00f8fee..51abc8d 100644
Bundle-ClassPath: .,
- jars/surefire-booter-2.10.jar,
- jars/surefire-api-2.10.jar
-+ jars/surefire-booter-2.12.4.jar,
-+ jars/surefire-api-2.12.4.jar,
-+ jars/maven-surefire-common-2.12.4.jar,
++ jars/surefire-booter-2.13.jar,
++ jars/surefire-api-2.13.jar,
++ jars/maven-surefire-common-2.13.jar,
+ jars/plexus-utils-3.0.jar
Bundle-Version: 0.16.0
Bundle-Name: Tycho Surefire OSGi Booter Eclipse Application (Incubation)
@@ -421,7 +420,7 @@ index 100806a..23829a2 100644
</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 791221b..736e4a7 100644
+index 791221b..a305667 100644
---
a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java
+++
b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java
@@ -18,20 +18,25 @@ import java.io.IOException;
@@ -461,7 +460,7 @@ index 791221b..736e4a7 100644
boolean inForkedVM = true;
boolean trimStacktrace = true;
boolean useSystemClassloader = false;
-@@ -64,28 +69,33 @@ public class OsgiSurefireBooter {
+@@ -64,26 +69,31 @@ public class OsgiSurefireBooter {
boolean printSummary = true;
boolean disableXmlReport = false;
ClassLoader testClassLoader = getBundleClassLoader(plugin);
@@ -482,30 +481,29 @@ index 791221b..736e4a7 100644
- reporterConfig, null, testRequest, extractProviderProperties(testProps),
null);
+ ProviderConfiguration providerConfiguration = new
ProviderConfiguration(dirScannerParams,
+ RunOrderParameters.DEFAULT(), failIfNoTests, reporterConfig, null,
testRequest,
-+ extractProviderProperties(testProps), null);
++ extractProviderProperties(testProps), null, false);
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);
-+
-+ RunResult result = ProviderFactory.invokeProvider(null, testClassLoader,
surefireClassLoader,
-+ createReporterFactory(startupReportConfig), providerConfiguration,
false, startupConfiguration, true);
- RunResult result = surefireStarter.runSuitesInProcess();
- return result.getForkedProcessCode();
- }
-
-+ private static ReporterFactory createReporterFactory(StartupReportConfiguration
startupReportConfig) {
-+ return new DefaultReporterFactory(startupReportConfig);
+- return result.getForkedProcessCode();
++ RunResult result = ProviderFactory.invokeProvider(null, testClassLoader,
surefireClassLoader,
++ createReporterFactory(startupReportConfig), providerConfiguration,
false, startupConfiguration, true);
++
++ return result.getFailsafeCode();
+ }
+
++ private static ReporterFactory createReporterFactory(StartupReportConfiguration
startupReportConfig) {
++ return new DefaultReporterFactory(startupReportConfig);
+ }
+
/*
- * See TestMojo#mergeProviderProperties
- */
diff --git a/tycho-surefire/pom.xml b/tycho-surefire/pom.xml
-index eab06be..24e51d3 100644
+index eab06be..e6e9b9f 100644
--- a/tycho-surefire/pom.xml
+++ b/tycho-surefire/pom.xml
@@ -26,7 +26,7 @@
@@ -513,7 +511,7 @@ index eab06be..24e51d3 100644
<properties>
- <surefire-version>2.10</surefire-version>
-+ <surefire-version>2.12.4</surefire-version>
++ <surefire-version>2.13</surefire-version>
</properties>
<modules>
@@ -533,7 +531,7 @@ index 8a099eb..2970388 100644
</dependencies>
</project>
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 a676571..112131d 100644
+index 393007b..ba936e5 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
@@ -18,6 +18,7 @@ import java.io.IOException;
@@ -556,7 +554,7 @@ index a676571..112131d 100644
import org.apache.maven.toolchain.Toolchain;
import org.apache.maven.toolchain.ToolchainManager;
import org.codehaus.plexus.util.FileUtils;
-@@ -628,6 +630,27 @@ public class TestMojo extends AbstractMojo {
+@@ -629,6 +631,27 @@ public class TestMojo extends AbstractMojo {
providerProperties.put("perCoreThreadCount",
String.valueOf(perCoreThreadCount));
providerProperties.put("useUnlimitedThreads",
String.valueOf(useUnlimitedThreads));
}
@@ -584,7 +582,7 @@ index a676571..112131d 100644
for (Map.Entry entry : providerProperties.entrySet()) {
surefireProps.put("__provider." + entry.getKey(),
entry.getValue());
}
-@@ -672,7 +695,7 @@ public class TestMojo extends AbstractMojo {
+@@ -673,7 +696,7 @@ public class TestMojo extends AbstractMojo {
case 0:
getLog().info("All tests passed!");
break;
@@ -593,7 +591,7 @@ index a676571..112131d 100644
String message = "No tests found.";
if (failIfNoTests) {
throw new MojoFailureException(message);
-@@ -680,7 +703,7 @@ public class TestMojo extends AbstractMojo {
+@@ -681,7 +704,7 @@ public class TestMojo extends AbstractMojo {
getLog().warn(message);
}
break;
diff --git a/tycho-use-custom-resolver.patch b/tycho-use-custom-resolver.patch
index 877bd59..a007aac 100644
--- a/tycho-use-custom-resolver.patch
+++ b/tycho-use-custom-resolver.patch
@@ -1,4 +1,4 @@
-From 0dccc0201d08f24cc0fdc7a262cf36e5761cb012 Mon Sep 17 00:00:00 2001
+From eed70befcb3c5b55170a9847da2257b416e96314 Mon Sep 17 00:00:00 2001
From: Roland Grunberg <rgrunber(a)redhat.com>
Date: Tue, 12 Jun 2012 10:38:51 -0400
Subject: [PATCH] Implement a custom resolver for Tycho in local mode.
@@ -21,18 +21,18 @@ tycho.local.keepTarget is set.
Change-Id: Ia1ece07ece2412bc4a88901631f3f651ad2b634b
---
- .../tycho/p2/target/TargetDefinitionResolver.java | 10 ++--
+ .../tycho/p2/target/TargetDefinitionResolver.java | 11 +++--
.../tycho/p2/target/TargetPlatformBuilderImpl.java | 55 ++++++++++++++++++++--
.../core/maven/TychoMavenLifecycleParticipant.java | 16 +++++++
.../tycho/core/osgitools/AbstractTychoProject.java | 24 ++++++++++
.../tycho/core/osgitools/OsgiBundleProject.java | 29 +++++++++++-
- .../DefaultTargetPlatformConfigurationReader.java | 5 +-
+ .../DefaultTargetPlatformConfigurationReader.java | 6 ++-
.../osgi/runtime/TychoOsgiRuntimeLocator.java | 15 ++++++
.../p2/resolver/P2TargetPlatformResolver.java | 11 +++++
- 8 files changed, 155 insertions(+), 10 deletions(-)
+ 8 files changed, 157 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 5cc8718..5513dda 100644
+index 5cc8718..7e4fcc1 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 5cc8718..5513dda 100644
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-@@ -104,9 +105,12 @@ public class TargetDefinitionResolver {
+@@ -104,9 +105,13 @@ public class TargetDefinitionResolver {
List<IMetadataRepository> metadataRepositories = new
ArrayList<IMetadataRepository>();
for (Repository repository : iuLocationDefinition.getRepositories()) {
@@ -51,7 +51,8 @@ index 5cc8718..5513dda 100644
- artifactRepositories.add(repository.getLocation());
- metadataRepositories.add(loadRepository(repository));
+ // We cannot resolve a non-file URI in local mode
-+ if (System.getProperty("maven.local.mode") == null ||
URIUtil.isFileURI(repository.getLocation())) {
++ if ((System.getenv("TYCHO_MVN_LOCAL") == null &&
System.getenv("TYCHO_MVN_RPMBUILD") == null)
++ || URIUtil.isFileURI(repository.getLocation())) {
+ repositoryIdManager.addMapping(repository.getId(),
repository.getLocation());
+ artifactRepositories.add(repository.getLocation());
+ metadataRepositories.add(loadRepository(repository));
@@ -60,7 +61,7 @@ index 5cc8718..5513dda 100644
IQueryable<IInstallableUnit> locationUnits = new
CompoundQueryable<IInstallableUnit>(
diff --git
a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformBuilderImpl.java
b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformBuilderImpl.java
-index c56eeff..73f8835 100644
+index c56eeff..bb45548 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;
@@ -78,7 +79,7 @@ index c56eeff..73f8835 100644
IArtifactRepository artifactRepository = null;
+ // We cannot resolve a non-file URI in local mode while offline
-+ if (System.getProperty("maven.local.mode") != null && offline
&& !URIUtil.isFileURI(location.getURL())) {
++ if (System.getenv("TYCHO_MVN_RPMBUILD") != null &&
!URIUtil.isFileURI(location.getURL())) {
+ return;
+ }
+
@@ -94,7 +95,7 @@ index c56eeff..73f8835 100644
- for (IMetadataRepository repository : metadataRepositories) {
- IQueryResult<IInstallableUnit> matches =
repository.query(QueryUtil.ALL_UNITS, sub.newChild(100));
- result.addAll(matches.toUnmodifiableSet());
-+ if (System.getProperty("maven.local.mode") != null &&
!offline) {
++ if (System.getenv("TYCHO_MVN_LOCAL") != null) {
+ final String uri = "file:" +
System.getProperty("user.dir") + "/.m2/p2/repo";
+ final IExpression notmatchIU_ID = ExpressionUtil.parse("id !=
$0");
+ IMetadataRepository systemLocalP2Repo = null;
@@ -141,7 +142,7 @@ index c56eeff..73f8835 100644
if (logger.isDebugEnabled()) {
IQueryResult<IInstallableUnit> 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 cccb6ff..9e8268d 100644
+index cccb6ff..fb8bf78 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 @@
@@ -157,7 +158,7 @@ index cccb6ff..9e8268d 100644
configureComponents(session);
+ // Create a system p2 repository for local dependency resolution
-+ if (System.getProperty("maven.local.mode") != null) {
++ if (System.getenv("TYCHO_MVN_LOCAL") != null ||
System.getenv("TYCHO_MVN_RPMBUILD") != null) {
+ try {
+ String[] cmd = new String[] {
"/usr/share/java/tycho/copy-platform-all",
+ System.getProperty("user.dir") +
"/.m2/p2/repo" };
@@ -175,7 +176,7 @@ index cccb6ff..9e8268d 100644
resolver.setupProject(session, project,
DefaultReactorProject.adapt(project));
}
diff --git
a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/AbstractTychoProject.java
b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/AbstractTychoProject.java
-index 695133d..5a698a2 100644
+index 695133d..6303f48 100644
---
a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/AbstractTychoProject.java
+++
b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/AbstractTychoProject.java
@@ -20,6 +20,9 @@ import org.eclipse.tycho.artifacts.TargetPlatform;
@@ -209,7 +210,7 @@ index 695133d..5a698a2 100644
+ try {
+ ExecutionEnvironment ee =
ExecutionEnvironmentUtils.getExecutionEnvironment(profile);
+
-+ if (System.getProperty("maven.local.mode") != null) {
++ if (System.getenv("TYCHO_MVN_LOCAL") != null ||
System.getenv("TYCHO_MVN_RPMBUILD") != null) {
+ // EE must be at least JavaSE-1.6
+ final ExecutionEnvironment javaSE16 =
ExecutionEnvironmentUtils.getExecutionEnvironment("JavaSE-1.6");
+ if (!
ee.isCompatibleCompilerTargetLevel(javaSE16.getCompilerTargetLevel())) {
@@ -228,7 +229,7 @@ index 695133d..5a698a2 100644
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 fb73469..efe97ae 100644
+index fb73469..6c2cee3 100644
--- a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiBundleProject.java
+++ b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiBundleProject.java
@@ -45,7 +45,9 @@ import org.eclipse.tycho.core.BundleProject;
@@ -258,7 +259,7 @@ index fb73469..efe97ae 100644
+ ExecutionEnvironment manifestMinimalEE = Collections.min(envs);
+ ExecutionEnvironment tmp;
+
-+ if (System.getProperty("maven.local.mode") != null) {
++ if (System.getenv("TYCHO_MVN_LOCAL") != null ||
System.getenv("TYCHO_MVN_RPMBUILD") != null) {
+ try {
+ // EE must be at least JavaSE-1.6
+ final ExecutionEnvironment javaSE16 =
ExecutionEnvironmentUtils.getExecutionEnvironment("JavaSE-1.6");
@@ -283,23 +284,24 @@ index fb73469..efe97ae 100644
}
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 5c4a26f..9f93b3b 100644
+index 5c4a26f..802c9dd 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
-@@ -64,7 +64,10 @@ public class DefaultTargetPlatformConfigurationReader {
+@@ -64,7 +64,11 @@ public class DefaultTargetPlatformConfigurationReader {
+ configuration.toString());
}
- addTargetEnvironments(result, project, configuration);
+ // Use the defined environments only in local mode with
tycho.local.keepTarget
-+ if (System.getProperty("maven.local.mode") == null ||
System.getProperty("tycho.local.keepTarget") != null) {
++ if ((System.getenv("TYCHO_MVN_LOCAL") == null &&
System.getenv("TYCHO_MVN_RPMBUILD") == null)
++ || System.getProperty("tycho.local.keepTarget") !=
null) {
+ addTargetEnvironments(result, project, configuration);
+ }
setTargetPlatformResolver(result, configuration);
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
+index 9935c5f..9e539e6 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;
@@ -323,7 +325,7 @@ index 9935c5f..0885aea 100644
dependency.getVersion(), dependency.getType());
+ // If we are in local mode, find the artifact on the system
-+ if (System.getProperty("maven.local.mode") != null) {
++ if (System.getenv("TYCHO_MVN_LOCAL") != null ||
System.getenv("TYCHO_MVN_RPMBUILD") != null) {
+ JavadirWorkspaceReader wReader = new JavadirWorkspaceReader();
+ DefaultArtifact newArtifact = new DefaultArtifact(artifact.getGroupId()
+ + ":" + artifact.getArtifactId()
@@ -339,7 +341,7 @@ index 9935c5f..0885aea 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 1c897b9..13803dc 100644
+index 1c897b9..d869658 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
@@ -191,6 +191,17 @@ public class P2TargetPlatformResolver extends
AbstractTargetPlatformResolver imp
@@ -348,7 +350,7 @@ index 1c897b9..13803dc 100644
tpBuilder.setFailOnDuplicateIUs(failOnDuplicateIUs);
+
+ // Add Fedora Local P2 Repository when running in local mode
-+ if (System.getProperty("maven.local.mode") != null) {
++ if (System.getenv("TYCHO_MVN_LOCAL") != null ||
System.getenv("TYCHO_MVN_RPMBUILD") != null) {
+ String uri = "file:" + System.getProperty("user.dir") +
"/.m2/p2/repo";
+ try {
+ tpBuilder.addP2Repository(new MavenRepositoryLocation(uri, new
URI(uri)));
diff --git a/tycho.spec b/tycho.spec
index c348608..dc4a46b 100644
--- a/tycho.spec
+++ b/tycho.spec
@@ -8,7 +8,7 @@
Name: tycho
Version: 0.16.0
-Release: 19%{?dist}
+Release: 20%{?dist}
Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with
Maven
Group: Development/Libraries
@@ -165,7 +165,7 @@ if [ "${sysVer}" == "${buildVer}" ]; then
echo "Performing intermediary build"
%patch4 -p1
-mvn-rpmbuild -Dmaven.local.depmap.file=%{SOURCE2} -DskipTychoVersionCheck
-Dmaven.test.skip=true install javadoc:aggregate
+/usr/share/maven/bin/mvn-rpmbuild -Dmaven.local.depmap.file=%{SOURCE2}
-DskipTychoVersionCheck -Dmaven.test.skip=true install javadoc:aggregate
%patch4 -p1 -R
%patch5 -p1
@@ -259,6 +259,10 @@ install -m 644 $osgiJarPath
$RPM_BUILD_ROOT%{_javadir}/%{name}/osgi.jar
%{_javadocdir}/%{name}
%changelog
+* Thu Jan 24 2013 Roland Grunberg <rgrunber(a)redhat.com> 0.16.0-20
+- Use TYCHO_MVN_{LOCAL,RPMBUILD} to determine how maven was called.
+- Update to maven-surefire 2.13.
+
* Thu Dec 20 2012 Roland Grunberg <rgrunber(a)redhat.com> 0.16.0-19
- Fix upstream Bug 361204.