target-platform-configuration:target-platform-configuration
Full name:
org.eclipse.tycho:target-platform-configuration:3.0.2:target-platform-configuration
Description:
⚠️ This mojo is actually not executable, and is only meant to host configuration
Attributes:
- Requires a Maven project to be executed.
- The goal is not marked as thread-safe and thus does not support parallel builds.
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<allowConflictingDependencies> |
boolean |
- |
(no description) Default value is: false . |
<breeHeaderSelectionPolicy> |
TargetPlatformConfiguration$BREEHeaderSelectionPolicy |
- |
(no description) |
<dependency-resolution> |
Object |
- |
Configure dependency resolution, for example by adding
requirements. Example:
<plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>target-platform-configuration</artifactId> <configuration> <dependency-resolution> <extraRequirements> <requirement> <type>eclipse-feature</type> <id>example.project.feature</id> <versionRange>0.0.0</versionRange> </requirement> </extraRequirements> </dependency-resolution> </configuration> </plugin> |
<environments> |
TargetEnvironment[] |
- |
Target environments (os/ws/arch) to consider. |
<exclusions> |
List |
- |
Exclusions could be used together with pomDependencies
setting to exclude certain maven dependencies from being
considered. This is useful for example if there is an offending
(transitive) dependency needed for compilation but not for the
runtime that would cause problems otherwise. |
<executionEnvironment> |
String |
- |
Force an execution environment for dependency resolution. If unset,
use the default JRE of your computer.
Set to |
<executionEnvironmentDefault> |
String |
- |
(no description) |
<filters> |
List |
- |
Selectively remove content from the target platform.
This for example allows to restrict the version of a bundle, or to select one particular provider for a package. Filtering is done as last step in the target platform computation, so the filters apply to all sources listed above. The filters will only remove content from the target platform;
they will not add new content. Package provider restrictions work by removing all other bundles exporting the package. This means that these other bundles (and the packages only exported by them) won't be available in your build. Example: <plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>target-platform-configuration</artifactId> <version>${tycho-version}</version> <configuration> <filters> <!-- example 1: restrict version of a bundle --> <filter> <type>eclipse-plugin</type> <id>org.eclipse.osgi</id> <restrictTo> <versionRange>[3.6,3.7)</versionRange> <!-- alternative: <version> for selecting exactly one versions --> </restrictTo> </filter> <!-- example 2: remove all providers of the package javax.persistence except the bundle javax.persistence --> <filter> <type>java-package</type> <id>javax.persistence</id> <restrictTo> <type>eclipse-plugin</type> <id>javax.persistence</id> </restrictTo> </filter> <!-- example 3: work around Equinox bug 348045 --> <filter> <type>p2-installable-unit</type> <id>org.eclipse.equinox.servletbridge.extensionbundle</id> <removeAll /> </filter> </filters> </configuration> </plugin> <pre> |
<pomDependencies> |
PomDependencies |
- |
Defines which strategy to apply to Maven dependencies.
If
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. Default value is: ignore . |
<resolveWithExecutionEnvironmentConstraints> |
boolean |
- |
(no description) Default value is: true . |
<resolver> |
String |
- |
(no description) Default value is: p2 . |
<target> |
Xpp3Dom |
- |
List of .target artifacts to use for dependency resolution. Could either be
|
<targetDefinitionIncludeSource> |
IncludeSourceMode |
- |
(no description) |
Parameter Details
<allowConflictingDependencies>
- Type:
boolean
- Required:
No
- Default:
false
<breeHeaderSelectionPolicy>
- Type:
org.eclipse.tycho.core.TargetPlatformConfiguration$BREEHeaderSelectionPolicy
- Required:
No
<dependency-resolution>
<plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>target-platform-configuration</artifactId> <configuration> <dependency-resolution> <extraRequirements> <requirement> <type>eclipse-feature</type> <id>example.project.feature</id> <versionRange>0.0.0</versionRange> </requirement> </extraRequirements> </dependency-resolution> </configuration> </plugin>
- Type:
java.lang.Object
- Required:
No
<environments>
- Type:
org.eclipse.tycho.TargetEnvironment[]
- Required:
No
<exclusions>
pomDependencies
setting to exclude certain maven dependencies from being
considered. This is useful for example if there is an offending
(transitive) dependency needed for compilation but not for the
runtime that would cause problems otherwise.- Type:
java.util.List
- Required:
No
<executionEnvironment>
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).
- Type:
java.lang.String
- Required:
No
<executionEnvironmentDefault>
- Type:
java.lang.String
- Required:
No
<filters>
This for example allows to restrict the version of a bundle, or to select one particular provider for a package. Filtering is done as last step in the target platform computation, so the filters apply to all sources listed above.
The filters will only remove content from the target platform;
they will not add new content. dependency-resolution
should be used for addition of extra content. If you specify a
restriction that is not fulfilled by any of the units from the
target platform sources, all units that the filter applies to (i.e.
units that match the filter.type, filter.id, and
filter.version/versionRange criteria) will be removed from the
target platform.
Package provider restrictions work by removing all other bundles exporting the package. This means that these other bundles (and the packages only exported by them) won't be available in your build.
Example:
<plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>target-platform-configuration</artifactId> <version>${tycho-version}</version> <configuration> <filters> <!-- example 1: restrict version of a bundle --> <filter> <type>eclipse-plugin</type> <id>org.eclipse.osgi</id> <restrictTo> <versionRange>[3.6,3.7)</versionRange> <!-- alternative: <version> for selecting exactly one versions --> </restrictTo> </filter> <!-- example 2: remove all providers of the package javax.persistence except the bundle javax.persistence --> <filter> <type>java-package</type> <id>javax.persistence</id> <restrictTo> <type>eclipse-plugin</type> <id>javax.persistence</id> </restrictTo> </filter> <!-- example 3: work around Equinox bug 348045 --> <filter> <type>p2-installable-unit</type> <id>org.eclipse.equinox.servletbridge.extensionbundle</id> <removeAll /> </filter> </filters> </configuration> </plugin> <pre>
- Type:
java.util.List
- Required:
No
<pomDependencies>
If consider
or wrapAsBundle
, 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.
- Type:
org.eclipse.tycho.core.resolver.shared.PomDependencies
- Required:
No
- Default:
ignore
<resolveWithExecutionEnvironmentConstraints>
- Type:
boolean
- Required:
No
- Default:
true
<resolver>
- Type:
java.lang.String
- Required:
No
- Default:
p2
<target>
Could either be
<artifact>
to define a target GAV (either local to the reactor or a remote one)<file>
to define a file local to the build<uri>
to define a (remote) URI that specifies a target, currently only URIs that can be converted to URLs are supported (e.g. file:/.... http://..., )
- Type:
org.codehaus.plexus.util.xml.Xpp3Dom
- Required:
No
<targetDefinitionIncludeSource>
- Type:
org.eclipse.tycho.core.resolver.shared.IncludeSourceMode
- Required:
No