Accepting request 818536 from Java:packages

1.6.0

OBS-URL: https://build.opensuse.org/request/show/818536
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tycho?expand=0&rev=4
This commit is contained in:
Dominique Leuenberger 2020-07-16 10:12:07 +00:00 committed by Git OBS Bridge
commit caea484e21
20 changed files with 586 additions and 457 deletions

View File

@ -1,14 +1,18 @@
From 33bb1bece17d1b6f6e81b149828fa1287aa61093 Mon Sep 17 00:00:00 2001
From a09c1b1a9068d53d83b84948fb1a5b1379b01bcc Mon Sep 17 00:00:00 2001
From: Roland Grunberg <rgrunber@redhat.com>
Date: Tue, 12 Jun 2012 09:56:38 -0400
Subject: [PATCH] Fix the Tycho build to work on Fedora.
Subject: [PATCH 1/8] Fix the Tycho build to work on Fedora.
Minor fixes of limited scope needed to have Tycho building on Fedora.
Change-Id: Ic8c0514c1fa10ee53580d2654ac6a363ccd66814
---
.../core/maven/TychoMavenLifecycleParticipant.java | 4 +++-
.../tycho/test/AbstractTychoIntegrationTest.java | 11 +++++------
2 files changed, 8 insertions(+), 7 deletions(-)
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
index 3cba466..f733774 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
@ -23,10 +27,10 @@ index b00c344..bc05c2d 100644
}
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
index 9d7bcb7..5b97868 100644
--- 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
@@ -115,12 +115,11 @@ public abstract class AbstractTychoIntegrationTest {
@@ -113,12 +113,11 @@ public abstract class AbstractTychoIntegrationTest {
verifier.getCliOptions().add(customOptions);
}
@ -44,3 +48,6 @@ index 097bdeb..f90b10c 100644
}
return verifier;
--
2.21.1

View File

@ -1,7 +1,7 @@
From 33e4d975ad449411522cf13e01c92992c8516dc6 Mon Sep 17 00:00:00 2001
From 35decf21d5582e6009f88dcbbcd81b1ab8709d04 Mon Sep 17 00:00:00 2001
From: Roland Grunberg <rgrunber@redhat.com>
Date: Tue, 12 Jun 2012 10:38:51 -0400
Subject: [PATCH] Implement a custom resolver for Tycho in local mode.
Subject: [PATCH 2/8] Implement a custom resolver for Tycho in local mode.
When running in local mode, dependencies should be resolved by looking
on the local system. Remote repositories should be ignored unless
@ -31,29 +31,29 @@ for our runtime (fedora-eclipse) to avoid collisions.
Change-Id: Ia1ece07ece2412bc4a88901631f3f651ad2b634b
---
.../embedder/internal/DefaultEquinoxEmbedder.java | 11 +++++-
.../p2/remote/RemoteRepositoryCacheManager.java | 14 +++++++
.../tycho/p2/target/TargetDefinitionResolver.java | 17 ++++++--
.../p2/target/TargetPlatformBundlePublisher.java | 15 ++------
.../tycho/p2/target/TargetPlatformFactoryImpl.java | 45 ++++++++++++++++++++--
.../tycho/p2/repository/LocalRepositoryReader.java | 44 ++++++++++++++++++++-
.../facade/TargetPlatformConfigurationStub.java | 6 ++-
.../tycho-bundles-external.product | 1 +
.../eclipse/tycho/core/locking/FileLockerImpl.java | 26 ++++++++++---
.../core/maven/TychoMavenLifecycleParticipant.java | 13 +++++++
.../tycho/core/osgitools/AbstractTychoProject.java | 23 +++++++++++
.../tycho/core/osgitools/OsgiBundleProject.java | 5 ++-
.../DefaultTargetPlatformConfigurationReader.java | 6 ++-
.../osgi/runtime/TychoOsgiRuntimeLocator.java | 27 ++++++++++---
tycho-p2/tycho-p2-facade/pom.xml | 5 +++
.../tycho/p2/resolver/P2DependencyResolver.java | 8 ++++
16 files changed, 228 insertions(+), 38 deletions(-)
.../internal/DefaultEquinoxEmbedder.java | 11 ++++-
.../remote/RemoteRepositoryCacheManager.java | 11 +++++
.../p2/target/TargetDefinitionResolver.java | 17 +++++--
.../target/TargetPlatformBundlePublisher.java | 15 ++-----
.../p2/target/TargetPlatformFactoryImpl.java | 45 +++++++++++++++++--
.../p2/repository/LocalRepositoryReader.java | 44 +++++++++++++++++-
.../TargetPlatformConfigurationStub.java | 6 ++-
.../tycho-bundles-external.product | 1 +
.../tycho/core/locking/FileLockerImpl.java | 26 ++++++++---
.../maven/TychoMavenLifecycleParticipant.java | 13 ++++++
.../core/osgitools/AbstractTychoProject.java | 23 ++++++++++
.../core/osgitools/OsgiBundleProject.java | 5 ++-
...aultTargetPlatformConfigurationReader.java | 6 ++-
.../osgi/runtime/TychoOsgiRuntimeLocator.java | 27 ++++++++---
tycho-p2/tycho-p2-facade/pom.xml | 5 +++
.../p2/resolver/P2DependencyResolver.java | 8 ++++
16 files changed, 225 insertions(+), 38 deletions(-)
diff --git a/sisu-equinox/sisu-equinox-embedder/src/main/java/org/eclipse/sisu/equinox/embedder/internal/DefaultEquinoxEmbedder.java b/sisu-equinox/sisu-equinox-embedder/src/main/java/org/eclipse/sisu/equinox/embedder/internal/DefaultEquinoxEmbedder.java
index ed01c2d..759f005 100644
index 359c464..b644539 100644
--- a/sisu-equinox/sisu-equinox-embedder/src/main/java/org/eclipse/sisu/equinox/embedder/internal/DefaultEquinoxEmbedder.java
+++ b/sisu-equinox/sisu-equinox-embedder/src/main/java/org/eclipse/sisu/equinox/embedder/internal/DefaultEquinoxEmbedder.java
@@ -239,7 +239,14 @@ public class DefaultEquinoxEmbedder extends AbstractLogEnabled implements Equino
@@ -240,7 +240,14 @@ public class DefaultEquinoxEmbedder extends AbstractLogEnabled
if (verIdx > 0) {
bundles.append(name.substring(0, verIdx));
} else {
@ -69,7 +69,7 @@ index ed01c2d..759f005 100644
}
}
}
@@ -247,7 +254,7 @@ public class DefaultEquinoxEmbedder extends AbstractLogEnabled implements Equino
@@ -248,7 +255,7 @@ public class DefaultEquinoxEmbedder extends AbstractLogEnabled
}
protected boolean isFrameworkBundle(File file) {
@ -79,7 +79,7 @@ index ed01c2d..759f005 100644
String getReferenceUrl(File file) {
diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/remote/RemoteRepositoryCacheManager.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/remote/RemoteRepositoryCacheManager.java
index 1d3a029..2ec5c59 100644
index 1f233e1..c9a6dc1 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/remote/RemoteRepositoryCacheManager.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/remote/RemoteRepositoryCacheManager.java
@@ -12,14 +12,18 @@ package org.eclipse.tycho.p2.remote;
@ -116,7 +116,7 @@ index 1d3a029..2ec5c59 100644
if (offline) {
if (cacheFile != null) {
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 c614e15..d6ae1af 100644
index d95cb64..fb0301c 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
@@ -20,6 +20,7 @@ import java.util.Set;
@ -158,7 +158,7 @@ index c614e15..d6ae1af 100644
}
diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformBundlePublisher.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformBundlePublisher.java
index 66a252f..0195871 100644
index 6a59c2a..0d15db9 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformBundlePublisher.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformBundlePublisher.java
@@ -28,6 +28,7 @@ import org.eclipse.tycho.core.shared.MavenLogger;
@ -198,7 +198,7 @@ index 66a252f..0195871 100644
private File getBaseDir() {
diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformFactoryImpl.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformFactoryImpl.java
index 41fb4c6..75b25ac 100644
index 7854bca..2247be6 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformFactoryImpl.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformFactoryImpl.java
@@ -32,6 +32,9 @@ import org.eclipse.core.runtime.URIUtil;
@ -268,7 +268,7 @@ index 41fb4c6..75b25ac 100644
}
}
diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryReader.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryReader.java
index 8d36462..b5c8c55 100644
index e05f871..74b8028 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryReader.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryReader.java
@@ -11,6 +11,8 @@
@ -280,7 +280,7 @@ index 8d36462..b5c8c55 100644
public class LocalRepositoryReader implements RepositoryReader {
@@ -21,8 +23,46 @@
@@ -21,8 +23,46 @@ public class LocalRepositoryReader implements RepositoryReader {
}
@Override
@ -306,7 +306,7 @@ index 8d36462..b5c8c55 100644
+ // Retrieve the workspace reader from the plexus container
+ Method mLookup = pclazz.getMethod("lookup", String.class, String.class);
+ Object reader = mLookup.invoke(plexus, "org.eclipse.aether.repository.WorkspaceReader", "ide");
+
+ // Create an Aether Artifact based on GAV, classifier, and extension
+ Class iartclazz = Class.forName("org.eclipse.aether.artifact.Artifact");
+ Class artclazz = Class.forName("org.eclipse.aether.artifact.DefaultArtifact");
@ -326,11 +326,11 @@ index 8d36462..b5c8c55 100644
+ }
+ }
+ return file;
+
+ }
}
diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/target/facade/TargetPlatformConfigurationStub.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/target/facade/TargetPlatformConfigurationStub.java
index 22cca24..670f013 100644
index 19d12c6..abe89e8 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/target/facade/TargetPlatformConfigurationStub.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/target/facade/TargetPlatformConfigurationStub.java
@@ -56,7 +56,11 @@ public class TargetPlatformConfigurationStub {
@ -347,21 +347,19 @@ index 22cca24..670f013 100644
// convenience method for tests
diff --git a/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product b/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product
index 7c99168..28ad59f 100644
index 8af9d88..b0ef41f 100644
--- a/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product
+++ b/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product
@@ -79,6 +79,9 @@
@@ -77,6 +77,7 @@
<plugin id="org.sat4j.core"/>
<plugin id="org.sat4j.pb"/>
<plugin id="org.tukaani.xz"/>
+ <plugin id="osgi.cmpn"/>
+ <plugin id="javax.servlet-api"/>
+ <plugin id="org.fedoraproject.p2"/>
</plugins>
<configurations>
diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/locking/FileLockerImpl.java b/tycho-core/src/main/java/org/eclipse/tycho/core/locking/FileLockerImpl.java
index 86253bd..cef15d2 100644
index e4612c3..3abcc5d 100644
--- a/tycho-core/src/main/java/org/eclipse/tycho/core/locking/FileLockerImpl.java
+++ b/tycho-core/src/main/java/org/eclipse/tycho/core/locking/FileLockerImpl.java
@@ -27,22 +27,36 @@ public class FileLockerImpl implements FileLocker {
@ -408,7 +406,7 @@ index 86253bd..cef15d2 100644
throw new RuntimeException(e);
} catch (IOException e) {
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 1160f6c..acb2a1d 100644
index f733774..1bd97e6 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
@@ -30,6 +30,7 @@ import org.apache.maven.project.MavenProject;
@ -439,7 +437,7 @@ index 1160f6c..acb2a1d 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 dfd4b6f..c05fcd8 100644
index 94b02f1..f833854 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
@@ -19,6 +19,9 @@ import org.eclipse.tycho.artifacts.DependencyArtifacts;
@ -489,10 +487,10 @@ index dfd4b6f..c05fcd8 100644
+ }
}
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 fae4eb7..3f5289c 100644
index 13ed51d..bd21204 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
@@ -502,6 +502,7 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro
@@ -504,6 +504,7 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro
String pdeProfile = getEclipsePluginProject(DefaultReactorProject.adapt(project)).getBuildProperties()
.getJreCompilationProfile();
if (pdeProfile != null) {
@ -500,7 +498,7 @@ index fae4eb7..3f5289c 100644
sink.setProfileConfiguration(pdeProfile.trim(), "build.properties");
} else {
@@ -512,13 +513,13 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro
@@ -514,13 +515,13 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro
switch (tpConfiguration.getBREEHeaderSelectionPolicy()) {
case first:
@ -517,7 +515,7 @@ index fae4eb7..3f5289c 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 6fa6b8e..e6d25be 100644
index ed413e1..0b89bae 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
@@ -68,7 +68,11 @@ public class DefaultTargetPlatformConfigurationReader {
@ -534,7 +532,7 @@ index 6fa6b8e..e6d25be 100644
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 c7d95df..ac5bae7 100644
index 35f1b6b..b64653e 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
@@ -12,6 +12,8 @@ package org.eclipse.tycho.osgi.runtime;
@ -603,7 +601,7 @@ index c7d95df..ac5bae7 100644
description.addBundle(artifact.getFile());
}
diff --git a/tycho-p2/tycho-p2-facade/pom.xml b/tycho-p2/tycho-p2-facade/pom.xml
index b567d50..34baa1a 100644
index f1a3b34..3f2c3d2 100644
--- a/tycho-p2/tycho-p2-facade/pom.xml
+++ b/tycho-p2/tycho-p2-facade/pom.xml
@@ -57,6 +57,11 @@
@ -619,10 +617,10 @@ index b567d50..34baa1a 100644
<build>
diff --git a/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2DependencyResolver.java b/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2DependencyResolver.java
index ae2dc38..a0c9969 100644
index 47bf362..bc4a7bb 100644
--- a/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2DependencyResolver.java
+++ b/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2DependencyResolver.java
@@ -88,6 +88,7 @@ import org.eclipse.tycho.p2.resolver.facade.P2ResolverFactory;
@@ -91,6 +91,7 @@ import org.eclipse.tycho.p2.resolver.facade.P2ResolverFactory;
import org.eclipse.tycho.p2.target.facade.PomDependencyCollector;
import org.eclipse.tycho.p2.target.facade.TargetPlatformConfigurationStub;
import org.eclipse.tycho.repository.registry.facade.ReactorRepositoryManagerFacade;
@ -630,7 +628,7 @@ index ae2dc38..a0c9969 100644
@Component(role = DependencyResolver.class, hint = P2DependencyResolver.ROLE_HINT, instantiationStrategy = "per-lookup")
public class P2DependencyResolver extends AbstractLogEnabled implements DependencyResolver, Initializable {
@@ -208,6 +209,13 @@ public class P2DependencyResolver extends AbstractLogEnabled implements Dependen
@@ -211,6 +212,13 @@ public class P2DependencyResolver extends AbstractLogEnabled implements Dependen
pomDependencies.setProjectLocation(project.getBasedir());
}
@ -645,4 +643,5 @@ index ae2dc38..a0c9969 100644
addEntireP2RepositoryToTargetPlatform(repository, tpConfiguration);
}
--
2.1.0
2.21.1

View File

@ -1,7 +1,8 @@
From 824f4a6c2db4f229e43de0c217d00a0c2c5b723d Mon Sep 17 00:00:00 2001
From a212725a6c4cad9d29db41b37ed6d101c2c7cb72 Mon Sep 17 00:00:00 2001
From: Roland Grunberg <rgrunber@redhat.com>
Date: Wed, 18 Jun 2014 13:01:31 -0400
Subject: [PATCH] Tycho should always delegate artifact resolution to Maven.
Subject: [PATCH 3/8] Tycho should always delegate artifact resolution to
Maven.
Maven resolves dependencies from the following locations in the
following order:
@ -16,42 +17,32 @@ locations.
Change-Id: Ia44969ed1064965a82c3507a63e54caeebb75b18
---
.../META-INF/MANIFEST.MF | 1 +
.../eclipse/tycho/core/shared/MavenContext.java | 2 +
.../tycho/core/shared/MavenContextImpl.java | 10 ++++-
.../tycho/core/shared/MavenRepositorySystem.java | 19 +++++++++
.../local/LocalArtifactRepositoryP2APITest.java | 4 +-
.../local/LocalMetadataRepositoryTest.java | 3 +-
.../repository/local/LocalArtifactRepository.java | 8 ++--
.../local/LocalArtifactRepositoryFactory.java | 3 +-
.../local/index/LocalRepositoryP2IndicesImpl.java | 7 ++++
.../p2/remote/RemoteAgentMavenMirrorsTest.java | 3 +-
.../RemoteAgentMetadataRepositoryCacheTest.java | 5 ++-
.../target/TargetPlatformBundlePublisherTest.java | 3 +-
.../tycho/p2/target/TestResolverFactory.java | 5 ++-
.../tycho/p2/resolver/P2ResolverFactoryImpl.java | 8 ++--
.../p2/target/PomDependencyCollectorImpl.java | 2 +-
.../p2/target/TargetPlatformBundlePublisher.java | 13 ++++--
.../p2/repository/LocalRepositoryP2Indices.java | 4 ++
.../tycho/p2/repository/LocalRepositoryReader.java | 49 +++++-----------------
.../testutil/TemporaryLocalMavenRepository.java | 4 +-
.../tycho/test/util/MavenRepositorySystemStub.java | 30 +++++++++++++
.../adapters/MavenRepositorySystemAdapter.java | 37 ++++++++++++++++
.../configuration/MavenContextConfigurator.java | 8 +++-
22 files changed, 166 insertions(+), 62 deletions(-)
.../tycho/core/shared/MavenContext.java | 2 +
.../tycho/core/shared/MavenContextImpl.java | 10 +++-
.../core/shared/MavenRepositorySystem.java | 19 +++++++
.../LocalArtifactRepositoryP2APITest.java | 4 +-
.../local/LocalMetadataRepositoryTest.java | 3 +-
.../local/LocalArtifactRepository.java | 8 +--
.../local/LocalArtifactRepositoryFactory.java | 3 +-
.../index/LocalRepositoryP2IndicesImpl.java | 7 +++
.../remote/RemoteAgentMavenMirrorsTest.java | 3 +-
...emoteAgentMetadataRepositoryCacheTest.java | 5 +-
.../TargetPlatformBundlePublisherTest.java | 3 +-
.../tycho/p2/target/TestResolverFactory.java | 5 +-
.../p2/resolver/P2ResolverFactoryImpl.java | 8 +--
.../p2/target/PomDependencyCollectorImpl.java | 2 +-
.../target/TargetPlatformBundlePublisher.java | 13 +++--
.../repository/LocalRepositoryP2Indices.java | 4 ++
.../p2/repository/LocalRepositoryReader.java | 49 +++++--------------
.../TemporaryLocalMavenRepository.java | 4 +-
.../test/util/MavenRepositorySystemStub.java | 30 ++++++++++++
.../MavenRepositorySystemAdapter.java | 37 ++++++++++++++
.../MavenContextConfigurator.java | 8 ++-
21 files changed, 165 insertions(+), 62 deletions(-)
create mode 100644 tycho-bundles/org.eclipse.tycho.core.shared/src/main/java/org/eclipse/tycho/core/shared/MavenRepositorySystem.java
create mode 100644 tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/MavenRepositorySystemStub.java
create mode 100644 tycho-core/src/main/java/org/eclipse/tycho/osgi/adapters/MavenRepositorySystemAdapter.java
diff --git 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
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
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
--- a/tycho-bundles/org.eclipse.tycho.core.shared/src/main/java/org/eclipse/tycho/core/shared/MavenContext.java
@ -64,7 +55,7 @@ index d63c1f1..cd8594d 100644
+
}
diff --git a/tycho-bundles/org.eclipse.tycho.core.shared/src/main/java/org/eclipse/tycho/core/shared/MavenContextImpl.java b/tycho-bundles/org.eclipse.tycho.core.shared/src/main/java/org/eclipse/tycho/core/shared/MavenContextImpl.java
index 7b39d58..a15354f 100644
index d9f7bc6..683772c 100644
--- a/tycho-bundles/org.eclipse.tycho.core.shared/src/main/java/org/eclipse/tycho/core/shared/MavenContextImpl.java
+++ b/tycho-bundles/org.eclipse.tycho.core.shared/src/main/java/org/eclipse/tycho/core/shared/MavenContextImpl.java
@@ -19,18 +19,20 @@ public class MavenContextImpl implements MavenContext {
@ -125,7 +116,7 @@ index 0000000..965e5cd
+
+}
diff --git a/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/src/test/java/org/eclipse/tycho/repository/local/LocalArtifactRepositoryP2APITest.java b/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/src/test/java/org/eclipse/tycho/repository/local/LocalArtifactRepositoryP2APITest.java
index bedc5cb..7df3d17 100644
index 6a03012..f898058 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/src/test/java/org/eclipse/tycho/repository/local/LocalArtifactRepositoryP2APITest.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/src/test/java/org/eclipse/tycho/repository/local/LocalArtifactRepositoryP2APITest.java
@@ -53,6 +53,7 @@ import org.eclipse.tycho.repository.p2base.artifact.repository.ArtifactRepositor
@ -147,28 +138,28 @@ index bedc5cb..7df3d17 100644
testOutputStream = new ProbeOutputStream();
}
diff --git a/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/src/test/java/org/eclipse/tycho/repository/local/LocalMetadataRepositoryTest.java b/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/src/test/java/org/eclipse/tycho/repository/local/LocalMetadataRepositoryTest.java
index 9b6d270..8779841 100644
index 4bcd11c..86bc7ed 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/src/test/java/org/eclipse/tycho/repository/local/LocalMetadataRepositoryTest.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/src/test/java/org/eclipse/tycho/repository/local/LocalMetadataRepositoryTest.java
@@ -32,6 +32,7 @@ import org.eclipse.tycho.p2.repository.LocalRepositoryReader;
@@ -33,6 +33,7 @@ import org.eclipse.tycho.p2.repository.LocalRepositoryReader;
import org.eclipse.tycho.p2.repository.RepositoryLayoutHelper;
import org.eclipse.tycho.p2.repository.TychoRepositoryIndex;
import org.eclipse.tycho.repository.local.index.FileBasedTychoRepositoryIndex;
+import org.eclipse.tycho.test.util.MavenRepositorySystemStub;
import org.eclipse.tycho.test.util.NoopFileLockService;
import org.junit.Assert;
import org.junit.Test;
public class LocalMetadataRepositoryTest extends BaseMavenRepositoryTest {
@@ -48,7 +49,7 @@ public class LocalMetadataRepositoryTest extends BaseMavenRepositoryTest {
@@ -51,7 +52,7 @@ public class LocalMetadataRepositoryTest {
protected IMetadataRepository loadRepository(File location) throws ProvisionException {
return new LocalMetadataRepository(location.toURI(), createMetadataIndex(location), new LocalRepositoryReader(
- location));
+ location, new MavenRepositorySystemStub(location)));
return new LocalMetadataRepository(location.toURI(), createMetadataIndex(location),
- new LocalRepositoryReader(location));
+ new LocalRepositoryReader(location, new MavenRepositorySystemStub(location)));
}
private LocalMetadataRepository createRepository(File location) throws ProvisionException {
private TychoRepositoryIndex createMetadataIndex(File location) {
diff --git a/tycho-bundles/org.eclipse.tycho.p2.maven.repository/src/main/java/org/eclipse/tycho/repository/local/LocalArtifactRepository.java b/tycho-bundles/org.eclipse.tycho.p2.maven.repository/src/main/java/org/eclipse/tycho/repository/local/LocalArtifactRepository.java
index 36946bf..0e2d330 100644
index 1dc9100..00daaa7 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.maven.repository/src/main/java/org/eclipse/tycho/repository/local/LocalArtifactRepository.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.maven.repository/src/main/java/org/eclipse/tycho/repository/local/LocalArtifactRepository.java
@@ -23,6 +23,7 @@ import java.util.Set;
@ -200,7 +191,7 @@ index 36946bf..0e2d330 100644
public LocalArtifactRepository(IProvisioningAgent agent, LocalRepositoryP2Indices localRepoIndices,
diff --git a/tycho-bundles/org.eclipse.tycho.p2.maven.repository/src/main/java/org/eclipse/tycho/repository/local/LocalArtifactRepositoryFactory.java b/tycho-bundles/org.eclipse.tycho.p2.maven.repository/src/main/java/org/eclipse/tycho/repository/local/LocalArtifactRepositoryFactory.java
index fc99483..be2ce88 100644
index 8356f46..34ac8fc 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.maven.repository/src/main/java/org/eclipse/tycho/repository/local/LocalArtifactRepositoryFactory.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.maven.repository/src/main/java/org/eclipse/tycho/repository/local/LocalArtifactRepositoryFactory.java
@@ -18,6 +18,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
@ -221,10 +212,10 @@ index fc99483..be2ce88 100644
}
return null;
diff --git a/tycho-bundles/org.eclipse.tycho.p2.maven.repository/src/main/java/org/eclipse/tycho/repository/local/index/LocalRepositoryP2IndicesImpl.java b/tycho-bundles/org.eclipse.tycho.p2.maven.repository/src/main/java/org/eclipse/tycho/repository/local/index/LocalRepositoryP2IndicesImpl.java
index 2a746f2..7b9983a 100644
index ccc9f64..7f06ecd 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.maven.repository/src/main/java/org/eclipse/tycho/repository/local/index/LocalRepositoryP2IndicesImpl.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.maven.repository/src/main/java/org/eclipse/tycho/repository/local/index/LocalRepositoryP2IndicesImpl.java
@@ -15,6 +15,7 @@ package org.eclipse.tycho.repository.local.index;
@@ -15,6 +15,7 @@ import java.io.File;
import org.eclipse.tycho.core.shared.MavenContext;
import org.eclipse.tycho.core.shared.MavenLogger;
@ -306,7 +297,7 @@ index ae31862..14b8f85 100644
private IMetadataRepository loadHttpRepository(RemoteAgent agent) throws ProvisionException {
diff --git 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
index 50fe92f..3044e97 100644
index f4a356f..e332785 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
@@ -32,6 +32,7 @@ import org.eclipse.tycho.p2.repository.RepositoryLayoutHelper;
@ -327,7 +318,7 @@ index 50fe92f..3044e97 100644
@Test
diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/target/TestResolverFactory.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/target/TestResolverFactory.java
index d982042..127ae11 100644
index 4b44fdd..342437b 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/target/TestResolverFactory.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/target/TestResolverFactory.java
@@ -28,6 +28,7 @@ import org.eclipse.tycho.p2.target.facade.TargetPlatformFactory;
@ -357,7 +348,7 @@ index d982042..127ae11 100644
// TODO use TemporaryLocalMavenRepository
diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/resolver/P2ResolverFactoryImpl.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/resolver/P2ResolverFactoryImpl.java
index a74d4d5..2f903a1 100644
index 1e6050c..2fee3b2 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/resolver/P2ResolverFactoryImpl.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/resolver/P2ResolverFactoryImpl.java
@@ -33,7 +33,7 @@ public class P2ResolverFactoryImpl implements P2ResolverFactory {
@ -390,7 +381,7 @@ index a74d4d5..2f903a1 100644
}
return localArtifactRepository;
diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/PomDependencyCollectorImpl.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/PomDependencyCollectorImpl.java
index 8bee7ba..f2b07a5 100644
index 169f878..62a69a8 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/PomDependencyCollectorImpl.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/PomDependencyCollectorImpl.java
@@ -44,7 +44,7 @@ public class PomDependencyCollectorImpl implements PomDependencyCollector {
@ -403,7 +394,7 @@ index 8bee7ba..f2b07a5 100644
@Override
diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformBundlePublisher.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformBundlePublisher.java
index 0195871..44a0f30 100644
index 0d15db9..a5f8822 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformBundlePublisher.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetPlatformBundlePublisher.java
@@ -25,6 +25,7 @@ import org.eclipse.equinox.p2.publisher.PublisherResult;
@ -469,7 +460,7 @@ index 2122578..5e4a01e 100644
+
}
diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryReader.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryReader.java
index b5c8c55..8842af3 100644
index 74b8028..1aeb3ac 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryReader.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryReader.java
@@ -14,55 +14,28 @@ import java.io.File;
@ -540,7 +531,7 @@ index b5c8c55..8842af3 100644
}
}
diff --git a/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/repository/local/testutil/TemporaryLocalMavenRepository.java b/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/repository/local/testutil/TemporaryLocalMavenRepository.java
index f7cc92c..7bc8a95 100644
index 5c0bcb8..3d05393 100644
--- a/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/repository/local/testutil/TemporaryLocalMavenRepository.java
+++ b/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/repository/local/testutil/TemporaryLocalMavenRepository.java
@@ -14,9 +14,11 @@ import java.io.File;
@ -683,5 +674,5 @@ index e5837e2..137dcb1 100644
}
--
1.9.3
2.21.1

