From 0d62d2222df8b4af2c1ae481d45aae61ef8f94f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20L=C3=A4ubrich?= Date: Mon, 5 Feb 2024 18:59:49 +0100 Subject: [PATCH] Use imported BundlesAction where possible --- .../org/eclipse/tycho/p2maven/InstallableUnitGenerator.java | 2 +- .../tycho/p2maven/MavenProjectDependencyProcessor.java | 2 +- .../tycho/p2maven/actions/BundleDependenciesAction.java | 2 +- .../tools/TychoFeaturesAndBundlesPublisherApplication.java | 2 +- .../TargetPlatformConfigurationInstallableUnitProvider.java | 2 +- .../java/org/eclipse/tycho/core/TychoProjectManager.java | 3 ++- .../org/eclipse/tycho/core/bnd/TargetPlatformRepository.java | 2 +- .../AdditionalBundleRequirementsInstallableUnitProvider.java | 2 +- .../tycho/core/resolver/MavenTargetDefinitionContent.java | 2 +- .../tycho/core/resolver/target/ArtifactTypeHelper.java | 2 +- .../core/resolver/target/TargetPlatformFilterEvaluator.java | 2 +- .../tycho/osgi/resource/InstallableUnitCapability.java | 2 +- .../tycho/osgi/resource/InstallableUnitRequirement.java | 2 +- .../eclipse/tycho/p2/publisher/BundleDependenciesAction.java | 2 +- .../java/org/eclipse/tycho/p2/resolver/BundlePublisher.java | 2 +- .../java/org/eclipse/tycho/p2/resolver/FeatureGenerator.java | 2 +- .../tycho/p2/resolver/FileTargetDefinitionContent.java | 2 +- .../director/shared/AbstractDirectorApplicationCommand.java | 5 +++-- .../eclipse/tycho/p2resolver/AbstractResolutionStrategy.java | 3 ++- .../java/org/eclipse/tycho/p2resolver/P2GeneratorImpl.java | 2 +- .../org/eclipse/tycho/p2resolver/P2ResolverFactoryImpl.java | 2 +- .../java/org/eclipse/tycho/p2resolver/P2ResolverImpl.java | 2 +- .../eclipse/tycho/p2resolver/RepositoryLocationContent.java | 2 +- .../p2resolver/SourcesBundleDependencyMetadataGenerator.java | 2 +- .../org/eclipse/tycho/p2resolver/P2GeneratorImplTest.java | 2 +- .../org/eclipse/tycho/test/util/InstallableUnitUtil.java | 2 +- .../eclipsebuild/EclipseBuildInstallableUnitProvider.java | 2 +- .../org/eclipse/tycho/plugins/p2/director/DirectorMojo.java | 3 ++- .../eclipse/tycho/source/SourceInstallableUnitProvider.java | 2 +- .../surefire/bnd/BndTestBundlesInstallableUnitProvider.java | 2 +- .../eclipse/tycho/surefire/bnd/TargetPlatformRepository.java | 2 +- 31 files changed, 36 insertions(+), 32 deletions(-) diff --git a/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/InstallableUnitGenerator.java b/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/InstallableUnitGenerator.java index 1be5f3857e..5d89c5edf9 100644 --- a/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/InstallableUnitGenerator.java +++ b/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/InstallableUnitGenerator.java @@ -53,7 +53,6 @@ import org.eclipse.equinox.p2.publisher.IPublisherAction; import org.eclipse.equinox.p2.publisher.IPublisherInfo; import org.eclipse.equinox.p2.publisher.PublisherInfo; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; import org.eclipse.equinox.p2.publisher.eclipse.Feature; import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager; import org.eclipse.osgi.framework.util.CaseInsensitiveDictionaryMap; @@ -67,6 +66,7 @@ import org.eclipse.tycho.p2maven.actions.ProductDependenciesAction; import org.eclipse.tycho.p2maven.actions.ProductFile2; import org.eclipse.tycho.p2maven.io.MetadataIO; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.tycho.resolver.InstallableUnitProvider; import org.osgi.framework.Constants; import org.xml.sax.SAXException; diff --git a/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/MavenProjectDependencyProcessor.java b/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/MavenProjectDependencyProcessor.java index d1000f3c84..c3c3d9dc41 100644 --- a/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/MavenProjectDependencyProcessor.java +++ b/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/MavenProjectDependencyProcessor.java @@ -43,10 +43,10 @@ import org.eclipse.equinox.p2.metadata.IProvidedCapability; import org.eclipse.equinox.p2.metadata.IRequirement; import org.eclipse.equinox.p2.metadata.expression.IMatchExpression; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; import org.eclipse.equinox.p2.query.CollectionResult; import org.eclipse.equinox.p2.query.IQueryable; import org.eclipse.tycho.p2maven.io.MetadataIO; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; /** * THis component computes dependencies between projects diff --git a/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/actions/BundleDependenciesAction.java b/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/actions/BundleDependenciesAction.java index b3af6f4c5e..39ac89161b 100644 --- a/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/actions/BundleDependenciesAction.java +++ b/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/actions/BundleDependenciesAction.java @@ -31,13 +31,13 @@ import org.eclipse.equinox.p2.publisher.AdviceFileParser; import org.eclipse.equinox.p2.publisher.IPublisherInfo; import org.eclipse.equinox.p2.publisher.actions.ICapabilityAdvice; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; import org.eclipse.equinox.spi.p2.publisher.PublisherHelper; import org.eclipse.osgi.service.resolver.BundleDescription; import org.eclipse.osgi.service.resolver.BundleSpecification; import org.eclipse.osgi.service.resolver.ImportPackageSpecification; import org.eclipse.osgi.util.ManifestElement; import org.eclipse.tycho.OptionalResolutionAction; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; public class BundleDependenciesAction extends BundlesAction { diff --git a/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/tools/TychoFeaturesAndBundlesPublisherApplication.java b/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/tools/TychoFeaturesAndBundlesPublisherApplication.java index e0cd1dd752..9b02ae0665 100644 --- a/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/tools/TychoFeaturesAndBundlesPublisherApplication.java +++ b/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/tools/TychoFeaturesAndBundlesPublisherApplication.java @@ -46,13 +46,13 @@ import org.eclipse.equinox.p2.publisher.IPublisherInfo; import org.eclipse.equinox.p2.publisher.IPublisherResult; import org.eclipse.equinox.p2.publisher.PublisherInfo; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; import org.eclipse.equinox.p2.repository.IRepositoryManager; import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor; import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor; import org.eclipse.equinox.spi.p2.publisher.PublisherHelper; import org.eclipse.osgi.service.resolver.BundleDescription; import org.eclipse.tycho.p2maven.advices.PGPSignatureAdvice; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.osgi.framework.BundleException; public class TychoFeaturesAndBundlesPublisherApplication extends AbstractPublisherApplication { diff --git a/target-platform-configuration/src/main/java/org/eclipse/tycho/target/TargetPlatformConfigurationInstallableUnitProvider.java b/target-platform-configuration/src/main/java/org/eclipse/tycho/target/TargetPlatformConfigurationInstallableUnitProvider.java index 87d6c83242..db8720fd9d 100644 --- a/target-platform-configuration/src/main/java/org/eclipse/tycho/target/TargetPlatformConfigurationInstallableUnitProvider.java +++ b/target-platform-configuration/src/main/java/org/eclipse/tycho/target/TargetPlatformConfigurationInstallableUnitProvider.java @@ -31,12 +31,12 @@ import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription; import org.eclipse.equinox.p2.metadata.Version; import org.eclipse.equinox.p2.metadata.VersionRange; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; import org.eclipse.tycho.ArtifactType; import org.eclipse.tycho.core.TargetPlatformConfiguration; import org.eclipse.tycho.core.TychoProject; import org.eclipse.tycho.core.TychoProjectManager; import org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.tycho.resolver.InstallableUnitProvider; /** diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/TychoProjectManager.java b/tycho-core/src/main/java/org/eclipse/tycho/core/TychoProjectManager.java index 7ef1c54697..821c5db45a 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/core/TychoProjectManager.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/core/TychoProjectManager.java @@ -62,6 +62,7 @@ import org.eclipse.tycho.core.resolver.shared.IncludeSourceMode; import org.eclipse.tycho.helper.PluginRealmHelper; import org.eclipse.tycho.model.project.EclipseProject; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.tycho.targetplatform.TargetDefinition; import org.osgi.framework.Filter; @@ -165,7 +166,7 @@ private Map getProfileProperties(TargetEnvironment environment, properties.put("org.eclipse.update.install.features", "true"); IncludeSourceMode sourceMode = configuration.getTargetDefinitionIncludeSourceMode(); if (sourceMode == IncludeSourceMode.force || sourceMode == IncludeSourceMode.honor) { - properties.put("org.eclipse.update.install.sources", "true"); + properties.put(BundlesAction.FILTER_PROPERTY_INSTALL_SOURCE, "true"); } properties.putAll(configuration.getProfileProperties()); return properties; diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/bnd/TargetPlatformRepository.java b/tycho-core/src/main/java/org/eclipse/tycho/core/bnd/TargetPlatformRepository.java index 0113d99378..ca35c59b80 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/core/bnd/TargetPlatformRepository.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/core/bnd/TargetPlatformRepository.java @@ -26,13 +26,13 @@ import org.codehaus.plexus.component.annotations.Requirement; import org.eclipse.equinox.p2.metadata.IArtifactKey; import org.eclipse.equinox.p2.metadata.IInstallableUnit; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; import org.eclipse.equinox.p2.query.IQueryResult; import org.eclipse.equinox.p2.query.QueryUtil; import org.eclipse.tycho.ArtifactKey; import org.eclipse.tycho.ArtifactType; import org.eclipse.tycho.TargetPlatform; import org.eclipse.tycho.TargetPlatformService; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import aQute.bnd.osgi.Instruction; import aQute.bnd.service.RepositoryPlugin; diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/AdditionalBundleRequirementsInstallableUnitProvider.java b/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/AdditionalBundleRequirementsInstallableUnitProvider.java index 187d8991ac..72303cf79d 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/AdditionalBundleRequirementsInstallableUnitProvider.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/AdditionalBundleRequirementsInstallableUnitProvider.java @@ -29,12 +29,12 @@ import org.eclipse.equinox.p2.metadata.IRequirement; import org.eclipse.equinox.p2.metadata.MetadataFactory; import org.eclipse.equinox.p2.metadata.VersionRange; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; import org.eclipse.tycho.BuildProperties; import org.eclipse.tycho.BuildPropertiesParser; import org.eclipse.tycho.ReactorProject; import org.eclipse.tycho.core.TychoProjectManager; import org.eclipse.tycho.core.osgitools.DefaultReactorProject; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.tycho.resolver.InstallableUnitProvider; import aQute.bnd.osgi.Constants; diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/MavenTargetDefinitionContent.java b/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/MavenTargetDefinitionContent.java index 3427c5f389..f55683c304 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/MavenTargetDefinitionContent.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/MavenTargetDefinitionContent.java @@ -57,7 +57,6 @@ import org.eclipse.equinox.p2.publisher.IPublisherInfo; import org.eclipse.equinox.p2.publisher.PublisherInfo; import org.eclipse.equinox.p2.publisher.actions.IPropertyAdvice; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; import org.eclipse.equinox.p2.publisher.eclipse.Feature; import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor; import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository; @@ -85,6 +84,7 @@ import org.eclipse.tycho.p2.resolver.WrappedArtifact; import org.eclipse.tycho.p2maven.advices.MavenChecksumAdvice; import org.eclipse.tycho.p2maven.advices.MavenPropertiesAdvice; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.tycho.targetplatform.TargetDefinition.BNDInstructions; import org.eclipse.tycho.targetplatform.TargetDefinition.MavenDependency; import org.eclipse.tycho.targetplatform.TargetDefinition.MavenGAVLocation; diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/target/ArtifactTypeHelper.java b/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/target/ArtifactTypeHelper.java index 5742b32f6e..a95f1ba7b3 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/target/ArtifactTypeHelper.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/target/ArtifactTypeHelper.java @@ -24,7 +24,7 @@ import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription; import org.eclipse.equinox.p2.metadata.Version; import org.eclipse.equinox.p2.metadata.VersionRange; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.equinox.p2.query.IQuery; import org.eclipse.equinox.p2.query.QueryUtil; import org.eclipse.equinox.spi.p2.publisher.PublisherHelper; diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/target/TargetPlatformFilterEvaluator.java b/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/target/TargetPlatformFilterEvaluator.java index 70437f18e3..aeb107b822 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/target/TargetPlatformFilterEvaluator.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/target/TargetPlatformFilterEvaluator.java @@ -22,7 +22,7 @@ import org.eclipse.equinox.p2.metadata.IProvidedCapability; import org.eclipse.equinox.p2.metadata.Version; import org.eclipse.equinox.p2.metadata.VersionRange; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.equinox.spi.p2.publisher.PublisherHelper; import org.eclipse.tycho.core.shared.MavenLogger; import org.eclipse.tycho.targetplatform.TargetPlatformFilter; diff --git a/tycho-core/src/main/java/org/eclipse/tycho/osgi/resource/InstallableUnitCapability.java b/tycho-core/src/main/java/org/eclipse/tycho/osgi/resource/InstallableUnitCapability.java index cccd1e42b6..9625841230 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/osgi/resource/InstallableUnitCapability.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/osgi/resource/InstallableUnitCapability.java @@ -18,7 +18,7 @@ import org.eclipse.equinox.p2.metadata.IInstallableUnit; import org.eclipse.equinox.p2.metadata.IProvidedCapability; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.equinox.spi.p2.publisher.PublisherHelper; import org.osgi.framework.Version; import org.osgi.framework.namespace.BundleNamespace; diff --git a/tycho-core/src/main/java/org/eclipse/tycho/osgi/resource/InstallableUnitRequirement.java b/tycho-core/src/main/java/org/eclipse/tycho/osgi/resource/InstallableUnitRequirement.java index 782fce6f05..fe175a9a0a 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/osgi/resource/InstallableUnitRequirement.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/osgi/resource/InstallableUnitRequirement.java @@ -21,7 +21,7 @@ import org.eclipse.equinox.p2.metadata.Version; import org.eclipse.equinox.p2.metadata.VersionRange; import org.eclipse.equinox.p2.metadata.expression.IMatchExpression; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.equinox.spi.p2.publisher.PublisherHelper; import org.osgi.framework.namespace.BundleNamespace; import org.osgi.framework.namespace.PackageNamespace; diff --git a/tycho-core/src/main/java/org/eclipse/tycho/p2/publisher/BundleDependenciesAction.java b/tycho-core/src/main/java/org/eclipse/tycho/p2/publisher/BundleDependenciesAction.java index baee6d14e9..0c649044de 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/p2/publisher/BundleDependenciesAction.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/p2/publisher/BundleDependenciesAction.java @@ -32,7 +32,7 @@ import org.eclipse.equinox.p2.publisher.AdviceFileParser; import org.eclipse.equinox.p2.publisher.IPublisherInfo; import org.eclipse.equinox.p2.publisher.actions.ICapabilityAdvice; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.equinox.spi.p2.publisher.PublisherHelper; import org.eclipse.osgi.service.resolver.BundleDescription; import org.eclipse.osgi.service.resolver.BundleSpecification; diff --git a/tycho-core/src/main/java/org/eclipse/tycho/p2/resolver/BundlePublisher.java b/tycho-core/src/main/java/org/eclipse/tycho/p2/resolver/BundlePublisher.java index 5880bddbde..14610aab4a 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/p2/resolver/BundlePublisher.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/p2/resolver/BundlePublisher.java @@ -33,7 +33,7 @@ import org.eclipse.equinox.p2.publisher.Publisher; import org.eclipse.equinox.p2.publisher.PublisherInfo; import org.eclipse.equinox.p2.publisher.actions.IPropertyAdvice; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor; import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository; import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository; diff --git a/tycho-core/src/main/java/org/eclipse/tycho/p2/resolver/FeatureGenerator.java b/tycho-core/src/main/java/org/eclipse/tycho/p2/resolver/FeatureGenerator.java index 4e14fc0695..b9a0c459cf 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/p2/resolver/FeatureGenerator.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/p2/resolver/FeatureGenerator.java @@ -45,7 +45,7 @@ import org.eclipse.equinox.p2.metadata.IInstallableUnit; import org.eclipse.equinox.p2.metadata.IVersionedId; import org.eclipse.equinox.p2.metadata.VersionedId; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.equinox.p2.publisher.eclipse.Feature; import org.eclipse.tycho.core.MavenModelFacade; import org.eclipse.tycho.core.MavenModelFacade.MavenLicense; diff --git a/tycho-core/src/main/java/org/eclipse/tycho/p2/resolver/FileTargetDefinitionContent.java b/tycho-core/src/main/java/org/eclipse/tycho/p2/resolver/FileTargetDefinitionContent.java index 35e4054c02..91421cb09b 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/p2/resolver/FileTargetDefinitionContent.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/p2/resolver/FileTargetDefinitionContent.java @@ -27,7 +27,7 @@ import org.eclipse.equinox.p2.metadata.IInstallableUnit; import org.eclipse.equinox.p2.publisher.IPublisherInfo; import org.eclipse.equinox.p2.publisher.PublisherInfo; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.equinox.p2.publisher.eclipse.Feature; import org.eclipse.equinox.p2.query.IQuery; import org.eclipse.equinox.p2.query.IQueryResult; diff --git a/tycho-core/src/main/java/org/eclipse/tycho/p2/tools/director/shared/AbstractDirectorApplicationCommand.java b/tycho-core/src/main/java/org/eclipse/tycho/p2/tools/director/shared/AbstractDirectorApplicationCommand.java index 6d59f72409..1d2acbd372 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/p2/tools/director/shared/AbstractDirectorApplicationCommand.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/p2/tools/director/shared/AbstractDirectorApplicationCommand.java @@ -25,6 +25,7 @@ import org.eclipse.tycho.DependencySeed; import org.eclipse.tycho.TargetEnvironment; import org.eclipse.tycho.p2.CommandLineArguments; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.tycho.p2tools.copiedfromp2.PhaseSetFactory; /** @@ -165,8 +166,8 @@ protected List getDirectorApplicationArguments() { public Map getProfileProperties() { Map props = new TreeMap<>(this.profileProperties); props.put("org.eclipse.update.install.features", Boolean.toString(installFeatures)); - if (installSources && props.get("org.eclipse.update.install.sources") == null) { - props.put("org.eclipse.update.install.sources", "true"); + if (installSources && props.get(BundlesAction.FILTER_PROPERTY_INSTALL_SOURCE) == null) { + props.put(BundlesAction.FILTER_PROPERTY_INSTALL_SOURCE, "true"); } return props; } diff --git a/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/AbstractResolutionStrategy.java b/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/AbstractResolutionStrategy.java index ee2ee3b2ae..00cc30aa05 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/AbstractResolutionStrategy.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/AbstractResolutionStrategy.java @@ -33,6 +33,7 @@ import org.eclipse.tycho.TargetEnvironment; import org.eclipse.tycho.core.shared.MavenLogger; import org.eclipse.tycho.p2.resolver.ResolverException; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; public abstract class AbstractResolutionStrategy { protected static final IInstallableUnit[] EMPTY_IU_ARRAY = new IInstallableUnit[0]; @@ -71,7 +72,7 @@ protected abstract Collection resolve(Map prop private Map getEffectiveFilterProperties(TargetEnvironment environment) { Map result = environment.toFilterProperties(); result.put("org.eclipse.update.install.features", "true"); - result.put("org.eclipse.update.install.sources", "true"); + result.put(BundlesAction.FILTER_PROPERTY_INSTALL_SOURCE, "true"); insertAdditionalFilterProperties(result); return result; } diff --git a/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/P2GeneratorImpl.java b/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/P2GeneratorImpl.java index 4bc5cfa261..7ba3c924d0 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/P2GeneratorImpl.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/P2GeneratorImpl.java @@ -54,7 +54,7 @@ import org.eclipse.equinox.p2.publisher.IPublisherResult; import org.eclipse.equinox.p2.publisher.PublisherInfo; import org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.equinox.p2.publisher.eclipse.Feature; import org.eclipse.equinox.p2.publisher.eclipse.FeaturesAction; import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor; diff --git a/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/P2ResolverFactoryImpl.java b/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/P2ResolverFactoryImpl.java index ae112056b5..89434459ab 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/P2ResolverFactoryImpl.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/P2ResolverFactoryImpl.java @@ -38,7 +38,7 @@ import org.eclipse.equinox.p2.metadata.IInstallableUnit; import org.eclipse.equinox.p2.metadata.IProvidedCapability; import org.eclipse.equinox.p2.metadata.IRequirement; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager; import org.eclipse.tycho.ArtifactDescriptor; import org.eclipse.tycho.IRepositoryIdManager; diff --git a/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/P2ResolverImpl.java b/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/P2ResolverImpl.java index 21db213c82..c1b90daef8 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/P2ResolverImpl.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/P2ResolverImpl.java @@ -41,7 +41,7 @@ import org.eclipse.equinox.p2.metadata.MetadataFactory; import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription; import org.eclipse.equinox.p2.metadata.VersionRange; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.equinox.p2.query.IQuery; import org.eclipse.equinox.p2.query.IQueryResult; import org.eclipse.equinox.p2.query.IQueryable; diff --git a/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/RepositoryLocationContent.java b/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/RepositoryLocationContent.java index ed971f8a90..8a0768ca84 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/RepositoryLocationContent.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/RepositoryLocationContent.java @@ -32,7 +32,7 @@ import org.eclipse.equinox.p2.metadata.IInstallableUnit; import org.eclipse.equinox.p2.publisher.IPublisherInfo; import org.eclipse.equinox.p2.publisher.PublisherInfo; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.equinox.p2.publisher.eclipse.Feature; import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor; import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository; diff --git a/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/SourcesBundleDependencyMetadataGenerator.java b/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/SourcesBundleDependencyMetadataGenerator.java index c4a9defda0..7d9fd7327e 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/SourcesBundleDependencyMetadataGenerator.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/p2resolver/SourcesBundleDependencyMetadataGenerator.java @@ -24,7 +24,7 @@ import org.eclipse.equinox.p2.publisher.IPublisherAdvice; import org.eclipse.equinox.p2.publisher.IPublisherInfo; import org.eclipse.equinox.p2.publisher.PublisherInfo; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.osgi.service.resolver.BundleDescription; import org.eclipse.osgi.service.resolver.StateObjectFactory; import org.eclipse.tycho.BuildPropertiesParser; diff --git a/tycho-core/src/test/java/org/eclipse/tycho/p2resolver/P2GeneratorImplTest.java b/tycho-core/src/test/java/org/eclipse/tycho/p2resolver/P2GeneratorImplTest.java index a7bd17a538..d1dde21b70 100644 --- a/tycho-core/src/test/java/org/eclipse/tycho/p2resolver/P2GeneratorImplTest.java +++ b/tycho-core/src/test/java/org/eclipse/tycho/p2resolver/P2GeneratorImplTest.java @@ -34,7 +34,7 @@ import org.eclipse.equinox.p2.metadata.IRequirement; import org.eclipse.equinox.p2.metadata.ITouchpointData; import org.eclipse.equinox.p2.metadata.Version; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.equinox.spi.p2.publisher.PublisherHelper; import org.eclipse.tycho.OptionalResolutionAction; import org.eclipse.tycho.TargetEnvironment; diff --git a/tycho-core/src/test/java/org/eclipse/tycho/test/util/InstallableUnitUtil.java b/tycho-core/src/test/java/org/eclipse/tycho/test/util/InstallableUnitUtil.java index 9236e3837b..caec2fe134 100644 --- a/tycho-core/src/test/java/org/eclipse/tycho/test/util/InstallableUnitUtil.java +++ b/tycho-core/src/test/java/org/eclipse/tycho/test/util/InstallableUnitUtil.java @@ -26,7 +26,7 @@ import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription; import org.eclipse.equinox.p2.metadata.Version; import org.eclipse.equinox.p2.metadata.VersionRange; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; public class InstallableUnitUtil { diff --git a/tycho-eclipse-plugin/src/main/java/org/eclipse/tycho/eclipsebuild/EclipseBuildInstallableUnitProvider.java b/tycho-eclipse-plugin/src/main/java/org/eclipse/tycho/eclipsebuild/EclipseBuildInstallableUnitProvider.java index f904e5aeec..037eedc360 100644 --- a/tycho-eclipse-plugin/src/main/java/org/eclipse/tycho/eclipsebuild/EclipseBuildInstallableUnitProvider.java +++ b/tycho-eclipse-plugin/src/main/java/org/eclipse/tycho/eclipsebuild/EclipseBuildInstallableUnitProvider.java @@ -24,7 +24,7 @@ import org.eclipse.equinox.p2.metadata.IInstallableUnit; import org.eclipse.equinox.p2.metadata.MetadataFactory; import org.eclipse.equinox.p2.metadata.VersionRange; -import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.tycho.helper.PluginConfigurationHelper; import org.eclipse.tycho.helper.PluginConfigurationHelper.Configuration; import org.eclipse.tycho.resolver.InstallableUnitProvider; diff --git a/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/DirectorMojo.java b/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/DirectorMojo.java index 9a6d98014a..617939ccbf 100644 --- a/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/DirectorMojo.java +++ b/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/DirectorMojo.java @@ -45,6 +45,7 @@ import org.eclipse.tycho.p2.CommandLineArguments; import org.eclipse.tycho.p2.resolver.BundlePublisher; import org.eclipse.tycho.p2.tools.director.shared.DirectorRuntime; +import org.eclipse.tycho.p2maven.tmp.BundlesAction; import org.eclipse.tycho.p2tools.MavenDirectorLog; import org.eclipse.tycho.p2tools.copiedfromp2.DirectorApplication; import org.eclipse.tycho.p2tools.copiedfromp2.PhaseSetFactory; @@ -477,7 +478,7 @@ private Map getPropertyMap(String csvPropertiesMap, Map