Class 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 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 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.

      • 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 first targetJRE available in target 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
      • 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
    • Constructor Detail

      • TargetPlatformConfigurationMojo

        public TargetPlatformConfigurationMojo()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException,
                            org.apache.maven.plugin.MojoFailureException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException