Compare commits
No commits in common. "1bd396a5abfd4dd7b1f9413fbbf8f1eaff93c890" and "e9e6b16fe2ca5dd854cf30d45712c9c46d502562" have entirely different histories.
1bd396a5ab
...
e9e6b16fe2
@ -1,649 +0,0 @@
|
|||||||
From 623916240bd0626e7fd5146bfb2acfe9c77502da Mon Sep 17 00:00:00 2001
|
|
||||||
From: Roland Grunberg <rgrunber@redhat.com>
|
|
||||||
Date: Tue, 12 Jun 2012 10:38:51 -0400
|
|
||||||
Subject: [PATCH 2/6] 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
|
|
||||||
offline mode is disabled.
|
|
||||||
|
|
||||||
Use fedoraproject-p2 to resolve bundles from their system location.
|
|
||||||
|
|
||||||
Relax constraints for bundles used in Tycho's Equinox runtime.
|
|
||||||
|
|
||||||
Since Fedora 17, we need an Execution Environment of at least JavaSE-1.6
|
|
||||||
for Eclipse bundles. Eclipse Juno platform bundles depend on
|
|
||||||
javax.annotation. In Fedora this is provided by geronimo-annotation, but
|
|
||||||
has a dependency on javax.lang.model (since 1.6).
|
|
||||||
|
|
||||||
Use the defined target environments in local mode when the property
|
|
||||||
tycho.local.keepTarget is set.
|
|
||||||
|
|
||||||
In situations where Tycho must resolve maven artifacts, upstream's
|
|
||||||
implementation only looks in the reactor cache. In Fedora, maven
|
|
||||||
artifacts may be located on the system using repository layouts
|
|
||||||
understood by XMvn. Therefore, when an artifact is not found in the
|
|
||||||
reactor cache, resolution should be attempted using the XMvn Resolver.
|
|
||||||
|
|
||||||
Upstream/Fedora Tycho differ in the kind of OSGi Runtime used
|
|
||||||
(org.eclipse.tycho:tycho-bundles-external:zip) so use separate location
|
|
||||||
for our runtime (fedora-eclipse) to avoid collisions.
|
|
||||||
|
|
||||||
Change-Id: Ia1ece07ece2412bc4a88901631f3f651ad2b634b
|
|
||||||
---
|
|
||||||
.../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 | 3 ++
|
|
||||||
.../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, 227 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 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
|
|
||||||
@@ -240,7 +240,14 @@ public class DefaultEquinoxEmbedder extends AbstractLogEnabled
|
|
||||||
if (verIdx > 0) {
|
|
||||||
bundles.append(name.substring(0, verIdx));
|
|
||||||
} else {
|
|
||||||
- throw new EquinoxEmbedderException("File name doesn't match expected pattern: " + file);
|
|
||||||
+ // In Fedora, NAME_VERSION.QUALIFIER.jar is too fragile.
|
|
||||||
+ // Let's also accept NAME.jar
|
|
||||||
+ verIdx = name.lastIndexOf(".jar");
|
|
||||||
+ if (verIdx > 0) {
|
|
||||||
+ bundles.append(name.substring(0, verIdx));
|
|
||||||
+ } else {
|
|
||||||
+ throw new EquinoxEmbedderException("File name doesn't match expected pattern: " + file);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -248,7 +255,7 @@ public class DefaultEquinoxEmbedder extends AbstractLogEnabled
|
|
||||||
}
|
|
||||||
|
|
||||||
protected boolean isFrameworkBundle(File file) {
|
|
||||||
- return file.getName().startsWith("org.eclipse.osgi_");
|
|
||||||
+ return file.getName().startsWith("org.eclipse.osgi_") || file.getName().equals("org.eclipse.osgi.jar");
|
|
||||||
}
|
|
||||||
|
|
||||||
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 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;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
+import java.net.MalformedURLException;
|
|
||||||
import java.net.URI;
|
|
||||||
+import java.net.URL;
|
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
|
||||||
import org.eclipse.core.runtime.IStatus;
|
|
||||||
import org.eclipse.core.runtime.Status;
|
|
||||||
import org.eclipse.equinox.internal.p2.repository.CacheManager;
|
|
||||||
+import org.eclipse.equinox.internal.p2.repository.Messages;
|
|
||||||
import org.eclipse.equinox.internal.p2.repository.Transport;
|
|
||||||
import org.eclipse.equinox.p2.core.ProvisionException;
|
|
||||||
+import org.eclipse.osgi.util.NLS;
|
|
||||||
import org.eclipse.tycho.core.shared.MavenContext;
|
|
||||||
import org.eclipse.tycho.core.shared.MavenLogger;
|
|
||||||
import org.eclipse.tycho.p2.impl.Activator;
|
|
||||||
@@ -51,6 +55,13 @@ class RemoteRepositoryCacheManager extends CacheManager {
|
|
||||||
@Override
|
|
||||||
public File createCache(URI repositoryLocation, String prefix, IProgressMonitor monitor)
|
|
||||||
throws IOException, ProvisionException {
|
|
||||||
+ try {
|
|
||||||
+ new URL(repositoryLocation.toASCIIString());
|
|
||||||
+ } catch (MalformedURLException e) {
|
|
||||||
+ throw new ProvisionException(new Status(IStatus.ERROR, org.eclipse.equinox.internal.p2.repository.Activator.ID,
|
|
||||||
+ ProvisionException.REPOSITORY_NOT_FOUND, NLS.bind(Messages.CacheManager_CannotLoadNonUrlLocation,
|
|
||||||
+ repositoryLocation), null));
|
|
||||||
+ }
|
|
||||||
File cacheFile = getCache(repositoryLocation, prefix);
|
|
||||||
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 e5e99a1..1cf8089 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;
|
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
|
||||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
|
||||||
+import org.eclipse.core.runtime.URIUtil;
|
|
||||||
import org.eclipse.equinox.p2.core.IProvisioningAgent;
|
|
||||||
import org.eclipse.equinox.p2.core.ProvisionException;
|
|
||||||
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
|
|
||||||
@@ -121,7 +122,12 @@ public final class TargetDefinitionResolver {
|
|
||||||
resolverRun.addLocation((InstallableUnitLocation) locationDefinition);
|
|
||||||
|
|
||||||
for (Repository repository : ((InstallableUnitLocation) locationDefinition).getRepositories()) {
|
|
||||||
- artifactRepositories.add(repository.getLocation());
|
|
||||||
+ // We cannot resolve a non-file URI in local mode
|
|
||||||
+ if ((System.getProperty("TYCHO_MVN_LOCAL") == null && System.getProperty("TYCHO_MVN_RPMBUILD") == null)
|
|
||||||
+ || URIUtil.isFileURI(repository.getLocation())
|
|
||||||
+ || "fedora".equals(repository.getLocation().getScheme())) {
|
|
||||||
+ artifactRepositories.add(repository.getLocation());
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
logger.warn("Target location type '" + locationDefinition.getTypeDescription() + "' is not supported");
|
|
||||||
@@ -278,8 +284,13 @@ public final class TargetDefinitionResolver {
|
|
||||||
|
|
||||||
loadedRepositories = new ArrayList<>();
|
|
||||||
for (Repository repository : locationDefinition.getRepositories()) {
|
|
||||||
- repositoryIdManager.addMapping(repository.getId(), repository.getLocation());
|
|
||||||
- loadedRepositories.add(loadRepository(repository));
|
|
||||||
+ // We cannot resolve a non-file URI in local mode
|
|
||||||
+ if ((System.getProperty("TYCHO_MVN_LOCAL") == null && System.getProperty("TYCHO_MVN_RPMBUILD") == null)
|
|
||||||
+ || URIUtil.isFileURI(repository.getLocation())
|
|
||||||
+ || "fedora".equals(repository.getLocation().getScheme())) {
|
|
||||||
+ repositoryIdManager.addMapping(repository.getId(), repository.getLocation());
|
|
||||||
+ loadedRepositories.add(loadRepository(repository));
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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 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;
|
|
||||||
import org.eclipse.tycho.p2.impl.publisher.MavenPropertiesAdvice;
|
|
||||||
import org.eclipse.tycho.p2.impl.publisher.repo.TransientArtifactRepository;
|
|
||||||
import org.eclipse.tycho.p2.metadata.IArtifactFacade;
|
|
||||||
+import org.eclipse.tycho.p2.repository.LocalRepositoryReader;
|
|
||||||
import org.eclipse.tycho.p2.repository.MavenRepositoryCoordinates;
|
|
||||||
import org.eclipse.tycho.repository.local.GAVArtifactDescriptor;
|
|
||||||
import org.eclipse.tycho.repository.p2base.artifact.provider.IRawArtifactFileProvider;
|
|
||||||
@@ -216,15 +217,6 @@ public class TargetPlatformBundlePublisher {
|
|
||||||
GAVArtifactDescriptor descriptorForRepository = new GAVArtifactDescriptor(baseDescriptor,
|
|
||||||
repositoryCoordinates);
|
|
||||||
|
|
||||||
- File requiredArtifactLocation = new File(getBaseDir(),
|
|
||||||
- descriptorForRepository.getMavenCoordinates().getLocalRepositoryPath());
|
|
||||||
- File actualArtifactLocation = mavenArtifact.getLocation();
|
|
||||||
- if (!equivalentPaths(requiredArtifactLocation, actualArtifactLocation)) {
|
|
||||||
- throw new AssertionFailedException(
|
|
||||||
- "The Maven artifact to be added to the target platform is not stored at the required location on disk: required \""
|
|
||||||
- + requiredArtifactLocation + "\" but was \"" + actualArtifactLocation + "\"");
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
internalAddInternalDescriptor(descriptorForRepository);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -257,8 +249,9 @@ public class TargetPlatformBundlePublisher {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected File internalGetArtifactStorageLocation(IArtifactDescriptor descriptor) {
|
|
||||||
- String relativePath = toInternalDescriptor(descriptor).getMavenCoordinates().getLocalRepositoryPath();
|
|
||||||
- return new File(getBaseDir(), relativePath);
|
|
||||||
+ MavenRepositoryCoordinates coord = toInternalDescriptor(descriptor).getMavenCoordinates();
|
|
||||||
+ LocalRepositoryReader reader = new LocalRepositoryReader(getBaseDir());
|
|
||||||
+ return reader.getLocalArtifactLocation(coord.getGav(), coord.getClassifier(), coord.getExtensionOrDefault());
|
|
||||||
}
|
|
||||||
|
|
||||||
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 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;
|
|
||||||
import org.eclipse.equinox.p2.core.IProvisioningAgent;
|
|
||||||
import org.eclipse.equinox.p2.core.ProvisionException;
|
|
||||||
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
|
|
||||||
+import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
|
|
||||||
+import org.eclipse.equinox.p2.metadata.expression.IExpression;
|
|
||||||
+import org.eclipse.equinox.p2.query.IQuery;
|
|
||||||
import org.eclipse.equinox.p2.query.IQueryResult;
|
|
||||||
import org.eclipse.equinox.p2.query.QueryUtil;
|
|
||||||
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
|
|
||||||
@@ -273,9 +276,43 @@ public class TargetPlatformFactoryImpl implements TargetPlatformFactory {
|
|
||||||
metadataRepositories.add(localMetadataRepository);
|
|
||||||
}
|
|
||||||
|
|
||||||
- for (IMetadataRepository repository : metadataRepositories) {
|
|
||||||
- IQueryResult<IInstallableUnit> matches = repository.query(QueryUtil.ALL_UNITS, monitor);
|
|
||||||
- result.addAll(matches.toUnmodifiableSet());
|
|
||||||
+ if (System.getProperty("TYCHO_MVN_LOCAL") != null) {
|
|
||||||
+ final IExpression notmatchIU_ID = ExpressionUtil.parse("id != $0");
|
|
||||||
+ Set<IMetadataRepository> fedoraRepos = new HashSet<IMetadataRepository> ();
|
|
||||||
+
|
|
||||||
+ // Sanity check even though the repo we want should be at index 1
|
|
||||||
+ for (IMetadataRepository repository : metadataRepositories) {
|
|
||||||
+ if ("fedora".equals(repository.getLocation().getScheme())) {
|
|
||||||
+ fedoraRepos.add(repository);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ IQuery<IInstallableUnit> noLocalIUs = QueryUtil.createIUAnyQuery();
|
|
||||||
+
|
|
||||||
+ // Create a conjunction query that negates all IUs on the local system
|
|
||||||
+ for (IMetadataRepository repo : fedoraRepos) {
|
|
||||||
+ for (IInstallableUnit unit : repo.query(QueryUtil.ALL_UNITS, null).toUnmodifiableSet()) {
|
|
||||||
+ noLocalIUs = QueryUtil.createCompoundQuery(noLocalIUs,
|
|
||||||
+ QueryUtil.createMatchQuery(notmatchIU_ID, unit.getId()), true);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ for (IMetadataRepository repository : metadataRepositories) {
|
|
||||||
+ IQueryResult<IInstallableUnit> matches;
|
|
||||||
+ if ("fedora".equals(repository.getLocation().getScheme())) {
|
|
||||||
+ matches = repository.query(QueryUtil.ALL_UNITS, monitor);
|
|
||||||
+ } else {
|
|
||||||
+ // Don't collect any remote IUs that can be found on the system
|
|
||||||
+ // This will favour IUs in the system local p2 repository
|
|
||||||
+ matches = repository.query(noLocalIUs, monitor);
|
|
||||||
+ }
|
|
||||||
+ result.addAll(matches.toUnmodifiableSet());
|
|
||||||
+ }
|
|
||||||
+ } else {
|
|
||||||
+ for (IMetadataRepository repository : metadataRepositories) {
|
|
||||||
+ IQueryResult<IInstallableUnit> matches = repository.query(QueryUtil.ALL_UNITS, monitor);
|
|
||||||
+ result.addAll(matches.toUnmodifiableSet());
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
result.addAll(pomDependenciesContent.gatherMavenInstallableUnits());
|
|
||||||
@@ -329,7 +366,7 @@ public class TargetPlatformFactoryImpl implements TargetPlatformFactory {
|
|
||||||
List<URI> allRemoteArtifactRepositories = new ArrayList<>();
|
|
||||||
|
|
||||||
for (MavenRepositoryLocation location : completeRepositories) {
|
|
||||||
- if (!offline || URIUtil.isFileURI(location.getURL())) {
|
|
||||||
+ if (!offline || URIUtil.isFileURI(location.getURL()) || "fedora".equals(location.getURL().getScheme())) {
|
|
||||||
allRemoteArtifactRepositories.add(location.getURL());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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 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 @@
|
|
||||||
package org.eclipse.tycho.p2.repository;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
+import java.lang.reflect.Constructor;
|
|
||||||
+import java.lang.reflect.Method;
|
|
||||||
|
|
||||||
public class LocalRepositoryReader implements RepositoryReader {
|
|
||||||
|
|
||||||
@@ -21,8 +23,46 @@ public class LocalRepositoryReader implements RepositoryReader {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
+ @SuppressWarnings({ "unchecked", "rawtypes" })
|
|
||||||
public File getLocalArtifactLocation(GAV gav, String classifier, String extension) {
|
|
||||||
- return new File(localMavenRepositoryRoot, RepositoryLayoutHelper.getRelativePath(gav, classifier, extension));
|
|
||||||
- }
|
|
||||||
+ File file = new File(localMavenRepositoryRoot, RepositoryLayoutHelper.getRelativePath(gav, classifier,
|
|
||||||
+ extension));
|
|
||||||
+ // In Fedora the artifact may be in an XMvn-defined repository location (not in reactor cache)
|
|
||||||
+ if (!file.exists()) {
|
|
||||||
+ try {
|
|
||||||
+ // Create Plexus config
|
|
||||||
+ Class pcclazz = Class.forName("org.codehaus.plexus.ContainerConfiguration");
|
|
||||||
+ Object conf = Class.forName("org.codehaus.plexus.DefaultContainerConfiguration").newInstance();
|
|
||||||
+ pcclazz.getMethod("setAutoWiring", boolean.class).invoke(conf, true);
|
|
||||||
+ pcclazz.getMethod("setClassPathScanning", String.class).invoke(conf, "index");
|
|
||||||
+
|
|
||||||
+ // Use plexus container to lookup the reader
|
|
||||||
+ Class pclazz = Class.forName("org.codehaus.plexus.DefaultPlexusContainer");
|
|
||||||
+ Object plexus = pclazz.getConstructor(pcclazz).newInstance(conf);
|
|
||||||
+
|
|
||||||
+ // 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");
|
|
||||||
+ Constructor cNew = artclazz.getConstructor(String.class, String.class, String.class, String.class,
|
|
||||||
+ String.class);
|
|
||||||
+ Object artifact = cNew.newInstance(gav.getGroupId(), gav.getArtifactId(), classifier, extension,
|
|
||||||
+ gav.getVersion());
|
|
||||||
+
|
|
||||||
+ // Invoke "findArtifact" method of the workspace reader on the artifact
|
|
||||||
+ Method mfindArtifact = reader.getClass().getMethod("findArtifact", iartclazz);
|
|
||||||
+ File newFile = (File) mfindArtifact.invoke(reader, artifact);
|
|
||||||
+ if (newFile != null) {
|
|
||||||
+ file = newFile;
|
|
||||||
+ }
|
|
||||||
+ } catch (Exception e) {
|
|
||||||
+ e.printStackTrace();
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ 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 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 {
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addP2Repository(MavenRepositoryLocation location) {
|
|
||||||
- this.repositories.add(location);
|
|
||||||
+ // We cannot resolve a non-file URI in local mode while offline
|
|
||||||
+ if (System.getProperty("TYCHO_MVN_RPMBUILD") == null || "file".equalsIgnoreCase(location.getURL().getScheme())
|
|
||||||
+ || "fedora".equalsIgnoreCase(location.getURL().getScheme())) {
|
|
||||||
+ this.repositories.add(location);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 11b7c8b..182122d 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 @@
|
|
||||||
<plugin id="org.sat4j.core"/>
|
|
||||||
<plugin id="org.sat4j.pb"/>
|
|
||||||
<plugin id="org.tukaani.xz"/>
|
|
||||||
+ <plugin id="org.kxml2"/>
|
|
||||||
+ <plugin id="org.xmlpull"/>
|
|
||||||
+ <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 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 {
|
|
||||||
final File lockMarkerFile;
|
|
||||||
|
|
||||||
public FileLockerImpl(File file, Location anyLocation) {
|
|
||||||
+ File lockFileCandidate = null;
|
|
||||||
try {
|
|
||||||
if (file.isDirectory()) {
|
|
||||||
- this.lockMarkerFile = new File(file, LOCKFILE_SUFFIX).getCanonicalFile();
|
|
||||||
+ lockFileCandidate = new File(file, LOCKFILE_SUFFIX).getCanonicalFile();
|
|
||||||
} else {
|
|
||||||
- this.lockMarkerFile = new File(file.getParentFile(), file.getName() + LOCKFILE_SUFFIX)
|
|
||||||
- .getCanonicalFile();
|
|
||||||
+ lockFileCandidate = new File(file.getParentFile(), file.getName() + LOCKFILE_SUFFIX).getCanonicalFile();
|
|
||||||
}
|
|
||||||
- if (lockMarkerFile.isDirectory()) {
|
|
||||||
- throw new RuntimeException("Lock marker file " + lockMarkerFile + " already exists and is a directory");
|
|
||||||
+
|
|
||||||
+ if (lockFileCandidate.isDirectory()) {
|
|
||||||
+ throw new RuntimeException("Lock marker file " + lockFileCandidate + " already exists and is a directory");
|
|
||||||
}
|
|
||||||
- File parentDir = lockMarkerFile.getParentFile();
|
|
||||||
+ File parentDir = lockFileCandidate.getParentFile();
|
|
||||||
if (!parentDir.isDirectory() && !parentDir.mkdirs()) {
|
|
||||||
throw new RuntimeException("Could not create parent directory " + parentDir + " of lock marker file");
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ String baseDir = System.getProperty("user.dir");
|
|
||||||
+ String reactorCache = baseDir + "/.m2/";
|
|
||||||
+ // In Fedora we can only assume reactor cache is safe for read/write.
|
|
||||||
+ if (!lockFileCandidate.getAbsolutePath().startsWith(reactorCache)) {
|
|
||||||
+ String lockFileDir = reactorCache + LOCKFILE_SUFFIX;
|
|
||||||
+ // If the file is located within baseDir, no need to repeat
|
|
||||||
+ String lockFileName = file.getAbsolutePath().replace(baseDir, "").replace("/", "-").replaceFirst("-", "/") + LOCKFILE_SUFFIX;
|
|
||||||
+ lockFileCandidate = new File(lockFileDir, lockFileName);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ this.lockMarkerFile = lockFileCandidate;
|
|
||||||
this.lockFileLocation = anyLocation.createLocation(null, null, false);
|
|
||||||
this.lockFileLocation.set(lockMarkerFile.toURL(), false, lockMarkerFile.getAbsolutePath());
|
|
||||||
+
|
|
||||||
} catch (MalformedURLException e) {
|
|
||||||
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 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;
|
|
||||||
import org.codehaus.plexus.PlexusContainer;
|
|
||||||
import org.codehaus.plexus.component.annotations.Component;
|
|
||||||
import org.codehaus.plexus.component.annotations.Requirement;
|
|
||||||
+import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
|
|
||||||
import org.codehaus.plexus.logging.Logger;
|
|
||||||
import org.eclipse.tycho.ReactorProject;
|
|
||||||
import org.eclipse.tycho.core.osgitools.BundleReader;
|
|
||||||
@@ -86,6 +87,18 @@ public class TychoMavenLifecycleParticipant extends AbstractMavenLifecyclePartic
|
|
||||||
|
|
||||||
configureComponents(session);
|
|
||||||
|
|
||||||
+ try {
|
|
||||||
+ if (plexus.lookup("org.fedoraproject.xmvn.resolver.Resolver") != null) {
|
|
||||||
+ if (session.isOffline()) {
|
|
||||||
+ System.setProperty("TYCHO_MVN_RPMBUILD", "");
|
|
||||||
+ } else {
|
|
||||||
+ System.setProperty("TYCHO_MVN_LOCAL", "");
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ } catch (ComponentLookupException e) {
|
|
||||||
+ // No XMvn (Upstream Maven in use)
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
for (MavenProject project : projects) {
|
|
||||||
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 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;
|
|
||||||
import org.eclipse.tycho.core.TargetPlatformConfiguration;
|
|
||||||
import org.eclipse.tycho.core.TychoConstants;
|
|
||||||
import org.eclipse.tycho.core.TychoProject;
|
|
||||||
+import org.eclipse.tycho.core.ee.ExecutionEnvironmentUtils;
|
|
||||||
+import org.eclipse.tycho.core.ee.UnknownEnvironmentException;
|
|
||||||
+import org.eclipse.tycho.core.ee.shared.ExecutionEnvironment;
|
|
||||||
import org.eclipse.tycho.core.ee.shared.ExecutionEnvironmentConfiguration;
|
|
||||||
import org.eclipse.tycho.core.osgitools.targetplatform.LocalDependencyResolver;
|
|
||||||
import org.eclipse.tycho.core.osgitools.targetplatform.MultiEnvironmentDependencyArtifacts;
|
|
||||||
@@ -94,15 +97,35 @@ public abstract class AbstractTychoProject extends AbstractLogEnabled implements
|
|
||||||
|
|
||||||
String configuredForcedProfile = tpConfiguration.getExecutionEnvironment();
|
|
||||||
if (configuredForcedProfile != null) {
|
|
||||||
+ configuredForcedProfile = overrideToAtLeastJavaSE16(configuredForcedProfile);
|
|
||||||
sink.overrideProfileConfiguration(configuredForcedProfile,
|
|
||||||
"target-platform-configuration <executionEnvironment>");
|
|
||||||
}
|
|
||||||
|
|
||||||
String configuredDefaultProfile = tpConfiguration.getExecutionEnvironmentDefault();
|
|
||||||
if (configuredDefaultProfile != null) {
|
|
||||||
+ configuredDefaultProfile = overrideToAtLeastJavaSE16(configuredDefaultProfile);
|
|
||||||
sink.setProfileConfiguration(configuredDefaultProfile,
|
|
||||||
"target-platform-configuration <executionEnvironmentDefault>");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ public String overrideToAtLeastJavaSE16 (String profile) {
|
|
||||||
+ try {
|
|
||||||
+ ExecutionEnvironment ee = ExecutionEnvironmentUtils.getExecutionEnvironment(profile);
|
|
||||||
+
|
|
||||||
+ if (System.getProperty("TYCHO_MVN_LOCAL") != null || System.getProperty("TYCHO_MVN_RPMBUILD") != null) {
|
|
||||||
+ // EE must be at least JavaSE-1.6
|
|
||||||
+ final ExecutionEnvironment javaSE16 = ExecutionEnvironmentUtils.getExecutionEnvironment("JavaSE-1.6");
|
|
||||||
+ if (! ee.isCompatibleCompilerTargetLevel(javaSE16.getCompilerTargetLevelDefault())) {
|
|
||||||
+ ee = javaSE16;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return ee.getProfileName();
|
|
||||||
+ } catch (UnknownEnvironmentException e) {
|
|
||||||
+ // can't happen, ee is validated during configuration parsing
|
|
||||||
+ return null;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
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 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
|
|
||||||
@@ -504,6 +504,7 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro
|
|
||||||
String pdeProfile = getEclipsePluginProject(DefaultReactorProject.adapt(project)).getBuildProperties()
|
|
||||||
.getJreCompilationProfile();
|
|
||||||
if (pdeProfile != null) {
|
|
||||||
+ pdeProfile = overrideToAtLeastJavaSE16(pdeProfile);
|
|
||||||
sink.setProfileConfiguration(pdeProfile.trim(), "build.properties");
|
|
||||||
|
|
||||||
} else {
|
|
||||||
@@ -514,13 +515,13 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro
|
|
||||||
|
|
||||||
switch (tpConfiguration.getBREEHeaderSelectionPolicy()) {
|
|
||||||
case first:
|
|
||||||
- sink.setProfileConfiguration(manifestBREEs[0].getProfileName(),
|
|
||||||
+ sink.setProfileConfiguration(overrideToAtLeastJavaSE16(manifestBREEs[0].getProfileName()),
|
|
||||||
"Bundle-RequiredExecutionEnvironment (first entry)");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case minimal:
|
|
||||||
ExecutionEnvironment manifestMinimalEE = Collections.min(Arrays.asList(manifestBREEs));
|
|
||||||
- sink.setProfileConfiguration(manifestMinimalEE.getProfileName(),
|
|
||||||
+ sink.setProfileConfiguration(overrideToAtLeastJavaSE16(manifestMinimalEE.getProfileName()),
|
|
||||||
"Bundle-RequiredExecutionEnvironment (minimal entry)");
|
|
||||||
}
|
|
||||||
|
|
||||||
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 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 {
|
|
||||||
+ configuration.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
- addTargetEnvironments(result, project, configuration);
|
|
||||||
+ // Use the defined environments only in local mode with tycho.local.keepTarget
|
|
||||||
+ if ((System.getProperty("TYCHO_MVN_LOCAL") == null && System.getProperty("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 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;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
+import java.nio.file.Files;
|
|
||||||
+import java.nio.file.StandardCopyOption;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
@@ -163,36 +165,49 @@ public class TychoOsgiRuntimeLocator implements EquinoxRuntimeLocator {
|
|
||||||
File artifactFile = new File(session.getLocalRepository().getBasedir(), session.getLocalRepository()
|
|
||||||
.pathOf(artifact));
|
|
||||||
File eclipseDir = new File(artifactFile.getParentFile(), "eclipse");
|
|
||||||
+ File eclipseSaveDir = new File(artifactFile.getParentFile(), "eclipse-save");
|
|
||||||
+ File fedoraDir = new File(artifactFile.getParentFile(), "fedora-eclipse");
|
|
||||||
|
|
||||||
FileLocker locker = fileLockService.getFileLocker(artifactFile);
|
|
||||||
locker.lock();
|
|
||||||
try {
|
|
||||||
- if (!eclipseDir.exists() || artifact.isSnapshot()) {
|
|
||||||
+ if (!fedoraDir.exists() || artifact.isSnapshot()) {
|
|
||||||
logger.debug("Extracting Tycho's OSGi runtime");
|
|
||||||
|
|
||||||
- if (artifact.getFile().lastModified() > eclipseDir.lastModified()) {
|
|
||||||
+ if (artifact.getFile().lastModified() > fedoraDir.lastModified()) {
|
|
||||||
logger.debug("Unpacking Tycho's OSGi runtime to " + eclipseDir);
|
|
||||||
try {
|
|
||||||
- FileUtils.deleteDirectory(eclipseDir);
|
|
||||||
+ FileUtils.deleteDirectory(fedoraDir);
|
|
||||||
+ if (eclipseDir.exists()) {
|
|
||||||
+ FileUtils.rename(eclipseDir, eclipseSaveDir);
|
|
||||||
+ }
|
|
||||||
} catch (IOException e) {
|
|
||||||
- logger.warn("Failed to delete Tycho's OSGi runtime " + eclipseDir + ": " + e.getMessage());
|
|
||||||
+ logger.warn("Failed to delete Tycho's OSGi runtime " + fedoraDir + ": " + e.getMessage());
|
|
||||||
}
|
|
||||||
unArchiver.setSourceFile(artifact.getFile());
|
|
||||||
unArchiver.setDestDirectory(eclipseDir.getParentFile());
|
|
||||||
try {
|
|
||||||
unArchiver.extract();
|
|
||||||
+ logger.debug("Moving Tycho's OSGi runtime to " + fedoraDir);
|
|
||||||
+ FileUtils.rename(eclipseDir, fedoraDir);
|
|
||||||
+ if (eclipseSaveDir.exists()) {
|
|
||||||
+ FileUtils.rename(eclipseSaveDir, eclipseDir);
|
|
||||||
+ }
|
|
||||||
} catch (ArchiverException e) {
|
|
||||||
throw new MavenExecutionException("Failed to unpack Tycho's OSGi runtime: "
|
|
||||||
+ e.getMessage(), e);
|
|
||||||
+ } catch (IOException e) {
|
|
||||||
+ throw new MavenExecutionException("Failed to move Tycho's OSGi runtime: " + e.getMessage(),
|
|
||||||
+ e);
|
|
||||||
}
|
|
||||||
|
|
||||||
- eclipseDir.setLastModified(artifact.getFile().lastModified());
|
|
||||||
+ fedoraDir.setLastModified(artifact.getFile().lastModified());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
locker.release();
|
|
||||||
}
|
|
||||||
- description.addInstallation(eclipseDir);
|
|
||||||
+ description.addInstallation(fedoraDir);
|
|
||||||
} else {
|
|
||||||
description.addBundle(artifact.getFile());
|
|
||||||
}
|
|
||||||
diff --git a/tycho-p2/tycho-p2-facade/pom.xml b/tycho-p2/tycho-p2-facade/pom.xml
|
|
||||||
index 9c59b14..54cc384 100644
|
|
||||||
--- a/tycho-p2/tycho-p2-facade/pom.xml
|
|
||||||
+++ b/tycho-p2/tycho-p2-facade/pom.xml
|
|
||||||
@@ -57,6 +57,11 @@
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
+ <dependency>
|
|
||||||
+ <groupId>org.fedoraproject.p2</groupId>
|
|
||||||
+ <artifactId>org.fedoraproject.p2</artifactId>
|
|
||||||
+ <version>0.0.1-SNAPSHOT</version>
|
|
||||||
+ </dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<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 d5be20c..8405058 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
|
|
||||||
@@ -89,6 +89,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;
|
|
||||||
+import org.fedoraproject.p2.EclipseSystemLayout;
|
|
||||||
|
|
||||||
@Component(role = DependencyResolver.class, hint = P2DependencyResolver.ROLE_HINT, instantiationStrategy = "per-lookup")
|
|
||||||
public class P2DependencyResolver extends AbstractLogEnabled implements DependencyResolver, Initializable {
|
|
||||||
@@ -209,6 +210,13 @@ public class P2DependencyResolver extends AbstractLogEnabled implements Dependen
|
|
||||||
pomDependencies.setProjectLocation(project.getBasedir());
|
|
||||||
}
|
|
||||||
|
|
||||||
+ // 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 (ArtifactRepository repository : project.getRemoteArtifactRepositories()) {
|
|
||||||
addEntireP2RepositoryToTargetPlatform(repository, tpConfiguration);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.20.1
|
|
||||||
|
|
||||||
@ -1,51 +0,0 @@
|
|||||||
Form ca34be70c509a2512d290340d5cebf7c4678acde Mon Sep 17 00:00:00 2001
|
|
||||||
From: lyn1001 <thistleslyn@163.com>
|
|
||||||
Date: Sun, 13 Sep 2020 18:58:41 +0800
|
|
||||||
Subject: [PATCH] fix build fail
|
|
||||||
|
|
||||||
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 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
|
|
||||||
}
|
|
||||||
|
|
||||||
private void validate(List<MavenProject> projects) throws MavenExecutionException {
|
|
||||||
- validateConsistentTychoVersion(projects);
|
|
||||||
+ if (System.getProperty("tycho.enableVersionCheck") != null) {
|
|
||||||
+ validateConsistentTychoVersion(projects);
|
|
||||||
+ }
|
|
||||||
validateUniqueBaseDirs(projects);
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java b/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java
|
|
||||||
index 475afe2..2295d66 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
|
|
||||||
@@ -114,12 +114,11 @@ public abstract class AbstractTychoIntegrationTest {
|
|
||||||
verifier.getCliOptions().add(customOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (System.getProperty(SYSPROP_STATELOCATION) != null) {
|
|
||||||
- verifier.setForkJvm(false);
|
|
||||||
- String m2eresolver = System.getProperty("tychodev-maven.ext.class.path"); // XXX
|
|
||||||
- if (m2eresolver != null) {
|
|
||||||
- verifier.addCliOption("-Dmaven.ext.class.path=" + m2eresolver);
|
|
||||||
- }
|
|
||||||
+ String m2eState = System.getProperty("m2eclipse.workspace.state");
|
|
||||||
+ String m2eResolver = System.getProperty("m2eclipse.workspace.resolver");
|
|
||||||
+
|
|
||||||
+ if (m2eState != null && m2eResolver != null) {
|
|
||||||
+ verifier.getVerifierProperties().put("m2eclipse.workspace.state", m2eState);
|
|
||||||
}
|
|
||||||
|
|
||||||
return verifier;
|
|
||||||
--
|
|
||||||
2.20.1
|
|
||||||
|
|
||||||
@ -1,688 +0,0 @@
|
|||||||
From 2e005b107e6abda5bf09a963a54833cedabfba99 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Roland Grunberg <rgrunber@redhat.com>
|
|
||||||
Date: Wed, 18 Jun 2014 13:01:31 -0400
|
|
||||||
Subject: [PATCH 3/6] Tycho should always delegate artifact resolution to
|
|
||||||
Maven.
|
|
||||||
|
|
||||||
Maven resolves dependencies from the following locations in the
|
|
||||||
following order:
|
|
||||||
* reactor,
|
|
||||||
* workspace (eg. XMvn),
|
|
||||||
* local repository,
|
|
||||||
* remote repositories.
|
|
||||||
|
|
||||||
Tycho assumes that all resolved artifacts are present within the reactor
|
|
||||||
cache but this is not true for artifacts resolved from workspace
|
|
||||||
locations.
|
|
||||||
|
|
||||||
Change-Id: Ia44969ed1064965a82c3507a63e54caeebb75b18
|
|
||||||
---
|
|
||||||
.../META-INF/MANIFEST.MF | 1 +
|
|
||||||
.../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 ++-
|
|
||||||
22 files changed, 166 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 ef464f8..05ac727 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
|
|
||||||
@@ -8,3 +8,4 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
|
||||||
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
|
|
||||||
+++ b/tycho-bundles/org.eclipse.tycho.core.shared/src/main/java/org/eclipse/tycho/core/shared/MavenContext.java
|
|
||||||
@@ -38,4 +38,6 @@ public interface MavenContext {
|
|
||||||
*/
|
|
||||||
public Properties getSessionProperties();
|
|
||||||
|
|
||||||
+ public MavenRepositorySystem getRepositorySystem();
|
|
||||||
+
|
|
||||||
}
|
|
||||||
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 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 {
|
|
||||||
private MavenLogger mavenLogger;
|
|
||||||
private boolean offline;
|
|
||||||
private Properties mergedProperties;
|
|
||||||
+ private MavenRepositorySystem repositorySystem;
|
|
||||||
|
|
||||||
public MavenContextImpl(File localRepositoryRoot, boolean offline, MavenLogger mavenLogger,
|
|
||||||
- Properties mergedProperties) {
|
|
||||||
+ Properties mergedProperties, MavenRepositorySystem repositorySystem) {
|
|
||||||
this.localRepositoryRoot = localRepositoryRoot;
|
|
||||||
this.offline = offline;
|
|
||||||
this.mavenLogger = mavenLogger;
|
|
||||||
this.mergedProperties = mergedProperties;
|
|
||||||
+ this.repositorySystem = repositorySystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
// constructor for tests
|
|
||||||
public MavenContextImpl(File localRepositoryRoot, MavenLogger mavenLogger) {
|
|
||||||
- this(localRepositoryRoot, false, mavenLogger, new Properties());
|
|
||||||
+ this(localRepositoryRoot, false, mavenLogger, new Properties(), null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@@ -53,4 +55,8 @@ public class MavenContextImpl implements MavenContext {
|
|
||||||
return mergedProperties;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ public MavenRepositorySystem getRepositorySystem() {
|
|
||||||
+ return repositorySystem;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
}
|
|
||||||
diff --git a/tycho-bundles/org.eclipse.tycho.core.shared/src/main/java/org/eclipse/tycho/core/shared/MavenRepositorySystem.java b/tycho-bundles/org.eclipse.tycho.core.shared/src/main/java/org/eclipse/tycho/core/shared/MavenRepositorySystem.java
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..965e5cd
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/tycho-bundles/org.eclipse.tycho.core.shared/src/main/java/org/eclipse/tycho/core/shared/MavenRepositorySystem.java
|
|
||||||
@@ -0,0 +1,19 @@
|
|
||||||
+/*******************************************************************************
|
|
||||||
+ * Copyright (c) 2014 Red Hat Inc.
|
|
||||||
+ * 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
|
|
||||||
+ * http://www.eclipse.org/legal/epl-v10.html
|
|
||||||
+ *
|
|
||||||
+ * Contributors:
|
|
||||||
+ * Red Hat Inc. - initial API and implementation
|
|
||||||
+ *******************************************************************************/
|
|
||||||
+package org.eclipse.tycho.core.shared;
|
|
||||||
+
|
|
||||||
+import java.io.File;
|
|
||||||
+
|
|
||||||
+public interface MavenRepositorySystem {
|
|
||||||
+
|
|
||||||
+ public File resolve(String gid, String aid, String version, String type, String classifier);
|
|
||||||
+
|
|
||||||
+}
|
|
||||||
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 7bf376b..781b53f 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
|
|
||||||
import org.eclipse.tycho.repository.streaming.testutil.ProbeArtifactSink;
|
|
||||||
import org.eclipse.tycho.repository.streaming.testutil.ProbeOutputStream;
|
|
||||||
import org.eclipse.tycho.repository.streaming.testutil.ProbeRawArtifactSink;
|
|
||||||
+import org.eclipse.tycho.test.util.MavenRepositorySystemStub;
|
|
||||||
import org.junit.After;
|
|
||||||
import org.junit.Before;
|
|
||||||
import org.junit.Rule;
|
|
||||||
@@ -114,7 +115,8 @@ public class LocalArtifactRepositoryP2APITest {
|
|
||||||
@Before
|
|
||||||
public void initSubject() throws Exception {
|
|
||||||
temporaryLocalMavenRepo.initContentFromResourceFolder(ResourceUtil.resourceFile("repositories/local"));
|
|
||||||
- subject = new LocalArtifactRepository(null, temporaryLocalMavenRepo.getLocalRepositoryIndex());
|
|
||||||
+ subject = new LocalArtifactRepository(null, temporaryLocalMavenRepo.getLocalRepositoryIndex(),
|
|
||||||
+ new MavenRepositorySystemStub(temporaryLocalMavenRepo.getLocalRepositoryRoot()));
|
|
||||||
|
|
||||||
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 1695b0f..52ac568 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
|
|
||||||
@@ -30,6 +30,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.junit.Assert;
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
@@ -47,7 +48,7 @@ public class LocalMetadataRepositoryTest extends BaseMavenRepositoryTest {
|
|
||||||
|
|
||||||
protected IMetadataRepository loadRepository(File location) throws ProvisionException {
|
|
||||||
return new LocalMetadataRepository(location.toURI(), createMetadataIndex(location),
|
|
||||||
- new LocalRepositoryReader(location));
|
|
||||||
+ new LocalRepositoryReader(location, new MavenRepositorySystemStub(location)));
|
|
||||||
}
|
|
||||||
|
|
||||||
private LocalMetadataRepository createRepository(File location) throws ProvisionException {
|
|
||||||
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 6e45753..406c1dc 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;
|
|
||||||
import org.eclipse.equinox.p2.core.IProvisioningAgent;
|
|
||||||
import org.eclipse.equinox.p2.metadata.IArtifactKey;
|
|
||||||
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
|
|
||||||
+import org.eclipse.tycho.core.shared.MavenRepositorySystem;
|
|
||||||
import org.eclipse.tycho.p2.maven.repository.Activator;
|
|
||||||
import org.eclipse.tycho.p2.maven.repository.xmlio.ArtifactsIO;
|
|
||||||
import org.eclipse.tycho.p2.repository.GAV;
|
|
||||||
@@ -42,15 +43,16 @@ public class LocalArtifactRepository extends ArtifactRepositoryBaseImpl<GAVArtif
|
|
||||||
|
|
||||||
// TODO what is the agent needed for? does using the default agent harm?
|
|
||||||
public LocalArtifactRepository(LocalRepositoryP2Indices localRepoIndices) {
|
|
||||||
- this(Activator.getProvisioningAgent(), localRepoIndices);
|
|
||||||
+ this(Activator.getProvisioningAgent(), localRepoIndices, (MavenRepositorySystem) null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public LocalArtifactRepository(LocalRepositoryP2Indices localRepoIndices, RepositoryReader contentLocator) {
|
|
||||||
this(Activator.getProvisioningAgent(), localRepoIndices, contentLocator);
|
|
||||||
}
|
|
||||||
|
|
||||||
- public LocalArtifactRepository(IProvisioningAgent agent, LocalRepositoryP2Indices localRepoIndices) {
|
|
||||||
- this(agent, localRepoIndices, new LocalRepositoryReader(localRepoIndices.getBasedir()));
|
|
||||||
+ public LocalArtifactRepository(IProvisioningAgent agent, LocalRepositoryP2Indices localRepoIndices,
|
|
||||||
+ MavenRepositorySystem repositorySystem) {
|
|
||||||
+ this(agent, localRepoIndices, new LocalRepositoryReader(localRepoIndices.getBasedir(), repositorySystem));
|
|
||||||
}
|
|
||||||
|
|
||||||
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 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;
|
|
||||||
import org.eclipse.equinox.p2.core.ProvisionException;
|
|
||||||
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
|
|
||||||
import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactRepositoryFactory;
|
|
||||||
+import org.eclipse.tycho.core.shared.MavenRepositorySystem;
|
|
||||||
import org.eclipse.tycho.p2.maven.repository.Activator;
|
|
||||||
import org.eclipse.tycho.p2.repository.LocalRepositoryP2Indices;
|
|
||||||
import org.eclipse.tycho.repository.util.internal.RepositoryFactoryTools;
|
|
||||||
@@ -41,7 +42,7 @@ public class LocalArtifactRepositoryFactory extends ArtifactRepositoryFactory {
|
|
||||||
if (localRepositoryDirectory.isDirectory()
|
|
||||||
&& new File(localRepositoryDirectory, ".meta/p2-artifacts.properties").exists()) {
|
|
||||||
// see FileBasedTychoRepositoryIndex#ARTIFACTS_INDEX_RELPATH
|
|
||||||
- return new LocalArtifactRepository(getAgent(), lookupLocalRepoIndices());
|
|
||||||
+ return new LocalArtifactRepository(getAgent(), lookupLocalRepoIndices(), lookupLocalRepoIndices().getRepositorySystem());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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 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 @@ import java.io.File;
|
|
||||||
|
|
||||||
import org.eclipse.tycho.core.shared.MavenContext;
|
|
||||||
import org.eclipse.tycho.core.shared.MavenLogger;
|
|
||||||
+import org.eclipse.tycho.core.shared.MavenRepositorySystem;
|
|
||||||
import org.eclipse.tycho.locking.facade.FileLockService;
|
|
||||||
import org.eclipse.tycho.p2.repository.LocalRepositoryP2Indices;
|
|
||||||
import org.eclipse.tycho.p2.repository.TychoRepositoryIndex;
|
|
||||||
@@ -25,6 +26,7 @@ public class LocalRepositoryP2IndicesImpl implements LocalRepositoryP2Indices {
|
|
||||||
private FileLockService fileLockService;
|
|
||||||
private File localRepositoryRoot;
|
|
||||||
private MavenLogger logger;
|
|
||||||
+ private MavenRepositorySystem repoSystem;
|
|
||||||
|
|
||||||
// derived members
|
|
||||||
private boolean initialized = false;
|
|
||||||
@@ -39,6 +41,7 @@ public class LocalRepositoryP2IndicesImpl implements LocalRepositoryP2Indices {
|
|
||||||
public void setMavenContext(MavenContext mavenContext) {
|
|
||||||
this.localRepositoryRoot = mavenContext.getLocalRepositoryRoot();
|
|
||||||
this.logger = mavenContext.getLogger();
|
|
||||||
+ this.repoSystem = mavenContext.getRepositorySystem();
|
|
||||||
}
|
|
||||||
|
|
||||||
// injected by DS runtime
|
|
||||||
@@ -80,4 +83,8 @@ public class LocalRepositoryP2IndicesImpl implements LocalRepositoryP2Indices {
|
|
||||||
return localRepositoryRoot;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ public MavenRepositorySystem getRepositorySystem() {
|
|
||||||
+ return repoSystem;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
}
|
|
||||||
diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/remote/RemoteAgentMavenMirrorsTest.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/remote/RemoteAgentMavenMirrorsTest.java
|
|
||||||
index 432ec09..4e5566a 100644
|
|
||||||
--- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/remote/RemoteAgentMavenMirrorsTest.java
|
|
||||||
+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/remote/RemoteAgentMavenMirrorsTest.java
|
|
||||||
@@ -29,6 +29,7 @@ import org.eclipse.tycho.p2.impl.test.ResourceUtil;
|
|
||||||
import org.eclipse.tycho.p2.remote.testutil.MavenRepositorySettingsStub;
|
|
||||||
import org.eclipse.tycho.test.util.HttpServer;
|
|
||||||
import org.eclipse.tycho.test.util.LogVerifier;
|
|
||||||
+import org.eclipse.tycho.test.util.MavenRepositorySystemStub;
|
|
||||||
import org.junit.Before;
|
|
||||||
import org.junit.Rule;
|
|
||||||
import org.junit.Test;
|
|
||||||
@@ -52,7 +53,7 @@ public class RemoteAgentMavenMirrorsTest {
|
|
||||||
public void initSubject() throws Exception {
|
|
||||||
File localRepository = tempManager.newFolder("localRepo");
|
|
||||||
MavenContext mavenContext = new MavenContextImpl(localRepository, OFFLINE, logVerifier.getLogger(),
|
|
||||||
- new Properties());
|
|
||||||
+ new Properties(), new MavenRepositorySystemStub(localRepository));
|
|
||||||
|
|
||||||
mavenRepositorySettings = new MavenRepositorySettingsStub();
|
|
||||||
subject = new RemoteAgent(mavenContext, mavenRepositorySettings, OFFLINE);
|
|
||||||
diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/remote/RemoteAgentMetadataRepositoryCacheTest.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/remote/RemoteAgentMetadataRepositoryCacheTest.java
|
|
||||||
index ae31862..14b8f85 100644
|
|
||||||
--- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/remote/RemoteAgentMetadataRepositoryCacheTest.java
|
|
||||||
+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl.test/src/test/java/org/eclipse/tycho/p2/remote/RemoteAgentMetadataRepositoryCacheTest.java
|
|
||||||
@@ -26,6 +26,7 @@ import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
|
|
||||||
import org.eclipse.tycho.core.shared.MavenContextImpl;
|
|
||||||
import org.eclipse.tycho.test.util.HttpServer;
|
|
||||||
import org.eclipse.tycho.test.util.LogVerifier;
|
|
||||||
+import org.eclipse.tycho.test.util.MavenRepositorySystemStub;
|
|
||||||
import org.junit.Before;
|
|
||||||
import org.junit.Rule;
|
|
||||||
import org.junit.Test;
|
|
||||||
@@ -126,12 +127,12 @@ public class RemoteAgentMetadataRepositoryCacheTest {
|
|
||||||
|
|
||||||
private RemoteAgent newOnlineAgent() throws Exception {
|
|
||||||
return new RemoteAgent(new MavenContextImpl(localMavenRepository, false, logVerifier.getLogger(),
|
|
||||||
- new Properties()));
|
|
||||||
+ new Properties(), new MavenRepositorySystemStub(localMavenRepository)));
|
|
||||||
}
|
|
||||||
|
|
||||||
private RemoteAgent newOfflineAgent() throws Exception {
|
|
||||||
return new RemoteAgent(new MavenContextImpl(localMavenRepository, true, logVerifier.getLogger(),
|
|
||||||
- new Properties()));
|
|
||||||
+ new Properties(), new MavenRepositorySystemStub(localMavenRepository)));
|
|
||||||
}
|
|
||||||
|
|
||||||
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 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;
|
|
||||||
import org.eclipse.tycho.repository.p2base.artifact.provider.IRawArtifactProvider;
|
|
||||||
import org.eclipse.tycho.repository.streaming.testutil.ProbeRawArtifactSink;
|
|
||||||
import org.eclipse.tycho.test.util.LogVerifier;
|
|
||||||
+import org.eclipse.tycho.test.util.MavenRepositorySystemStub;
|
|
||||||
import org.junit.Before;
|
|
||||||
import org.junit.Rule;
|
|
||||||
import org.junit.Test;
|
|
||||||
@@ -57,7 +58,7 @@ public class TargetPlatformBundlePublisherTest {
|
|
||||||
logVerifier.expectNoWarnings();
|
|
||||||
|
|
||||||
localRepositoryRoot = tempFolder.getRoot();
|
|
||||||
- subject = new TargetPlatformBundlePublisher(localRepositoryRoot, logVerifier.getLogger());
|
|
||||||
+ subject = new TargetPlatformBundlePublisher(localRepositoryRoot, logVerifier.getLogger(), new MavenRepositorySystemStub(localRepositoryRoot));
|
|
||||||
}
|
|
||||||
|
|
||||||
@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 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;
|
|
||||||
import org.eclipse.tycho.repository.local.LocalArtifactRepository;
|
|
||||||
import org.eclipse.tycho.repository.local.LocalMetadataRepository;
|
|
||||||
import org.eclipse.tycho.repository.local.index.LocalRepositoryP2IndicesImpl;
|
|
||||||
+import org.eclipse.tycho.test.util.MavenRepositorySystemStub;
|
|
||||||
import org.eclipse.tycho.test.util.NoopFileLockService;
|
|
||||||
|
|
||||||
public class TestResolverFactory implements P2ResolverFactory {
|
|
||||||
@@ -45,7 +46,7 @@ public class TestResolverFactory implements P2ResolverFactory {
|
|
||||||
|
|
||||||
File localMavenRepoRoot = mavenContext.getLocalRepositoryRoot();
|
|
||||||
LocalRepositoryP2Indices localRepoIndices = createLocalRepoIndices(mavenContext);
|
|
||||||
- LocalRepositoryReader localRepositoryReader = new LocalRepositoryReader(localMavenRepoRoot);
|
|
||||||
+ LocalRepositoryReader localRepositoryReader = new LocalRepositoryReader(localMavenRepoRoot, mavenContext.getRepositorySystem());
|
|
||||||
localMetadataRepo = new LocalMetadataRepository(localMavenRepoRoot.toURI(),
|
|
||||||
localRepoIndices.getMetadataIndex(), localRepositoryReader);
|
|
||||||
localArtifactRepo = new LocalArtifactRepository(localRepoIndices, localRepositoryReader);
|
|
||||||
@@ -56,7 +57,7 @@ public class TestResolverFactory implements P2ResolverFactory {
|
|
||||||
}
|
|
||||||
|
|
||||||
private MavenContext createMavenContext(boolean offline, MavenLogger logger) {
|
|
||||||
- return new MavenContextImpl(getLocalRepositoryLocation(), offline, logger, new Properties());
|
|
||||||
+ return new MavenContextImpl(getLocalRepositoryLocation(), offline, logger, new Properties(), new MavenRepositorySystemStub(getLocalRepositoryLocation()));
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 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 {
|
|
||||||
private static LocalMetadataRepository localMetadataRepository;
|
|
||||||
private static LocalArtifactRepository localArtifactRepository;
|
|
||||||
|
|
||||||
- private MavenContext mavenContext;
|
|
||||||
+ private static MavenContext mavenContext;
|
|
||||||
private LocalRepositoryP2Indices localRepoIndices;
|
|
||||||
private RemoteAgentManager remoteAgentManager;
|
|
||||||
private TargetDefinitionResolverService targetDefinitionResolverService;
|
|
||||||
@@ -42,7 +42,8 @@ public class P2ResolverFactoryImpl implements P2ResolverFactory {
|
|
||||||
LocalRepositoryP2Indices localRepoIndices) {
|
|
||||||
if (localMetadataRepository == null) {
|
|
||||||
File localMavenRepoRoot = context.getLocalRepositoryRoot();
|
|
||||||
- RepositoryReader contentLocator = new LocalRepositoryReader(localMavenRepoRoot);
|
|
||||||
+ RepositoryReader contentLocator = new LocalRepositoryReader(localMavenRepoRoot,
|
|
||||||
+ mavenContext.getRepositorySystem());
|
|
||||||
localMetadataRepository = new LocalMetadataRepository(localMavenRepoRoot.toURI(),
|
|
||||||
localRepoIndices.getMetadataIndex(), contentLocator);
|
|
||||||
|
|
||||||
@@ -53,7 +54,8 @@ public class P2ResolverFactoryImpl implements P2ResolverFactory {
|
|
||||||
private static synchronized LocalArtifactRepository getLocalArtifactRepository(MavenContext mavenContext,
|
|
||||||
LocalRepositoryP2Indices localRepoIndices) {
|
|
||||||
if (localArtifactRepository == null) {
|
|
||||||
- RepositoryReader contentLocator = new LocalRepositoryReader(mavenContext.getLocalRepositoryRoot());
|
|
||||||
+ RepositoryReader contentLocator = new LocalRepositoryReader(mavenContext.getLocalRepositoryRoot(),
|
|
||||||
+ mavenContext.getRepositorySystem());
|
|
||||||
localArtifactRepository = new LocalArtifactRepository(localRepoIndices, contentLocator);
|
|
||||||
}
|
|
||||||
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 c7eabd1..6821461 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 {
|
|
||||||
this.logger = mavenContext.getLogger();
|
|
||||||
|
|
||||||
File localRepositoryRoot = mavenContext.getLocalRepositoryRoot();
|
|
||||||
- this.bundlesPublisher = new TargetPlatformBundlePublisher(localRepositoryRoot, mavenContext.getLogger());
|
|
||||||
+ this.bundlesPublisher = new TargetPlatformBundlePublisher(localRepositoryRoot, mavenContext.getLogger(), mavenContext.getRepositorySystem());
|
|
||||||
}
|
|
||||||
|
|
||||||
@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 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;
|
|
||||||
import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
|
|
||||||
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
|
|
||||||
import org.eclipse.tycho.core.shared.MavenLogger;
|
|
||||||
+import org.eclipse.tycho.core.shared.MavenRepositorySystem;
|
|
||||||
import org.eclipse.tycho.p2.impl.publisher.MavenPropertiesAdvice;
|
|
||||||
import org.eclipse.tycho.p2.impl.publisher.repo.TransientArtifactRepository;
|
|
||||||
import org.eclipse.tycho.p2.metadata.IArtifactFacade;
|
|
||||||
@@ -42,8 +43,9 @@ public class TargetPlatformBundlePublisher {
|
|
||||||
private final MavenLogger logger;
|
|
||||||
private final PublishedBundlesArtifactRepository publishedArtifacts;
|
|
||||||
|
|
||||||
- public TargetPlatformBundlePublisher(File localMavenRepositoryRoot, MavenLogger logger) {
|
|
||||||
- this.publishedArtifacts = new PublishedBundlesArtifactRepository(localMavenRepositoryRoot);
|
|
||||||
+ public TargetPlatformBundlePublisher(File localMavenRepositoryRoot, MavenLogger logger,
|
|
||||||
+ MavenRepositorySystem repositorySystem) {
|
|
||||||
+ this.publishedArtifacts = new PublishedBundlesArtifactRepository(localMavenRepositoryRoot, repositorySystem);
|
|
||||||
this.logger = logger;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -204,8 +206,11 @@ public class TargetPlatformBundlePublisher {
|
|
||||||
*/
|
|
||||||
private static class PublishedBundlesArtifactRepository extends ArtifactRepositoryBaseImpl<GAVArtifactDescriptor> {
|
|
||||||
|
|
||||||
- PublishedBundlesArtifactRepository(File localMavenRepositoryRoot) {
|
|
||||||
+ private MavenRepositorySystem repositorySystem;
|
|
||||||
+
|
|
||||||
+ PublishedBundlesArtifactRepository(File localMavenRepositoryRoot, MavenRepositorySystem repositorySystem) {
|
|
||||||
super(null, localMavenRepositoryRoot.toURI(), ArtifactTransferPolicies.forLocalArtifacts());
|
|
||||||
+ this.repositorySystem = repositorySystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
void addPublishedArtifact(IArtifactDescriptor baseDescriptor, IArtifactFacade mavenArtifact) {
|
|
||||||
@@ -250,7 +255,7 @@ public class TargetPlatformBundlePublisher {
|
|
||||||
@Override
|
|
||||||
protected File internalGetArtifactStorageLocation(IArtifactDescriptor descriptor) {
|
|
||||||
MavenRepositoryCoordinates coord = toInternalDescriptor(descriptor).getMavenCoordinates();
|
|
||||||
- LocalRepositoryReader reader = new LocalRepositoryReader(getBaseDir());
|
|
||||||
+ LocalRepositoryReader reader = new LocalRepositoryReader(getBaseDir(), repositorySystem);
|
|
||||||
return reader.getLocalArtifactLocation(coord.getGav(), coord.getClassifier(), coord.getExtensionOrDefault());
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryP2Indices.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryP2Indices.java
|
|
||||||
index 2122578..5e4a01e 100644
|
|
||||||
--- a/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryP2Indices.java
|
|
||||||
+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.shared/src/main/java/org/eclipse/tycho/p2/repository/LocalRepositoryP2Indices.java
|
|
||||||
@@ -13,6 +13,8 @@ package org.eclipse.tycho.p2.repository;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
|
|
||||||
+import org.eclipse.tycho.core.shared.MavenRepositorySystem;
|
|
||||||
+
|
|
||||||
/**
|
|
||||||
* This service provides access to the tycho p2 index files of the local maven repository.
|
|
||||||
*/
|
|
||||||
@@ -24,4 +26,6 @@ public interface LocalRepositoryP2Indices {
|
|
||||||
|
|
||||||
public File getBasedir();
|
|
||||||
|
|
||||||
+ public MavenRepositorySystem getRepositorySystem();
|
|
||||||
+
|
|
||||||
}
|
|
||||||
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 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;
|
|
||||||
import java.lang.reflect.Constructor;
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
|
|
||||||
+import org.eclipse.tycho.core.shared.MavenRepositorySystem;
|
|
||||||
+
|
|
||||||
public class LocalRepositoryReader implements RepositoryReader {
|
|
||||||
|
|
||||||
private final File localMavenRepositoryRoot;
|
|
||||||
+ private final MavenRepositorySystem repositorySystem;
|
|
||||||
|
|
||||||
- public LocalRepositoryReader(File localMavenRepositoryRoot) {
|
|
||||||
+ public LocalRepositoryReader(File localMavenRepositoryRoot, MavenRepositorySystem repositorySystem) {
|
|
||||||
this.localMavenRepositoryRoot = localMavenRepositoryRoot;
|
|
||||||
+ this.repositorySystem = repositorySystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
|
||||||
public File getLocalArtifactLocation(GAV gav, String classifier, String extension) {
|
|
||||||
- File file = new File(localMavenRepositoryRoot, RepositoryLayoutHelper.getRelativePath(gav, classifier,
|
|
||||||
- extension));
|
|
||||||
- // In Fedora the artifact may be in an XMvn-defined repository location (not in reactor cache)
|
|
||||||
- if (!file.exists()) {
|
|
||||||
- try {
|
|
||||||
- // Create Plexus config
|
|
||||||
- Class pcclazz = Class.forName("org.codehaus.plexus.ContainerConfiguration");
|
|
||||||
- Object conf = Class.forName("org.codehaus.plexus.DefaultContainerConfiguration").newInstance();
|
|
||||||
- pcclazz.getMethod("setAutoWiring", boolean.class).invoke(conf, true);
|
|
||||||
- pcclazz.getMethod("setClassPathScanning", String.class).invoke(conf, "index");
|
|
||||||
-
|
|
||||||
- // Use plexus container to lookup the reader
|
|
||||||
- Class pclazz = Class.forName("org.codehaus.plexus.DefaultPlexusContainer");
|
|
||||||
- Object plexus = pclazz.getConstructor(pcclazz).newInstance(conf);
|
|
||||||
-
|
|
||||||
- // 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");
|
|
||||||
- Constructor cNew = artclazz.getConstructor(String.class, String.class, String.class, String.class,
|
|
||||||
- String.class);
|
|
||||||
- Object artifact = cNew.newInstance(gav.getGroupId(), gav.getArtifactId(), classifier, extension,
|
|
||||||
- gav.getVersion());
|
|
||||||
-
|
|
||||||
- // Invoke "findArtifact" method of the workspace reader on the artifact
|
|
||||||
- Method mfindArtifact = reader.getClass().getMethod("findArtifact", iartclazz);
|
|
||||||
- File newFile = (File) mfindArtifact.invoke(reader, artifact);
|
|
||||||
- if (newFile != null) {
|
|
||||||
- file = newFile;
|
|
||||||
- }
|
|
||||||
- } catch (Exception e) {
|
|
||||||
- e.printStackTrace();
|
|
||||||
+ File ret = new File(localMavenRepositoryRoot, RepositoryLayoutHelper.getRelativePath(gav, classifier, extension));
|
|
||||||
+ if (repositorySystem != null) {
|
|
||||||
+ File tmp = repositorySystem.resolve(gav.getGroupId(), gav.getArtifactId(), gav.getVersion(), extension, classifier);
|
|
||||||
+ if (tmp != null) {
|
|
||||||
+ ret = tmp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- return file;
|
|
||||||
-
|
|
||||||
+ return ret;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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 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;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
|
|
||||||
+import org.eclipse.tycho.core.shared.MavenRepositorySystem;
|
|
||||||
import org.eclipse.tycho.p2.repository.LocalRepositoryP2Indices;
|
|
||||||
import org.eclipse.tycho.repository.local.LocalArtifactRepository;
|
|
||||||
import org.eclipse.tycho.repository.local.index.LocalRepositoryP2IndicesImpl;
|
|
||||||
+import org.eclipse.tycho.test.util.MavenRepositorySystemStub;
|
|
||||||
import org.eclipse.tycho.test.util.NoopFileLockService;
|
|
||||||
import org.junit.Rule;
|
|
||||||
import org.junit.rules.ExternalResource;
|
|
||||||
@@ -72,7 +74,7 @@ public class TemporaryLocalMavenRepository extends ExternalResource {
|
|
||||||
|
|
||||||
public LocalArtifactRepository getLocalArtifactRepository() {
|
|
||||||
if (repo == null) {
|
|
||||||
- repo = new LocalArtifactRepository(null, getLocalRepositoryIndex());
|
|
||||||
+ repo = new LocalArtifactRepository(null, getLocalRepositoryIndex(), new MavenRepositorySystemStub(getLocalRepositoryRoot()));
|
|
||||||
}
|
|
||||||
return repo;
|
|
||||||
}
|
|
||||||
diff --git a/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/MavenRepositorySystemStub.java b/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/MavenRepositorySystemStub.java
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..7e020da
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/MavenRepositorySystemStub.java
|
|
||||||
@@ -0,0 +1,30 @@
|
|
||||||
+/*******************************************************************************
|
|
||||||
+ * Copyright (c) 2014 Red Hat Inc.
|
|
||||||
+ * 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
|
|
||||||
+ * http://www.eclipse.org/legal/epl-v10.html
|
|
||||||
+ *
|
|
||||||
+ * Contributors:
|
|
||||||
+ * Red Hat Inc. - initial API and implementation
|
|
||||||
+ *******************************************************************************/
|
|
||||||
+package org.eclipse.tycho.test.util;
|
|
||||||
+
|
|
||||||
+import java.io.File;
|
|
||||||
+
|
|
||||||
+import org.eclipse.tycho.core.shared.MavenRepositorySystem;
|
|
||||||
+import org.eclipse.tycho.p2.repository.RepositoryLayoutHelper;
|
|
||||||
+
|
|
||||||
+public class MavenRepositorySystemStub implements MavenRepositorySystem {
|
|
||||||
+
|
|
||||||
+ private File localMavenRepositoryRoot;
|
|
||||||
+
|
|
||||||
+ public MavenRepositorySystemStub(File localMavenRepositoryRoot) {
|
|
||||||
+ this.localMavenRepositoryRoot = localMavenRepositoryRoot;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ public File resolve(String gid, String aid, String version, String type, String classifier) {
|
|
||||||
+ return new File(localMavenRepositoryRoot, RepositoryLayoutHelper.getRelativePath(gid, aid, version, classifier,
|
|
||||||
+ type));
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
diff --git a/tycho-core/src/main/java/org/eclipse/tycho/osgi/adapters/MavenRepositorySystemAdapter.java b/tycho-core/src/main/java/org/eclipse/tycho/osgi/adapters/MavenRepositorySystemAdapter.java
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..e1d46fa
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/tycho-core/src/main/java/org/eclipse/tycho/osgi/adapters/MavenRepositorySystemAdapter.java
|
|
||||||
@@ -0,0 +1,37 @@
|
|
||||||
+/*******************************************************************************
|
|
||||||
+ * Copyright (c) 2014 Red Hat Inc.
|
|
||||||
+ * 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
|
|
||||||
+ * http://www.eclipse.org/legal/epl-v10.html
|
|
||||||
+ *
|
|
||||||
+ * Contributors:
|
|
||||||
+ * Red Hat Inc. - initial API and implementation
|
|
||||||
+ *******************************************************************************/
|
|
||||||
+package org.eclipse.tycho.osgi.adapters;
|
|
||||||
+
|
|
||||||
+import java.io.File;
|
|
||||||
+
|
|
||||||
+import org.apache.maven.artifact.Artifact;
|
|
||||||
+import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
|
|
||||||
+import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
|
|
||||||
+import org.apache.maven.repository.RepositorySystem;
|
|
||||||
+import org.eclipse.tycho.core.shared.MavenRepositorySystem;
|
|
||||||
+
|
|
||||||
+public class MavenRepositorySystemAdapter implements MavenRepositorySystem {
|
|
||||||
+
|
|
||||||
+ private RepositorySystem repoSystem;
|
|
||||||
+
|
|
||||||
+ public MavenRepositorySystemAdapter(RepositorySystem repoSystem) {
|
|
||||||
+ this.repoSystem = repoSystem;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ public File resolve(String gid, String aid, String version, String type, String classifier) {
|
|
||||||
+ ArtifactResolutionRequest req = new ArtifactResolutionRequest();
|
|
||||||
+ Artifact art = repoSystem.createArtifactWithClassifier(gid, aid, version, type, classifier);
|
|
||||||
+ req.setArtifact(art);
|
|
||||||
+ ArtifactResolutionResult res = repoSystem.resolve(req);
|
|
||||||
+ return res.getArtifacts().size() > 0 ? res.getArtifacts().toArray(new Artifact[0])[0].getFile() : null;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+}
|
|
||||||
diff --git a/tycho-core/src/main/java/org/eclipse/tycho/osgi/configuration/MavenContextConfigurator.java b/tycho-core/src/main/java/org/eclipse/tycho/osgi/configuration/MavenContextConfigurator.java
|
|
||||||
index e5837e2..137dcb1 100644
|
|
||||||
--- a/tycho-core/src/main/java/org/eclipse/tycho/osgi/configuration/MavenContextConfigurator.java
|
|
||||||
+++ b/tycho-core/src/main/java/org/eclipse/tycho/osgi/configuration/MavenContextConfigurator.java
|
|
||||||
@@ -16,6 +16,7 @@ import java.util.Properties;
|
|
||||||
|
|
||||||
import org.apache.maven.execution.MavenSession;
|
|
||||||
import org.apache.maven.plugin.LegacySupport;
|
|
||||||
+import org.apache.maven.repository.RepositorySystem;
|
|
||||||
import org.apache.maven.settings.Profile;
|
|
||||||
import org.apache.maven.settings.Settings;
|
|
||||||
import org.codehaus.plexus.component.annotations.Component;
|
|
||||||
@@ -26,6 +27,7 @@ import org.eclipse.sisu.equinox.embedder.EquinoxLifecycleListener;
|
|
||||||
import org.eclipse.tycho.core.shared.MavenContext;
|
|
||||||
import org.eclipse.tycho.core.shared.MavenContextImpl;
|
|
||||||
import org.eclipse.tycho.osgi.adapters.MavenLoggerAdapter;
|
|
||||||
+import org.eclipse.tycho.osgi.adapters.MavenRepositorySystemAdapter;
|
|
||||||
|
|
||||||
@Component(role = EquinoxLifecycleListener.class, hint = "MavenContextConfigurator")
|
|
||||||
public class MavenContextConfigurator extends EquinoxLifecycleListener {
|
|
||||||
@@ -36,13 +38,17 @@ public class MavenContextConfigurator extends EquinoxLifecycleListener {
|
|
||||||
@Requirement
|
|
||||||
private LegacySupport context;
|
|
||||||
|
|
||||||
+ @Requirement
|
|
||||||
+ private RepositorySystem repositorySystem;
|
|
||||||
+
|
|
||||||
@Override
|
|
||||||
public void afterFrameworkStarted(EmbeddedEquinox framework) {
|
|
||||||
MavenSession session = context.getSession();
|
|
||||||
File localRepoRoot = new File(session.getLocalRepository().getBasedir());
|
|
||||||
MavenLoggerAdapter mavenLogger = new MavenLoggerAdapter(logger, false);
|
|
||||||
Properties globalProps = getGlobalProperties(session);
|
|
||||||
- MavenContext mavenContext = new MavenContextImpl(localRepoRoot, session.isOffline(), mavenLogger, globalProps);
|
|
||||||
+ MavenContext mavenContext = new MavenContextImpl(localRepoRoot, session.isOffline(), mavenLogger, globalProps,
|
|
||||||
+ new MavenRepositorySystemAdapter(repositorySystem));
|
|
||||||
framework.registerService(MavenContext.class, mavenContext);
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.20.1
|
|
||||||
|
|
||||||
@ -1,41 +0,0 @@
|
|||||||
From fc41eb3f0b84a76bcd7e5b17246165f4df02edd6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: chen-jan <chen_aka_jan@163.com>
|
|
||||||
Date: Fri, 6 May 2022 08:20:09 +0000
|
|
||||||
Subject: [PATCH] tweaking the products to use httpclient45 feature
|
|
||||||
|
|
||||||
---
|
|
||||||
.../tycho-bundles-external/tycho-bundles-external.product | 3 +--
|
|
||||||
tycho-bundles/tycho-standalone-p2-director/p2 Director.product | 3 +--
|
|
||||||
2 files changed, 2 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product b/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product
|
|
||||||
index 182122d..57c1213 100644
|
|
||||||
--- a/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product
|
|
||||||
+++ b/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product
|
|
||||||
@@ -37,8 +37,7 @@
|
|
||||||
<plugin id="org.eclipse.ecf.filetransfer"/>
|
|
||||||
<plugin id="org.eclipse.ecf.identity"/>
|
|
||||||
<plugin id="org.eclipse.ecf.provider.filetransfer"/>
|
|
||||||
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient4"/>
|
|
||||||
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient4.ssl" fragment="true"/>
|
|
||||||
+ <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient45"/>
|
|
||||||
<plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
|
|
||||||
<plugin id="org.eclipse.ecf.ssl" fragment="true"/>
|
|
||||||
<plugin id="org.eclipse.equinox.app"/>
|
|
||||||
diff --git a/tycho-bundles/tycho-standalone-p2-director/p2 Director.product b/tycho-bundles/tycho-standalone-p2-director/p2 Director.product
|
|
||||||
index 9cf5ed2..78f9b25 100644
|
|
||||||
--- a/tycho-bundles/tycho-standalone-p2-director/p2 Director.product
|
|
||||||
+++ b/tycho-bundles/tycho-standalone-p2-director/p2 Director.product
|
|
||||||
@@ -37,8 +37,7 @@
|
|
||||||
<plugin id="org.eclipse.ecf.filetransfer"/>
|
|
||||||
<plugin id="org.eclipse.ecf.identity"/>
|
|
||||||
<plugin id="org.eclipse.ecf.provider.filetransfer"/>
|
|
||||||
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient4"/>
|
|
||||||
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient4.ssl" fragment="true"/>
|
|
||||||
+ <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient45"/>
|
|
||||||
<plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
|
|
||||||
<plugin id="org.eclipse.ecf.ssl" fragment="true"/>
|
|
||||||
<plugin id="org.eclipse.equinox.app"/>
|
|
||||||
--
|
|
||||||
2.30.0
|
|
||||||
|
|
||||||
39
tycho.spec
39
tycho.spec
@ -8,7 +8,7 @@
|
|||||||
%define __requires_exclude osgi*
|
%define __requires_exclude osgi*
|
||||||
Name: tycho
|
Name: tycho
|
||||||
Version: 1.3.0
|
Version: 1.3.0
|
||||||
Release: 6
|
Release: 1
|
||||||
Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven
|
Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven
|
||||||
License: ASL 2.0 and EPL-1.0
|
License: ASL 2.0 and EPL-1.0
|
||||||
URL: http://eclipse.org/tycho
|
URL: http://eclipse.org/tycho
|
||||||
@ -27,11 +27,6 @@ Patch0: 0001-Bug-537963-Make-the-default-EE-Java-1.8.patch
|
|||||||
Patch1: 0002-Bug-543850-Update-artifactcomparator-asm-dep-to-7.0.patch
|
Patch1: 0002-Bug-543850-Update-artifactcomparator-asm-dep-to-7.0.patch
|
||||||
# Port to latest version of Mockito 2.x
|
# Port to latest version of Mockito 2.x
|
||||||
Patch2: 0003-Port-to-latest-versio-of-Mockito.patch
|
Patch2: 0003-Port-to-latest-versio-of-Mockito.patch
|
||||||
Patch3: 0004-Implement-a-custom-resolver-for-Tycho-in-local-mode.patch
|
|
||||||
Patch4: 0005-Fix-build-fail.patch
|
|
||||||
Patch5: 0006-Tycho-should-always-delegate-artifact-resolution-to-.patch
|
|
||||||
#Patch from: https://git.eclipse.org/c/tycho/org.eclipse.tychogit/commit/?id=43a0e167e39ffaafa5c0e70fbc0ea0b87828f1b3
|
|
||||||
Patch6: tweaking-the-products-to-use-httpclient45-feature.patch
|
|
||||||
# Upstream Eclipse no longer supports non-64bit arches
|
# Upstream Eclipse no longer supports non-64bit arches
|
||||||
ExcludeArch: s390 %{arm} %{ix86}
|
ExcludeArch: s390 %{arm} %{ix86}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -63,7 +58,6 @@ BuildRequires: mvn(org.fedoraproject.xmvn:xmvn-install)
|
|||||||
BuildRequires: mvn(org.fedoraproject.xmvn:xmvn-parent:pom:) mvn(org.hamcrest:hamcrest-core)
|
BuildRequires: mvn(org.fedoraproject.xmvn:xmvn-parent:pom:) mvn(org.hamcrest:hamcrest-core)
|
||||||
BuildRequires: mvn(org.mockito:mockito-core) mvn(org.ow2.asm:asm-tree)
|
BuildRequires: mvn(org.mockito:mockito-core) mvn(org.ow2.asm:asm-tree)
|
||||||
BuildRequires: mvn(org.ow2.asm:asm-util) mvn(org.slf4j:slf4j-api) mvn(org.slf4j:slf4j-simple)
|
BuildRequires: mvn(org.ow2.asm:asm-util) mvn(org.slf4j:slf4j-api) mvn(org.slf4j:slf4j-simple)
|
||||||
BuildRequires: jetty-servlet jetty-server jetty-security
|
|
||||||
%if %{with junit5}
|
%if %{with junit5}
|
||||||
BuildRequires: mvn(org.apache.maven.surefire:surefire-junit-platform)
|
BuildRequires: mvn(org.apache.maven.surefire:surefire-junit-platform)
|
||||||
BuildRequires: mvn(org.apiguardian:apiguardian-api) mvn(org.opentest4j:opentest4j)
|
BuildRequires: mvn(org.apiguardian:apiguardian-api) mvn(org.opentest4j:opentest4j)
|
||||||
@ -115,10 +109,6 @@ mv fedoraproject-p2-%{fp_p2_git_tag} fedoraproject-p2
|
|||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
%patch5 -p1
|
|
||||||
%patch6 -p1
|
|
||||||
%pom_remove_plugin :maven-site-plugin
|
%pom_remove_plugin :maven-site-plugin
|
||||||
%if %{without junit5}
|
%if %{without junit5}
|
||||||
%pom_disable_module org.eclipse.tycho.surefire.junit5 tycho-surefire
|
%pom_disable_module org.eclipse.tycho.surefire.junit5 tycho-surefire
|
||||||
@ -130,16 +120,20 @@ sed -i 's/public int getPriority/public float getPriority/g' tycho-core/src/main
|
|||||||
mkdir -p tycho-maven-plugin/src/main/java/org/fedoraproject
|
mkdir -p tycho-maven-plugin/src/main/java/org/fedoraproject
|
||||||
sed -i '/^<unit id=.*$/d' tycho-bundles/tycho-bundles-target/tycho-bundles-target.target
|
sed -i '/^<unit id=.*$/d' tycho-bundles/tycho-bundles-target/tycho-bundles-target.target
|
||||||
%pom_xpath_remove "pom:dependency[pom:classifier='sources' and pom:artifactId='commons-compress']" tycho-p2/tycho-p2-director-plugin
|
%pom_xpath_remove "pom:dependency[pom:classifier='sources' and pom:artifactId='commons-compress']" tycho-p2/tycho-p2-director-plugin
|
||||||
sed -i '/org.hamcrest.core,/d' fedoraproject-p2/org.fedoraproject.p2.tests/META-INF/MANIFEST.MF
|
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
|
||||||
sed -i -e '/tycho-testing-harness/a<version>${project.version}</version>' tycho-surefire/tycho-surefire-plugin/pom.xml
|
sed -i -e '/tycho-testing-harness/a<version>${project.version}</version>' tycho-surefire/tycho-surefire-plugin/pom.xml
|
||||||
|
%if %{with bootstrap}
|
||||||
|
%pom_xpath_remove "pom:compilerId" tycho-lib-detector
|
||||||
|
%pom_remove_dep "org.eclipse.tycho:tycho-compiler-jdt" tycho-lib-detector
|
||||||
for b in core.shared.tests p2.resolver.impl.test p2.resolver.shared.tests p2.maven.repository.tests p2.tools.tests test.utils ; do
|
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
|
%pom_disable_module org.eclipse.tycho.$b tycho-bundles
|
||||||
done
|
done
|
||||||
%pom_disable_module org.fedoraproject.p2.tests fedoraproject-p2
|
%pom_disable_module org.fedoraproject.p2.tests fedoraproject-p2
|
||||||
%pom_remove_dep -r :::test
|
%pom_remove_dep -r :::test
|
||||||
%if %{with bootstrap}
|
|
||||||
%pom_xpath_remove "pom:compilerId" tycho-lib-detector
|
|
||||||
%pom_remove_dep "org.eclipse.tycho:tycho-compiler-jdt" tycho-lib-detector
|
|
||||||
tar -xf %{SOURCE10}
|
tar -xf %{SOURCE10}
|
||||||
pushd bootstrap
|
pushd bootstrap
|
||||||
for f in usr/lib/eclipse/plugins/org.eclipse.osgi.compatibility.state_*.jar \
|
for f in usr/lib/eclipse/plugins/org.eclipse.osgi.compatibility.state_*.jar \
|
||||||
@ -255,20 +249,5 @@ ln -s %{_javadir}/tycho/org.fedoraproject.p2.jar %{buildroot}%{xmvn_libdir}/inst
|
|||||||
%files javadoc -f .mfiles-javadoc
|
%files javadoc -f .mfiles-javadoc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sat Oct 07 2023 wangkai <13474090681@163.com> - 1.3.0-6
|
|
||||||
- Fix build error for hamcrest-2.2
|
|
||||||
|
|
||||||
* Wed Aug 3 2022 caodongxia <caodongxia@h-partners.com> - 1.3.0-5
|
|
||||||
- fix selfbuild error
|
|
||||||
|
|
||||||
* Fri May 06 2022 chenchen <chen_aka_jan@163.com> - 1.3.0-4
|
|
||||||
- tweaking the products to use httpclient45 feature
|
|
||||||
|
|
||||||
* Sun Sep 13 2020 yanan li <liyanan032@huawei.com> - 1.3.0-3
|
|
||||||
- fix build fail
|
|
||||||
|
|
||||||
* Sat Sep 05 2020 maminjie <maminjie1@huawei.com> - 1.3.0-2
|
|
||||||
- support local mode
|
|
||||||
|
|
||||||
* Fri Aug 21 2020 maminjie <maminjie1@huawei.com> - 1.3.0-1
|
* Fri Aug 21 2020 maminjie <maminjie1@huawei.com> - 1.3.0-1
|
||||||
- package init
|
- package init
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user