View File

@ -1,7 +1,7 @@
From d113fc877033b24305584d0157a79b7a54be4188 Mon Sep 17 00:00:00 2001
From 2bafd02390adb77ef65c2d706b364cf42eb598cb Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
Date: Wed, 15 Aug 2018 15:58:10 +0100
Subject: [PATCH] Bug 537963 - Make the default EE Java 1.8
Subject: [PATCH 4/8] Bug 537963 - Make the default EE Java 1.8
This allows bundles that don't otherwise specify an EE (for example
if the bundle contains only a plugin.xml, or is a documentation only
@ -12,12 +12,25 @@ of Eclipse.
Change-Id: Ic6e41c3000c85e2e4222e8153e84b7701ab0e750
Signed-off-by: Mat Booth <mat.booth@redhat.com>
---
.../tycho/osgicompiler/test/OsgiCompilerTest.java | 6 +++---
.../ee/ExecutionEnvironmentConfigurationImpl.java | 6 +++---
.../ee/ExecutionEnvironmentConfigurationTest.java | 4 ++--
.../tycho/core/osgitools/EquinoxResolverTest.java | 2 +-
.../org/eclipse/tycho/core/test/TychoTest.java | 5 ++++-
.../src/test/resources/projects/bree/pom.xml | 1 +
.../bree/tycho-default/META-INF/MANIFEST.MF | 5 +++++
.../projects/bree/tycho-default/build.properties | 2 ++
.../resources/projects/bree/tycho-default/pom.xml | 15 +++++++++++++++
9 files changed, 36 insertions(+), 10 deletions(-)
create mode 100644 tycho-core/src/test/resources/projects/bree/tycho-default/META-INF/MANIFEST.MF
create mode 100644 tycho-core/src/test/resources/projects/bree/tycho-default/build.properties
create mode 100644 tycho-core/src/test/resources/projects/bree/tycho-default/pom.xml
diff --git a/tycho-compiler-plugin/src/test/java/org/eclipse/tycho/osgicompiler/test/OsgiCompilerTest.java b/tycho-compiler-plugin/src/test/java/org/eclipse/tycho/osgicompiler/test/OsgiCompilerTest.java
index 7451d97..a0dae08 100644
index a88cf1e..fb00f81 100644
--- a/tycho-compiler-plugin/src/test/java/org/eclipse/tycho/osgicompiler/test/OsgiCompilerTest.java
+++ b/tycho-compiler-plugin/src/test/java/org/eclipse/tycho/osgicompiler/test/OsgiCompilerTest.java
@@ -37,7 +37,7 @@
@@ -37,7 +37,7 @@ import copied.org.apache.maven.plugin.CompilationFailureException;
public class OsgiCompilerTest extends AbstractTychoMojoTestCase {
private static final int TARGET_1_4 = 48;
@ -26,7 +39,7 @@ index 7451d97..a0dae08 100644
protected File storage;
@@ -235,10 +235,10 @@
@@ -235,10 +235,10 @@ public class OsgiCompilerTest extends AbstractTychoMojoTestCase {
List<MavenProject> projects = getSortedProjects(basedir, null);
MavenProject project;
// project with neither POM nor MANIFEST configuration => must fallback to
@ -50,7 +63,7 @@ index 11f0ccf..ea67379 100644
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -19,8 +19,8 @@
@@ -19,8 +19,8 @@ import org.eclipse.tycho.core.ee.shared.SystemCapability;
import org.eclipse.tycho.core.shared.BuildFailureException;
public class ExecutionEnvironmentConfigurationImpl implements ExecutionEnvironmentConfiguration {
@ -62,10 +75,10 @@ index 11f0ccf..ea67379 100644
private static final int PRIMARY = 0;
private static final int SECONDARY = 1;
diff --git a/tycho-core/src/test/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentConfigurationTest.java b/tycho-core/src/test/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentConfigurationTest.java
index 5391eb2..f04fa21 100644
index 5cc98f1..afd9c1e 100644
--- a/tycho-core/src/test/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentConfigurationTest.java
+++ b/tycho-core/src/test/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentConfigurationTest.java
@@ -45,9 +45,9 @@
@@ -45,9 +45,9 @@ public class ExecutionEnvironmentConfigurationTest {
@Test
public void testDefaults() {
@ -78,10 +91,10 @@ index 5391eb2..f04fa21 100644
@Test
diff --git a/tycho-core/src/test/java/org/eclipse/tycho/core/osgitools/EquinoxResolverTest.java b/tycho-core/src/test/java/org/eclipse/tycho/core/osgitools/EquinoxResolverTest.java
index 54f1134..fa2ce8d 100644
index 5c96236..b60ae4b 100644
--- a/tycho-core/src/test/java/org/eclipse/tycho/core/osgitools/EquinoxResolverTest.java
+++ b/tycho-core/src/test/java/org/eclipse/tycho/core/osgitools/EquinoxResolverTest.java
@@ -61,7 +61,7 @@
@@ -61,7 +61,7 @@ public class EquinoxResolverTest extends AbstractTychoMojoTestCase {
properties.put("tycho-version", TychoVersion.getTychoVersion());
List<MavenProject> projects = getSortedProjects(basedir, properties, null);
@ -91,10 +104,10 @@ index 54f1134..fa2ce8d 100644
assertEquals("executionenvironment.manifest-minimal", projects.get(2).getArtifactId());
ExecutionEnvironment ee = TychoProjectUtils.getExecutionEnvironmentConfiguration(projects.get(2))
diff --git a/tycho-core/src/test/java/org/eclipse/tycho/core/test/TychoTest.java b/tycho-core/src/test/java/org/eclipse/tycho/core/test/TychoTest.java
index e8eb7ad..a88e2e4 100644
index ba6b69e..4ebe5ed 100644
--- a/tycho-core/src/test/java/org/eclipse/tycho/core/test/TychoTest.java
+++ b/tycho-core/src/test/java/org/eclipse/tycho/core/test/TychoTest.java
@@ -360,7 +360,7 @@
@@ -360,7 +360,7 @@ public class TychoTest extends AbstractTychoMojoTestCase {
properties.put("tycho-version", TychoVersion.getTychoVersion());
List<MavenProject> projects = getSortedProjects(basedir, properties, null);
@ -103,7 +116,7 @@ index e8eb7ad..a88e2e4 100644
int i = 0;
assertEquals("executionenvironment.manifest", projects.get(++i).getArtifactId());
@@ -377,6 +377,9 @@
@@ -377,6 +377,9 @@ public class TychoTest extends AbstractTychoMojoTestCase {
assertEquals("executionenvironment.pom-default", projects.get(++i).getArtifactId());
assertEquals("OSGi/Minimum-1.2", getActiveEEProfile(projects.get(i)));
@ -165,3 +178,6 @@ index 0000000..f538f5e
+ <packaging>eclipse-plugin</packaging>
+
+</project>
--
2.21.1

View File

@ -0,0 +1,31 @@
From 18bf98457aa55468fc9800eab5b4f78f95f546c9 Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
Date: Thu, 20 Feb 2020 16:08:00 +0000
Subject: [PATCH 5/8] Fix uncaught exception
"unreported exception org.codehaus.plexus.configuration.PlexusConfigurationException; must be caught or declared to be thrown"
---
.../tycho/extras/sourcefeature/SourceFeatureMojo.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tycho-extras/tycho-source-feature-plugin/src/main/java/org/eclipse/tycho/extras/sourcefeature/SourceFeatureMojo.java b/tycho-extras/tycho-source-feature-plugin/src/main/java/org/eclipse/tycho/extras/sourcefeature/SourceFeatureMojo.java
index 9c95f2d..1f34a82 100644
--- a/tycho-extras/tycho-source-feature-plugin/src/main/java/org/eclipse/tycho/extras/sourcefeature/SourceFeatureMojo.java
+++ b/tycho-extras/tycho-source-feature-plugin/src/main/java/org/eclipse/tycho/extras/sourcefeature/SourceFeatureMojo.java
@@ -560,7 +560,12 @@ public class SourceFeatureMojo extends AbstractMojo {
}
private String getAttribute(PlexusConfiguration dom, String attrName) {
- String attr = dom.getAttribute(attrName);
+ String attr = null;
+ try {
+ attr = dom.getAttribute(attrName);
+ } catch (Exception ex) {
+ attr = null;
+ }
if (attr == null) {
return null;
}
--
2.21.1

View File

@ -0,0 +1,142 @@
From eed86a7fefb12f21a9076293dccb1a3c84e051fd Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
Date: Fri, 21 Feb 2020 10:08:13 +0000
Subject: [PATCH 6/8] Mockito does not have test scope
Change-Id: Ia0554670d27f1f05dc0d5c72f9afbbbc32e7fdbb
Signed-off-by: Mat Booth <mat.booth@redhat.com>
---
tycho-artifactcomparator/pom.xml | 5 +++--
tycho-core/pom.xml | 3 ++-
tycho-extras/tycho-eclipserun-plugin/pom.xml | 5 ++++-
tycho-extras/tycho-pomless/pom.xml | 5 +++--
tycho-surefire/tycho-surefire-plugin/pom.xml | 4 +++-
5 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/tycho-artifactcomparator/pom.xml b/tycho-artifactcomparator/pom.xml
index 9039f06..b2ee58a 100644
--- a/tycho-artifactcomparator/pom.xml
+++ b/tycho-artifactcomparator/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- - Copyright (c) 2012 Sonatype Inc. and others.
+ - Copyright (c) 2012, 2020 Sonatype Inc. and others.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
@@ -49,6 +49,7 @@
<dependency>
<artifactId>junit</artifactId>
<groupId>junit</groupId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.sisu</groupId>
@@ -68,4 +69,4 @@
</plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
diff --git a/tycho-core/pom.xml b/tycho-core/pom.xml
index 9f2bf3b..bdd5a16 100644
--- a/tycho-core/pom.xml
+++ b/tycho-core/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- - Copyright (c) 2008, 2011 Sonatype Inc. and others.
+ - Copyright (c) 2008, 2020 Sonatype Inc. and others.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
@@ -168,6 +168,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
+ <scope>test</scope>
</dependency>
</dependencies>
diff --git a/tycho-extras/tycho-eclipserun-plugin/pom.xml b/tycho-extras/tycho-eclipserun-plugin/pom.xml
index ffb886b..beedebc 100644
--- a/tycho-extras/tycho-eclipserun-plugin/pom.xml
+++ b/tycho-extras/tycho-eclipserun-plugin/pom.xml
@@ -1,5 +1,5 @@
<!--
-- Copyright (c) 2011 Marc-Andre Laperle and others.
+- Copyright (c) 2011, 2020 Marc-Andre Laperle and others.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
@@ -42,14 +42,17 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-testing-harness</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
+ <scope>test</scope>
</dependency>
</dependencies>
<profiles>
diff --git a/tycho-extras/tycho-pomless/pom.xml b/tycho-extras/tycho-pomless/pom.xml
index 2584910..f2d7ffa 100644
--- a/tycho-extras/tycho-pomless/pom.xml
+++ b/tycho-extras/tycho-pomless/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- - Copyright (c) 2015 SAP SE and others.
+ - Copyright (c) 2015, 2020 SAP SE and others.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
@@ -67,7 +67,8 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
+ <scope>test</scope>
</dependency>
</dependencies>
-</project>
\ No newline at end of file
+</project>
diff --git a/tycho-surefire/tycho-surefire-plugin/pom.xml b/tycho-surefire/tycho-surefire-plugin/pom.xml
index d03525a..5b2ac63 100644
--- a/tycho-surefire/tycho-surefire-plugin/pom.xml
+++ b/tycho-surefire/tycho-surefire-plugin/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- - Copyright (c) 2008, 2011 Sonatype Inc. and others.
+ - Copyright (c) 2008, 2020 Sonatype Inc. and others.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
@@ -162,10 +162,12 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-testing-harness</artifactId>
+ <scope>test</scope>
</dependency>
</dependencies>
</project>
--
2.21.1

View File

@ -0,0 +1,80 @@
From bf0f458e2cd41ad24ff212014a416c788477bfc4 Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
Date: Fri, 20 Mar 2020 02:35:02 +0000
Subject: [PATCH 7/8] Fix dependency problems when bootstrapping with extras
---
tycho-extras/pack200/tycho-pack200b-plugin/pom.xml | 4 ++--
tycho-extras/pom.xml | 10 +++++-----
tycho-extras/tycho-source-feature-plugin/pom.xml | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/tycho-extras/pack200/tycho-pack200b-plugin/pom.xml b/tycho-extras/pack200/tycho-pack200b-plugin/pom.xml
index f305eb3..4a3150b 100644
--- a/tycho-extras/pack200/tycho-pack200b-plugin/pom.xml
+++ b/tycho-extras/pack200/tycho-pack200b-plugin/pom.xml
@@ -36,7 +36,7 @@
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.tycho.p2.resolver.shared</artifactId>
- <version>${tycho-version}</version>
+ <version>${project.version}</version>
</dependency>
</dependencies>
-</project>
\ No newline at end of file
+</project>
diff --git a/tycho-extras/pom.xml b/tycho-extras/pom.xml
index 1769197..68c2bbe 100644
--- a/tycho-extras/pom.xml
+++ b/tycho-extras/pom.xml
@@ -88,28 +88,28 @@
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-core</artifactId>
- <version>${tycho-version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-facade</artifactId>
- <version>${tycho-version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.tycho.core.shared</artifactId>
- <version>${tycho-version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-testing-harness</artifactId>
- <version>${tycho-version}</version>
+ <version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>sisu-equinox-launching</artifactId>
- <version>${tycho-version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.tycho</groupId>
diff --git a/tycho-extras/tycho-source-feature-plugin/pom.xml b/tycho-extras/tycho-source-feature-plugin/pom.xml
index e305460..29fa308 100644
--- a/tycho-extras/tycho-source-feature-plugin/pom.xml
+++ b/tycho-extras/tycho-source-feature-plugin/pom.xml
@@ -42,7 +42,7 @@
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
- <version>${tycho-version}</version>
+ <version>${project.version}</version>
<type>maven-plugin</type>
</dependency>
--
2.21.1

View File

@ -0,0 +1,51 @@
From a19db9367faa7e88cb243b78c3a4a17069c6ea52 Mon Sep 17 00:00:00 2001
From: Roland Grunberg <rgrunber@redhat.com>
Date: Mon, 6 May 2013 14:20:58 -0400
Subject: [PATCH 8/8] Use custom resolver for tycho-eclipserun-plugin.
Add various system local OSGi bundle locations to the target platform
used by tycho-eclipserun-plugin.
Change-Id: Ifd0aae3f32c8077cd0ae33e70f40698c1129788d
---
.../tycho/extras/eclipserun/EclipseRunMojo.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tycho-extras/tycho-eclipserun-plugin/src/main/java/org/eclipse/tycho/extras/eclipserun/EclipseRunMojo.java b/tycho-extras/tycho-eclipserun-plugin/src/main/java/org/eclipse/tycho/extras/eclipserun/EclipseRunMojo.java
index b93e651..4032d10 100644
--- a/tycho-extras/tycho-eclipserun-plugin/src/main/java/org/eclipse/tycho/extras/eclipserun/EclipseRunMojo.java
+++ b/tycho-extras/tycho-eclipserun-plugin/src/main/java/org/eclipse/tycho/extras/eclipserun/EclipseRunMojo.java
@@ -13,6 +13,7 @@ package org.eclipse.tycho.extras.eclipserun;
import java.io.File;
import java.net.MalformedURLException;
+import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -52,6 +53,7 @@ import org.eclipse.tycho.p2.resolver.facade.P2Resolver;
import org.eclipse.tycho.p2.resolver.facade.P2ResolverFactory;
import org.eclipse.tycho.p2.target.facade.TargetPlatformConfigurationStub;
import org.eclipse.tycho.plugins.p2.extras.Repository;
+import org.fedoraproject.p2.EclipseSystemLayout;
/**
* Launch an eclipse process with arbitrary commandline arguments. The eclipse installation is
@@ -225,6 +227,14 @@ public class EclipseRunMojo extends AbstractMojo {
TargetPlatformConfigurationStub tpConfiguration = new TargetPlatformConfigurationStub();
// we want to resolve from remote repos only
tpConfiguration.setForceIgnoreLocalArtifacts(true);
+
+ // Add Fedora Local P2 Repository when running in local mode
+ if (System.getProperty("TYCHO_MVN_LOCAL") != null || System.getProperty("TYCHO_MVN_RPMBUILD") != null) {
+ for (URI uri : EclipseSystemLayout.getRepositories()) {
+ tpConfiguration.addP2Repository(new MavenRepositoryLocation(uri.getPath(), uri));
+ }
+ }
+
for (Repository repository : repositories) {
tpConfiguration.addP2Repository(new MavenRepositoryLocation(repository.getId(), repository.getLocation()));
}
--
2.21.1

View File

@ -1,176 +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
@@ -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.13.0.v20180226-1711</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
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/maven-shared-utils-3.2.1.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.apache.maven.shared</groupId>
+ <artifactId>maven-shared-utils</artifactId>
+ <version>3.2.1</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,11 +0,0 @@
--- tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java.orig 2018-07-25 15:02:39.484574315 +0100
+++ tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java 2018-07-25 15:04:38.494188050 +0100
@@ -101,7 +101,7 @@
skipAfterFailureCount, Shutdown.DEFAULT, 0);
StartupReportConfiguration startupReportConfig = new StartupReportConfiguration(useFile, printSummary,
StartupReportConfiguration.PLAIN_REPORT_FORMAT, redirectTestOutputToFile, disableXmlReport, reportsDir,
- trimStacktrace, null, new File(reportsDir, "TESTHASH"), false, rerunFailingTestsCount, null);
+ trimStacktrace, null, new File(reportsDir, "TESTHASH"), false, rerunFailingTestsCount, null, 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

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a80057d6864cc8cc96f4395307ab3b94fac545b6d55b7ae3aa1d4cb5d9e49f5a
size 15578728

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4c6e8dd2e0e1626703800edba747581fde4df08b1f7f08cc2e80d947d9807b2d
size 14984084

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b6d575d817775121e0dad08005ac3a13cad14efa0f1ad29ca720540f97efb92f
size 13288756

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:81475fcb508af67831e9635553d96dca9230421d35eb22ec5182e6dcac389d99
size 13246360

View File

@ -1,26 +0,0 @@
--- org.eclipse.tycho-tycho-1.2.0/tycho-surefire/org.eclipse.tycho.surefire.junit5/pom.xml 2019-04-11 23:10:24.453419824 +0200
+++ org.eclipse.tycho-tycho-1.2.0/tycho-surefire/org.eclipse.tycho.surefire.junit5/pom.xml 2019-04-11 23:53:11.679066646 +0200
@@ -38,9 +38,9 @@
<excludes>META-INF/**</excludes>
<artifactItems>
<artifactItem>
- <groupId>org.junit.platform</groupId>
- <artifactId>junit-platform-surefire-provider</artifactId>
- <version>${junit-platform-version}</version>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${surefire-version}</version>
</artifactItem>
<artifactItem>
<groupId>org.junit.platform</groupId>
--- org.eclipse.tycho-tycho-1.2.0/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit5Provider.java 2019-04-11 23:10:24.449419802 +0200
+++ org.eclipse.tycho-tycho-1.2.0/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit5Provider.java 2019-04-11 23:33:18.352699032 +0200
@@ -37,7 +37,7 @@
@Override
public String getSurefireProviderClassName() {
- return "org.junit.platform.surefire.provider.JUnitPlatformProvider";
+ return "org.apache.maven.surefire.junitplatform.JUnitPlatformProvider";
}
@Override

View File

@ -4,8 +4,8 @@
preV=$1
v="$preV-SNAPSHOT"
osgiV='3.13.0.v20180428-1222'
osgiCompatV='1.1.100.v20180428-1222'
osgiV='3.15.100.v20191219-0358'
osgiCompatV='1.1.600.v20191219-0358'
fp2V='0.0.1-SNAPSHOT'
bundles=()
bundles[0]='tycho-bundles/org.eclipse.tycho.embedder.shared'
@ -94,7 +94,7 @@ mkdir -p 'eclipse/configuration'
echo '#Product Runtime Configuration File
#Thu Dec 19 21:40:37 EST 2013
osgi.bundles=org.apache.commons.codec,org.apache.commons.logging,org.apache.httpcomponents.httpclient,org.apache.httpcomponents.httpcore,org.eclipse.core.contenttype,org.eclipse.core.jobs,org.eclipse.core.net,org.eclipse.core.runtime@4\:start,org.eclipse.core.runtime.compatibility.registry,org.eclipse.ecf,org.eclipse.ecf.filetransfer,org.eclipse.ecf.identity,org.eclipse.ecf.provider.filetransfer,org.eclipse.ecf.provider.filetransfer.httpclient4,org.eclipse.ecf.provider.filetransfer.httpclient4.ssl,org.eclipse.ecf.provider.filetransfer.ssl,org.eclipse.ecf.ssl,org.eclipse.equinox.app,org.eclipse.equinox.common@2\:start,org.eclipse.equinox.concurrent,org.eclipse.equinox.ds@2\:start,org.eclipse.equinox.frameworkadmin,org.eclipse.equinox.frameworkadmin.equinox,org.eclipse.equinox.launcher,org.eclipse.equinox.p2.artifact.repository,org.eclipse.equinox.p2.core,org.eclipse.equinox.p2.director,org.eclipse.equinox.p2.director.app,org.eclipse.equinox.p2.engine,org.eclipse.equinox.p2.garbagecollector,org.eclipse.equinox.p2.jarprocessor,org.eclipse.equinox.p2.metadata,org.eclipse.equinox.p2.metadata.repository,org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.publisher.eclipse,org.eclipse.equinox.p2.repository,org.eclipse.equinox.p2.repository.tools,org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.equinox.p2.touchpoint.natives,org.eclipse.equinox.p2.transport.ecf,org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.preferences,org.eclipse.equinox.registry,org.eclipse.equinox.security,org.eclipse.equinox.simpleconfigurator,org.eclipse.equinox.simpleconfigurator.manipulator,org.eclipse.equinox.util,org.eclipse.osgi.services,org.eclipse.osgi.compatibility.state,org.eclipse.tycho.noopsecurity,org.sat4j.core,org.sat4j.pb,org.eclipse.osgi.util,org.apache.felix.scr,org.kxml2,org.xmlpull,org.fedoraproject.p2
osgi.bundles=org.apache.commons.codec,org.apache.commons.logging,org.apache.httpcomponents.httpclient,org.apache.httpcomponents.httpcore,org.eclipse.core.contenttype,org.eclipse.core.jobs,org.eclipse.core.net,org.eclipse.core.runtime@4\:start,org.eclipse.core.runtime.compatibility.registry,org.eclipse.ecf,org.eclipse.ecf.filetransfer,org.eclipse.ecf.identity,org.eclipse.ecf.provider.filetransfer,org.eclipse.ecf.provider.filetransfer.httpclient4,org.eclipse.ecf.provider.filetransfer.httpclient4.ssl,org.eclipse.ecf.provider.filetransfer.ssl,org.eclipse.ecf.ssl,org.eclipse.equinox.app,org.eclipse.equinox.common@2\:start,org.eclipse.equinox.concurrent,org.eclipse.equinox.ds@2\:start,org.eclipse.equinox.frameworkadmin,org.eclipse.equinox.frameworkadmin.equinox,org.eclipse.equinox.launcher,org.eclipse.equinox.p2.artifact.repository,org.eclipse.equinox.p2.core,org.eclipse.equinox.p2.director,org.eclipse.equinox.p2.director.app,org.eclipse.equinox.p2.engine,org.eclipse.equinox.p2.garbagecollector,org.eclipse.equinox.p2.jarprocessor,org.eclipse.equinox.p2.metadata,org.eclipse.equinox.p2.metadata.repository,org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.publisher.eclipse,org.eclipse.equinox.p2.repository,org.eclipse.equinox.p2.repository.tools,org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.equinox.p2.touchpoint.natives,org.eclipse.equinox.p2.transport.ecf,org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.preferences,org.eclipse.equinox.registry,org.eclipse.equinox.security,org.eclipse.equinox.simpleconfigurator,org.eclipse.equinox.simpleconfigurator.manipulator,org.eclipse.equinox.util,org.eclipse.osgi.services,org.eclipse.osgi.compatibility.state,org.eclipse.tycho.noopsecurity,org.sat4j.core,org.sat4j.pb,org.eclipse.osgi.util,org.apache.felix.scr,org.osgi.cmpn.fedoraproject.p2
osgi.bundles.defaultStartLevel=4
eclipse.product=org.eclipse.equinox.p2.director.app.product
osgi.splashPath=platform\:/base/plugins/org' > 'eclipse/configuration/config.ini'
@ -109,7 +109,7 @@ mkdir -p ${loc}
cp "${tbeTargetDir}/tycho-bundles-external-${v}.zip" ${loc}
cp 'tycho-bundles/tycho-bundles-external/pom.xml' "${loc}/tycho-bundles-external-${v}.pom"
sed -i "s/<equinoxVersionMaven>.*<\/equinoxVersionMaven>/<equinoxVersionMaven>${osgiV}<\/equinoxVersionMaven>/" pom.xml
sed -i "s/<equinoxCompatVersionMaven>.*<\/equinoxCompatVersionMaven>/<equinoxCompatVersionMaven>${osgiCompatV}<\/equinoxCompatVersionMaven>/" pom.xml
sed -i "s/<equinoxVersion>.*<\/equinoxVersion>/<equinoxVersion>${osgiV}<\/equinoxVersion>/" pom.xml
sed -i "s/<equinoxCompatVersion>.*<\/equinoxCompatVersion>/<equinoxCompatVersion>${osgiCompatV}<\/equinoxCompatVersion>/" pom.xml
# xmvn-p2-installer-plugin needs to find the org.eclipse.osgi bundle
sed -i "s/>\${equinox-version}</>${osgiV}</" fedoraproject-p2/xmvn-p2-installer-plugin/pom.xml

View File

@ -1,11 +0,0 @@
--- ./tycho-source-plugin/src/main/java/org/eclipse/tycho/source/AbstractSourceJarMojo.java.orig 2016-04-14 17:18:54.033371257 +0100
+++ ./tycho-source-plugin/src/main/java/org/eclipse/tycho/source/AbstractSourceJarMojo.java 2016-04-14 17:22:02.121228491 +0100
@@ -259,7 +259,7 @@
getLog().warn("ignoring unsupported archive forced = false parameter.");
archive.setForced(true);
}
- archiver.createArchive(project, archive);
+ archiver.createArchive(null, project, archive);
} catch (IOException e) {
throw new MojoExecutionException("Error creating source archive: " + e.getMessage(), e);
} catch (ArchiverException e) {

View File

@ -4,11 +4,11 @@ function minibuild () {
basedir=$1
src=`cat "${basedir}/build.properties" | grep 'source..' | cut -d'=' -f2 | tr ' ' '\0'`
output=`cat "${basedir}/build.properties" | grep 'output..' | cut -d'=' -f2 | tr ' ' '\0'`
bName=`cat "${basedir}/META-INF/MANIFEST.MF" | grep 'Bundle-SymbolicName:' | sed 's/Bundle-SymbolicName: \([a-zA-Z0-9_.-]*\)\(;\)\?.*/\1/'`
artifactId=`cat "${basedir}/pom.xml" | sed '/<parent>/,/<\/parent>/ d' | grep "<artifactId>" | sed 's/.*<artifactId>\(.*\)<\/artifactId>.*/\1/'`
version=`cat "${basedir}/pom.xml" | grep "<version>" | sed 's/.*<version>\(.*\)<\/version>.*/\1/'`
src=$(cat "${basedir}/build.properties" | grep 'source..' | cut -d'=' -f2 | sed -e 's/ //g')
output=$(cat "${basedir}/build.properties" | grep 'output..' | cut -d'=' -f2 | sed -e 's/ //g')
bName=$(cat "${basedir}/META-INF/MANIFEST.MF" | grep 'Bundle-SymbolicName:' | sed 's/Bundle-SymbolicName: \([a-zA-Z0-9_.-]*\)\(;\)\?.*/\1/')
artifactId=$(cat "${basedir}/pom.xml" | sed '/<parent>/,/<\/parent>/ d' | grep "<artifactId>" | sed 's/.*<artifactId>\(.*\)<\/artifactId>.*/\1/')
version=$(cat "${basedir}/pom.xml" | grep "<version>" | sed 's/.*<version>\(.*\)<\/version>.*/\1/')
# External (System) dependencies
if [ $# -eq 3 ]; then
@ -26,7 +26,7 @@ if [ $# -gt 1 ]; then
cp='-classpath '$2':'"${basedir}"'/target/externalDeps/*'
fi
javac -d "${basedir}/${output}" \
javac -d "${basedir}/${output}" -encoding utf8 -source 1.8 -target 1.8 \
$(for file in `find "${basedir}/${src}" -name "*.java"`; \
do echo -n "${file} "; \
done;) \

View File

@ -1,3 +1,26 @@
-------------------------------------------------------------------
Fri Jul 3 09:59:22 UTC 2020 - Fridrich Strba <fstrba@suse.com>
- Update to 1.6.0
- Removed patches:
* build-against-surefire-2.21.patch
* build-against-surefire-2.22.patch
* port-to-surefire-junit-platform.patch
* tycho-fix-build.patch
* tycho-maven-archiver-3.0.1.patch
* tycho-maven-delegation.patch
* tycho-use-custom-resolver.patch
* use-java8-for-default-ee.patch
- Added patches:
* 0001-Fix-the-Tycho-build-to-work-on-Fedora.patch
* 0002-Implement-a-custom-resolver-for-Tycho-in-local-mode.patch
* 0003-Tycho-should-always-delegate-artifact-resolution-to-.patch
* 0004-Bug-537963-Make-the-default-EE-Java-1.8.patch
* 0005-Fix-uncaught-exception.patch
* 0006-Mockito-does-not-have-test-scope.patch
* 0007-Fix-dependency-problems-when-bootstrapping-with-extr.patch
* 0008-Use-custom-resolver-for-tycho-eclipserun-plugin.patch
-------------------------------------------------------------------
Wed Apr 1 08:53:05 UTC 2020 - Fridrich Strba <fstrba@suse.com>

View File

@ -27,20 +27,15 @@
%global fp_p2_git_tag 290f67a4c717599b2f5166ea89aa5365571314b1
%global fp_p2_version 0.0.1
%global fp_p2_snap -SNAPSHOT
%global xmvn_libdir %(realpath $(dirname $(readlink -f $(which xmvn)))/../lib)
%define __requires_exclude osgi*
# Allow conditionally building without Junit 5 support
%bcond_without junit5
%if %{with bootstrap}
Name: tycho-bootstrap
%else
Name: tycho
%endif
Version: 1.2.0
Version: 1.6.0
Release: 0
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: Apache-2.0 AND EPL-1.0
Group: Development/Libraries/Java
URL: https://eclipse.org/tycho
# Tycho project source
Source0: http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/snapshot/org.eclipse.tycho-%{git_tag}.tar.xz
@ -56,23 +51,23 @@ 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
Patch0: tycho-fix-build.patch
# Submitted upstream: https://bugs.eclipse.org/bugs/show_bug.cgi?id=535564
Patch1: tycho-maven-archiver-3.0.1.patch
Patch2: tycho-use-custom-resolver.patch
Patch3: tycho-maven-delegation.patch
# Changes needed for building against latest surefire
# Submitted upstream: https://bugs.eclipse.org/bugs/show_bug.cgi?id=537419
Patch4: build-against-surefire-2.21.patch
Patch5: build-against-surefire-2.22.patch
# Fedora-specific patches
Patch0: 0001-Fix-the-Tycho-build-to-work-on-Fedora.patch
Patch1: 0002-Implement-a-custom-resolver-for-Tycho-in-local-mode.patch
Patch2: 0003-Tycho-should-always-delegate-artifact-resolution-to-.patch
# Submitted upstream: https://bugs.eclipse.org/bugs/show_bug.cgi?id=537963
Patch6: use-java8-for-default-ee.patch
# Build against org.apache.maven.surefire:surefire-junit-platform instead of
# against org.junit.platform:junit-platform-surefire-provider
Patch7: port-to-surefire-junit-platform.patch
Patch3: 0004-Bug-537963-Make-the-default-EE-Java-1.8.patch
# Fix compile error with uncaught exception
Patch4: 0005-Fix-uncaught-exception.patch
# Fix mis-scoped test deps, see: ebz#560394
Patch5: 0006-Mockito-does-not-have-test-scope.patch
# Fix incorrect generated requires
Patch6: 0007-Fix-dependency-problems-when-bootstrapping-with-extr.patch
Patch7: 0008-Use-custom-resolver-for-tycho-eclipserun-plugin.patch
Patch100: fedoraproject-p2-bootstrap-fix.patch
BuildRequires: bash
BuildRequires: fdupes
BuildRequires: glassfish-annotation-api
BuildRequires: java-devel >= 1.8
BuildRequires: maven-local
BuildRequires: unzip
@ -80,70 +75,72 @@ BuildRequires: zip
BuildRequires: mvn(biz.aQute.bnd:bnd-maven-plugin)
BuildRequires: mvn(com.beust:jcommander)
BuildRequires: mvn(de.pdark:decentxml)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(io.takari.polyglot:polyglot-common)
BuildRequires: mvn(org.apache.commons:commons-compress)
BuildRequires: mvn(org.apache.commons:commons-exec)
BuildRequires: mvn(org.apache.commons:commons-lang3)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugin-testing:maven-plugin-testing-harness)
BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations)
BuildRequires: mvn(org.apache.maven.plugins:maven-clean-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-install-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin)
BuildRequires: mvn(org.apache.maven.shared:maven-verifier)
BuildRequires: mvn(org.apache.maven.surefire:maven-surefire-common)
BuildRequires: mvn(org.apache.maven.surefire:surefire-api)
BuildRequires: mvn(org.apache.maven.surefire:surefire-booter)
BuildRequires: mvn(org.apache.maven.surefire:surefire-logger-api)
BuildRequires: mvn(org.apache.maven:maven-archiver)
BuildRequires: mvn(org.apache.maven:maven-compat)
BuildRequires: mvn(org.apache.maven:maven-core)
BuildRequires: mvn(org.apache.maven:maven-model)
BuildRequires: mvn(org.apache.maven:maven-model-builder)
BuildRequires: mvn(org.apache.maven:maven-plugin-api)
BuildRequires: mvn(org.apiguardian:apiguardian-api)
BuildRequires: mvn(org.codehaus.plexus:plexus-archiver)
BuildRequires: mvn(org.codehaus.plexus:plexus-compiler-api)
BuildRequires: mvn(org.codehaus.plexus:plexus-compiler-manager)
BuildRequires: mvn(org.codehaus.plexus:plexus-component-annotations)
BuildRequires: mvn(org.codehaus.plexus:plexus-component-metadata)
BuildRequires: mvn(org.codehaus.plexus:plexus-container-default)
BuildRequires: mvn(org.codehaus.plexus:plexus-utils)
BuildRequires: mvn(org.easymock:easymock)
BuildRequires: mvn(org.eclipse.tycho:org.eclipse.jdt.compiler.apt)
BuildRequires: mvn(org.eclipse.tycho:org.eclipse.jdt.core)
BuildRequires: mvn(org.eclipse.jdt:ecj)
BuildRequires: mvn(org.eclipse.sisu:org.eclipse.sisu.plexus)
BuildRequires: mvn(org.fedoraproject.xmvn:xmvn-api)
BuildRequires: mvn(org.fedoraproject.xmvn:xmvn-core)
BuildRequires: mvn(org.fedoraproject.xmvn:xmvn-install)
BuildRequires: mvn(org.fedoraproject.xmvn:xmvn-parent:pom:)
BuildRequires: mvn(org.hamcrest:hamcrest-core)
BuildRequires: mvn(org.mockito:mockito-core)
BuildRequires: mvn(org.opentest4j:opentest4j)
BuildRequires: mvn(org.ow2.asm:asm-debug-all)
BuildRequires: mvn(org.ow2.asm:asm-tree)
BuildRequires: mvn(org.ow2.asm:asm-util)
BuildRequires: mvn(org.slf4j:slf4j-api)
BuildRequires: mvn(org.slf4j:slf4j-simple)
BuildConflicts: java >= 9
BuildConflicts: java-devel >= 9
BuildConflicts: java-headless >= 9
Requires: ecj >= 4.7.3a-1
# maven-clean-plugin is bound to "initialize" Maven phase for
# "eclipse-repository" projects
Requires: maven-clean-plugin
Requires: maven-local
Requires: xmvn-minimal >= 3
# Extras was folded into the main tycho package
Obsoletes: tycho-extras < %{version}-%{release}
Provides: tycho-extras = %{version}-%{release}
BuildArch: noarch
# Upstream Eclipse no longer supports non-64bit arches
ExcludeArch: s390 %{arm} %{ix86}
%if %{with bootstrap}
Name: tycho-bootstrap
%else
Name: tycho
%endif
# Prebuilt Eclipse bundles needed to build Tycho when Eclipse is not present
# or when the Eclipse that is present is not compatible
%if %{with bootstrap}
Source10: eclipse-bootstrap-photon.tar.xz
Source10: eclipse-bootstrap-2019-12.tar.xz
%endif
%if %{without bootstrap}
# Ordinarily Tycho additionally requires itself and Eclipse to build
BuildRequires: %{name}-bootstrap
BuildRequires: eclipse-platform-bootstrap >= 4.8.0
Requires: eclipse-platform >= 4.8.0
Obsoletes: %{name}-bootstrap
#!BuildRequires: eclipse-emf-core-bootstrap
#!BuildRequires: eclipse-ecf-core-bootstrap
%else
%if %{with junit5}
BuildRequires: mvn(org.apache.maven.surefire:surefire-junit-platform)
BuildRequires: mvn(org.apiguardian:apiguardian-api)
BuildRequires: mvn(org.opentest4j:opentest4j)
%endif
%if %{with bootstrap}
# For bootstrapping, we just need the dependencies of the Eclipse bundles we use
BuildRequires: osgi(com.ibm.icu)
BuildRequires: osgi(javax.servlet-api)
@ -151,14 +148,18 @@ BuildRequires: osgi(javax.servlet.jsp)
BuildRequires: osgi(org.apache.batik.css)
BuildRequires: osgi(org.apache.commons.jxpath)
BuildRequires: osgi(org.apache.felix.scr)
BuildRequires: osgi(org.sat4j.core) >= 2.3.5
BuildRequires: osgi(org.sat4j.pb) >= 2.3.5
BuildRequires: osgi(org.sat4j.core)
BuildRequires: osgi(org.sat4j.pb)
BuildRequires: osgi(org.w3c.css.sac)
%endif
%if %{with junit5}
BuildRequires: mvn(org.apache.maven.surefire:surefire-junit-platform)
BuildRequires: mvn(org.apiguardian:apiguardian-api)
BuildRequires: mvn(org.opentest4j:opentest4j)
BuildRequires: osgi(osgi.cmpn)
%else
# Ordinarily Tycho additionally requires itself and Eclipse to build
BuildRequires: %{name}-bootstrap
BuildRequires: eclipse-platform-bootstrap
Requires: eclipse-platform
Obsoletes: %{name}-bootstrap
#!BuildRequires: eclipse-emf-core-bootstrap
#!BuildRequires: eclipse-ecf-core-bootstrap
%endif
%description
@ -188,7 +189,8 @@ no duplication of metadata between POM and OSGi metadata.
%package javadoc
Summary: Javadocs for %{name}
Group: Documentation/HTML
Obsoletes: tycho-extras-javadoc < %{version}-%{release}
Provides: tycho-extras-javadoc = %{version}-%{release}
%description javadoc
This package contains the API documentation for %{name}.
@ -198,11 +200,11 @@ This package contains the API documentation for %{name}.
mv fedoraproject-p2-%{fp_p2_git_tag} fedoraproject-p2
%patch0 -p1
%patch1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch100
@ -210,14 +212,15 @@ mv fedoraproject-p2-%{fp_p2_git_tag} fedoraproject-p2
# Unneeded for RPM builds
%pom_remove_plugin :maven-site-plugin
# These tycho plug-ins don't make sense in the context of RPM builds of Eclipse plug-ins
%pom_disable_module tycho-buildtimestamp-jgit tycho-extras
%pom_disable_module tycho-sourceref-jgit tycho-extras
%if %{without junit5}
%pom_disable_module org.eclipse.tycho.surefire.junit5 tycho-surefire
%pom_remove_dep ":org.eclipse.tycho.surefire.junit5" tycho-surefire/tycho-surefire-plugin
%endif
# Switch for "tycho" platform deps
%pom_change_dep org.eclipse.jdt: org.eclipse.tycho: . tycho-compiler-jdt
# Move from org.sonatype.aether to org.eclipse.aether
find . -name "*.java" | xargs sed -i 's/org.sonatype.aether/org.eclipse.aether/g'
find . -name "*.java" | xargs sed -i 's/org.eclipse.aether.util.DefaultRepositorySystemSession/org.eclipse.aether.DefaultRepositorySystemSession/g'
@ -229,46 +232,51 @@ pushd tycho-maven-plugin/src/main/java/org/fedoraproject
cp %{SOURCE2} .
popd
# These units cannot be found during a regular build
sed -i '/^<unit id=.*$/d' tycho-bundles/tycho-bundles-target/tycho-bundles-target.target
# Homogenise requirement on OSGi bundle
%if %{with bootstrap}
sed -i -e "s/>org.eclipse.platform</>org.eclipse.tycho</" pom.xml tycho-core/pom.xml sisu-equinox/sisu-equinox-embedder/pom.xml
%else
sed -i -e "s/>org.eclipse.tycho</>org.eclipse.platform</" fedoraproject-p2/xmvn-p2-installer-plugin/pom.xml
%endif
# Target platform does not really apply to RPM builds
%pom_disable_module tycho-bundles-target tycho-bundles
%pom_xpath_remove "pom:target" tycho-bundles
# Disable maven-properties-plugin used by tests
%pom_remove_plugin org.sonatype.plugins:maven-properties-plugin tycho-extras/tycho-p2-extras-plugin
# Remove dep on maven tarball used by tests
%pom_remove_dep org.apache.maven:apache-maven tycho-extras/tycho-p2-extras-plugin
# we don't have org.apache.commons:commons-compress:jar:sources
%pom_xpath_remove "pom:dependency[pom:classifier='sources' and pom:artifactId='commons-compress']" tycho-p2/tycho-p2-director-plugin
# Previously, JUnit would re-export Hamcrest
# Now modules using org.hamcrest.core must state the requirement explicitly
for mod in tycho-bundles/org.eclipse.tycho.{p2.{maven.repository.tests,resolver.impl.test,tools.tests},test.utils,core.shared.tests}; do
sed -i 's/^Require-Bundle://
/org\.junit/ i Require-Bundle: org.hamcrest.core,' \
$mod/META-INF/MANIFEST.MF
done
# Fix bundle names
sed -i -e 's/org\.hamcrest/org.hamcrest.core/' tycho-bundles/pom.xml
sed -i -e 's/org\.mockito/org.mockito.mockito-core/' \
tycho-bundles/org.eclipse.tycho.p2.tools.tests/META-INF/MANIFEST.MF \
tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/META-INF/MANIFEST.MF \
tycho-bundles/org.eclipse.tycho.p2.resolver.shared.tests/META-INF/MANIFEST.MF
# Bootstrap Build
%if %{with bootstrap}
# Don't build tests when bootstrapping
# Don't build tests
for b in core.shared.tests p2.resolver.impl.test p2.resolver.shared.tests p2.maven.repository.tests p2.tools.tests test.utils ; do
%pom_disable_module org.eclipse.tycho.$b tycho-bundles
done
%pom_disable_module org.fedoraproject.p2.tests fedoraproject-p2
%pom_disable_module tycho-testing-harness
%pom_remove_dep -r :::test
# Bootstrap Build
%if %{with bootstrap}
# Break circular dep between tycho-lib-detector and tycho-compiler-jdt for bootstrapping
%pom_xpath_remove "pom:compilerId" tycho-lib-detector
%pom_remove_dep "org.eclipse.tycho:tycho-compiler-jdt" tycho-lib-detector
# Unpack a compatible version of Eclipse we can use to build against
tar -xf %{SOURCE10}
# Install OSGi bundles into local repo to override any incompatible system version
# that may be already installed
pushd bootstrap
for f in usr/lib/eclipse/plugins/org.eclipse.osgi.compatibility.state_*.jar \
usr/lib/eclipse/plugins/org.eclipse.osgi.services_*.jar \
usr/lib/eclipse/plugins/org.eclipse.osgi.util_*.jar \
usr/lib/eclipse/plugins/org.eclipse.osgi_*.jar ; do
xmvn -o install:install-file -Dfile=$f -Dpackaging=jar -DgroupId=org.eclipse.tycho -Dmaven.repo.local=$(pwd)/../.m2 \
-DartifactId=$(echo $(basename $f) | cut -d_ -f1) -Dversion=$(echo "${f%.jar}" | cut -d_ -f2)
-DartifactId=$(echo $(basename $f) | cut -d_ -f1) -Dversion=$(echo "${f%%.jar}" | cut -d_ -f2)
done
popd
@ -299,6 +307,11 @@ sed -i s/$sysVer/%{version}-SNAPSHOT/ META-INF/plexus/components.xml
jar uf boot/tycho-maven-plugin.jar META-INF/plexus/components.xml
# Create XMvn metadata for the new JARs and POMs by customizing system Tycho metadata.
sed -i -e 's/xmlns=".*"//' boot/tycho-metadata.xml
%pom_xpath_remove -f "metadata/artifacts/artifact[artifactId='org.eclipse.osgi']" boot/tycho-metadata.xml
%pom_xpath_remove -f "metadata/artifacts/artifact[artifactId='org.eclipse.osgi.util']" boot/tycho-metadata.xml
%pom_xpath_remove -f "metadata/artifacts/artifact[artifactId='org.eclipse.osgi.services']" boot/tycho-metadata.xml
%pom_xpath_remove -f "metadata/artifacts/artifact[artifactId='org.eclipse.osgi.compatibility.state']" boot/tycho-metadata.xml
sed -i '
s|>/[^<]*/\([^/]*\.pom\)</path>|>'$PWD'/boot/\1</path>|
s|>'$sysVer'</version>|>%{version}-SNAPSHOT</version><compatVersions><version>%{version}-SNAPSHOT</version></compatVersions>|
@ -323,7 +336,7 @@ sed -i '
# Add fp-p2 to main build
%pom_xpath_inject "pom:modules" "<module>fedoraproject-p2</module>"
%mvn_file :{*} tycho/@1
%{mvn_file} :{*} tycho/@1
%build
%if %{with bootstrap}
@ -343,14 +356,12 @@ sed -i -e 's|type>eclipse.*<|type>jar<|' .xmvn-reactor
# Don't package target platform definition files
%{mvn_package} "::target::" __noinstall
# Don't package fp-p2 tests
%{mvn_package} ":org.fedoraproject.p2.tests" __noinstall
%install
# Get debundling scripts
cp %{SOURCE3} %{SOURCE5} .
%if ! %{with bootstrap}
%if %{without bootstrap}
# Debundle p2 runtime
bash tycho-debundle.sh $(pwd)/tycho-bundles/tycho-bundles-external \
$(pwd)/tycho-bundles/tycho-bundles-external/target/tycho-bundles-external-manifest.txt
@ -362,17 +373,20 @@ bash tycho-debundle.sh $(pwd)/tycho-bundles/tycho-standalone-p2-director
%if %{with bootstrap}
# Install our own copy of OSGi runtime when bootstrapping to avoid external dep on Eclipse
for b in org.eclipse.osgi \
org.eclipse.osgi.util \
org.eclipse.osgi.services \
org.eclipse.osgi.compatibility.state ; do
osgiJarPath=$(find .m2/org/eclipse/tycho/$b/*/ -name "*.jar")
osgiPomPath=$(find .m2/org/eclipse/tycho/$b/*/ -name "*.pom")
%{mvn_artifact} $osgiPomPath $osgiJarPath
%{mvn_alias} "org.eclipse.tycho:$b" "org.eclipse.osgi:$b"
done
%endif
%mvn_install
%if ! %{with bootstrap}
%if %{without bootstrap}
%fdupes -s %{buildroot}%{_javadocdir}
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} tycho/tycho-bundles-external-manifest.txt
%endif
@ -407,23 +421,22 @@ install -dm 755 %{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)
install -dm 755 %{buildroot}${xmvn_libdir}/installer/
install -dm 755 %{buildroot}%{xmvn_libdir}/installer/
%if %{with bootstrap}
ln -s %{_javadir}/tycho/org.eclipse.osgi.jar %{buildroot}${xmvn_libdir}/installer/
ln -s %{_javadir}/tycho/org.eclipse.osgi.jar %{buildroot}%{xmvn_libdir}/installer/
%else
ln -s %{_javadir}/eclipse/osgi.jar %{buildroot}${xmvn_libdir}/installer/
ln -s %{_javadir}/eclipse/osgi.jar %{buildroot}%{xmvn_libdir}/installer/
%endif
ln -s %{_javadir}/tycho/xmvn-p2-installer-plugin.jar %{buildroot}${xmvn_libdir}/installer/
ln -s %{_javadir}/tycho/org.fedoraproject.p2.jar %{buildroot}${xmvn_libdir}/installer/
ln -s %{_javadir}/tycho/xmvn-p2-installer-plugin.jar %{buildroot}%{xmvn_libdir}/installer/
ln -s %{_javadir}/tycho/org.fedoraproject.p2.jar %{buildroot}%{xmvn_libdir}/installer/
%files -f .mfiles
%{xmvn_libdir}/installer
%{_javadir}-utils/p2-install.sh
%if %{with bootstrap}
%{_javadir}/tycho/core.*.jar
%{_javadir}/tycho/equinox.*.jar
%endif
%{_datadir}/xmvn/lib/installer
%{_javadir}-utils/p2-install.sh
%doc README.md
%if %{without bootstrap}