Package org.eclipse.tycho.target
Class TargetPlatformConfigurationMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.eclipse.tycho.target.TargetPlatformConfigurationMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="target-platform-configuration") public class TargetPlatformConfigurationMojo extends org.apache.maven.plugin.AbstractMojo
Configures the target-platform to use in order to resolve dependencies.
⚠️ This mojo is actually not executable, and is only meant to host configuration
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
allowConflictingDependences
private TargetPlatformConfiguration.BREEHeaderSelectionPolicy
breeHeaderSelectionPolicy
private java.lang.Object
dependencyResolution
private TargetEnvironment[]
environments
Target environments (os/ws/arch) to consider.private java.lang.String
executionEnvironment
Force an execution environment for dependency resolution.private java.lang.String
executionEnvironmentDefault
private java.util.List<?>
filters
private boolean
includePackedArtifacts
private TargetPlatformConfiguration.PomDependencies
pomDependencies
Defines which strategy to apply to Maven dependencies.private java.lang.String
resolver
private boolean
resolveWithExcutionEnvironmentConstraints
private GAV[]
target
List of .target artifacts to use for dependency resolution.
⚠️ Children element must use<artifact>
as tag nameprivate IncludeSourceMode
targetDefinionIncludeSource
-
Constructor Summary
Constructors Constructor Description TargetPlatformConfigurationMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
-
-
-
Field Detail
-
environments
@Parameter(name="environments") private TargetEnvironment[] environments
Target environments (os/ws/arch) to consider.
-
resolver
@Parameter(name="resolver", defaultValue="p2") private java.lang.String resolver
-
target
@Parameter(name="target") private GAV[] target
List of .target artifacts to use for dependency resolution.
⚠️ Children element must use<artifact>
as tag name
-
pomDependencies
@Parameter(name="pomDependencies", defaultValue="ignore") private TargetPlatformConfiguration.PomDependencies pomDependencies
Defines which strategy to apply to Maven dependencies.If
consider
orwrapAsBundle
, the effect is:- First, Maven resolves the GAV dependencies according to the normal Maven rules. This results in a list of artifacts consisting of the specified artifacts and their transitive Maven dependencies.
- Tycho then checks each of these artifacts, and if the artifact is an OSGi bundle, it is
added to the target platform. Other artifacts are ignored in case of
consider
, or get some OSGi metadata generated and an OSGi bundle created from them. - OSGi bundles which become part of the target platform in this way are then available to resolve the project's OSGi dependencies.
📝 Tycho always attempts to resolve transitive dependencies, so if you need a POM dependency in the target platform of one module, you will also need it in all downstream modules. Therefore the POM dependencies (and the pomDependencies=consider configuration) typically need to be added in the parent POM.
-
allowConflictingDependences
@Parameter(name="allowConflictingDependencies", defaultValue="false") private boolean allowConflictingDependences
-
executionEnvironment
@Parameter(name="executionEnvironment") private java.lang.String executionEnvironment
Force an execution environment for dependency resolution. If unset, the firsttargetJRE
available intarget
is used.Set to
none
to force the resolution to happen without any execution environment, typically when the module is supposed to use system packages coming from some dependencies (eg shipping a JRE inside products with Eclipse JustJ).
-
executionEnvironmentDefault
@Parameter(name="executionEnvironmentDefault") private java.lang.String executionEnvironmentDefault
-
breeHeaderSelectionPolicy
@Parameter(name="breeHeaderSelectionPolicy") private TargetPlatformConfiguration.BREEHeaderSelectionPolicy breeHeaderSelectionPolicy
-
resolveWithExcutionEnvironmentConstraints
@Parameter(name="resolveWithExecutionEnvironmentConstraints", defaultValue="true") private boolean resolveWithExcutionEnvironmentConstraints
-
filters
@Parameter(name="filters") private java.util.List<?> filters
-
dependencyResolution
@Parameter(name="dependency-resolution") private java.lang.Object dependencyResolution
-
includePackedArtifacts
@Parameter(name="includePackedArtifacts") private boolean includePackedArtifacts
-
targetDefinionIncludeSource
@Parameter(name="targetDefinitionIncludeSource") private IncludeSourceMode targetDefinionIncludeSource
-
-