tycho-p2-repository:assemble-repository

Full name:

org.eclipse.tycho:tycho-p2-repository-plugin:4.0.9:assemble-repository

Description:

Aggregates content into a p2 repository in ${project.build.directory}/repository.

  1. Copies resources (if any) from ${project.build.outputDirectory} to ${project.build.directory}/repository. This allows to include additional files such as index.html or about files from src/main/resources (or elsewhere) into the p2 repository.
  2. The p2 aggregation into ${project.build.directory}/repository runs recursively: it starts with the content published in the current module, and traverses all artifacts that are marked as included in already aggregated artifacts. (The following artifacts can include other artifacts: categories, products, and features. Note: Dependencies with a strict version range, i.e. a range which only matches exactly one version of an artifact, are also considered as inclusions.)

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Binds by default to the lifecycle phase: package.

Optional Parameters

Name Type Since Description
<addIUTargetRepositoryReferences> boolean - If enabled all P2 repositories referenced in InstallableUnit-type locations of the active target-file are added as referenced repositories.
<addPomRepositoryReferences> boolean - If enabled all P2-repositories referenced in the pom are added as referenced repositories.
<categoriesDirectory> File - The directory where category.xml files are located.

Defaults to the project's base directory.


Default: ${project.basedir}
<compress> boolean -

Compress the repository index files content.xml and artifacts.xml.


Default: true
<createArtifactRepository> boolean -

By default, this goal creates a p2 repository. Set this to false if only a p2 metadata repository (without the artifact files) shall be created.


Default: true
<extraArtifactRepositoryProperties> Map<String,String> - No description.
<filterProvided> boolean - If enabled, units and artifacts that are part of a referenced repository are excluded from the mirror operation. This can be used (together with includeAllDependencies) to build a repository that is both self contained and minimal in regard to the referenced repositories)
Default: false
<generateOSGiRepository> boolean - If enabled, an OSGi Repository is generated out of the content of the P2 repository.
<includeAllDependencies> boolean -

By default, only (transitive) inclusions of the published artifacts are aggregated. Set this parameter to true to aggregate all transitive dependencies, making the resulting p2 repository self-contained.


Default: false
<includeAllSources> boolean -

By default, only explicitly mentioned sources are included. Set this parameter to true to include all sources that are available and included in this repository.


Default: false
<includeRequiredFeatures> boolean -

By default, only included features of a feature are included in the repository, setting this to true will also include features mentioned in the dependencies section.

Important Notes:

Due to current restrictions of P2 requirement model even if this is disabled, features with a strict version range are always included, even if they are part of the dependencies of a feature!

Due to current data structure restrictions of P2 Slicer also transitive dependencies of a feature are included and not only the feature itself!


Default: false
<includeRequiredPlugins> boolean -

By default, only included plugins of a feature are included in the repository, setting this to true will also include plugins mentioned in the dependencies section of a feature

Important Notes:

Due to current restrictions of P2 requirement model even if this is disabled, plugins with a strict version range are always included, even if they are part of the dependencies of a feature!

Due to current data structure restrictions of P2 Slicer also transitive dependencies of a plugin might be included and not only the dependency plugin itself!


Default: false
<keepNonXzIndexFiles> boolean -

If xzCompress is true, whether jar or xml index files should be kept in addition to XZ-compressed index files. This fallback provides backwards compatibility for pre-Mars p2 clients which cannot read XZ-compressed index files.


Default: true
<profileProperties> Map<String,String> -

Additional properties against which p2 filters are evaluated while aggregating.

<qualifier> String - No description.
User Property: buildQualifier
<repositoryFileName> String - Specify the filename of the additionally generated OSGi Repository (if enabled)
Default: repository.xml
<repositoryLocation> File - No description.
User Property: p2.repository.location
<repositoryName> String -

The name attribute stored in the created p2 repository.


Default: ${project.name}
<repositoryReferenceFilter> AssembleRepositoryMojo$RepositoryReferenceFilter - Filters to exclude automatically derived repository references from being added to the assembled repository.

Repository references can be filtered based on their location URI using a list of exclusion pattern:
The location of a reference must not be matched by any pattern, in order to be eventually added to the assembled repository. An arbitrary number of patterns can be specified.

If the sub-property addOnlyProviding is set to true (the default), references to repositories that don't provide any relevant unit are excluded from being added to the assembled repository.

All those filters are only applied to those repository references derived from the target-definition or pom file, when addIUTargetRepositoryReferences respectively addPomRepositoryReferences is set true. References explicitly listed in the repository file (category.xml) are always added.

Configuration example 1

<repositoryReferenceFilter>
  <addOnlyProviding>true</addOnlyProviding>
  <exclude>https://foo.bar.org/hidden/**</exclude>
</repositoryReferenceFilter>
Configuration example 2
<repositoryReferenceFilter>
  <addOnlyProviding>false</addOnlyProviding>
  <exclude>
    <location>https://foo.bar.org/hidden/**</location>
    <location>%regex[http(s)?:\/\/foo\.bar\.org\/secret\/.*]</location>
    <location>![https://foo.bar.org/**]</location>
  </exclude>
</repositoryReferenceFilter>
In the second example the first of the three patterns uses ANT-style syntax, the second one uses a Java RegEx java.util.regex.Pattern (enclosed in %regex[<the-regex-pattern>]).
The third pattern is a negated (enclosed in ![<the-negated-pattern>]), which effectively makes it an inclusion pattern that all references must match in order to be added. Unlike in the first example, in the second example all references that pass the location filter are added, regardless of if the provide any unit or not.

<xzCompress> boolean -

Add XZ-compressed repository index files. XZ offers better compression ratios esp. for highly redundant file content.


Default: true

Parameter Details

<addIUTargetRepositoryReferences>

If enabled all P2 repositories referenced in InstallableUnit-type locations of the active target-file are added as referenced repositories.
  • Type: boolean
  • Required: No

<addPomRepositoryReferences>

If enabled all P2-repositories referenced in the pom are added as referenced repositories.
  • Type: boolean
  • Required: No

<categoriesDirectory>

The directory where category.xml files are located.

Defaults to the project's base directory.

  • Type: java.io.File
  • Required: No
  • Default: ${project.basedir}

<compress>

Compress the repository index files content.xml and artifacts.xml.

  • Type: boolean
  • Required: No
  • Default: true

<createArtifactRepository>

By default, this goal creates a p2 repository. Set this to false if only a p2 metadata repository (without the artifact files) shall be created.

  • Type: boolean
  • Required: No
  • Default: true

<extraArtifactRepositoryProperties>

No description.
  • Type: java.util.Map<java.lang.String, java.lang.String>
  • Required: No

<filterProvided>

If enabled, units and artifacts that are part of a referenced repository are excluded from the mirror operation. This can be used (together with includeAllDependencies) to build a repository that is both self contained and minimal in regard to the referenced repositories)
  • Type: boolean
  • Required: No
  • Default: false

<generateOSGiRepository>

If enabled, an OSGi Repository is generated out of the content of the P2 repository.
  • Type: boolean
  • Required: No

<includeAllDependencies>

By default, only (transitive) inclusions of the published artifacts are aggregated. Set this parameter to true to aggregate all transitive dependencies, making the resulting p2 repository self-contained.

  • Type: boolean
  • Required: No
  • Default: false

<includeAllSources>

By default, only explicitly mentioned sources are included. Set this parameter to true to include all sources that are available and included in this repository.

  • Type: boolean
  • Required: No
  • Default: false

<includeRequiredFeatures>

By default, only included features of a feature are included in the repository, setting this to true will also include features mentioned in the dependencies section.

Important Notes:

Due to current restrictions of P2 requirement model even if this is disabled, features with a strict version range are always included, even if they are part of the dependencies of a feature!

Due to current data structure restrictions of P2 Slicer also transitive dependencies of a feature are included and not only the feature itself!

  • Type: boolean
  • Required: No
  • Default: false

<includeRequiredPlugins>

By default, only included plugins of a feature are included in the repository, setting this to true will also include plugins mentioned in the dependencies section of a feature

Important Notes:

Due to current restrictions of P2 requirement model even if this is disabled, plugins with a strict version range are always included, even if they are part of the dependencies of a feature!

Due to current data structure restrictions of P2 Slicer also transitive dependencies of a plugin might be included and not only the dependency plugin itself!

  • Type: boolean
  • Required: No
  • Default: false

<keepNonXzIndexFiles>

If xzCompress is true, whether jar or xml index files should be kept in addition to XZ-compressed index files. This fallback provides backwards compatibility for pre-Mars p2 clients which cannot read XZ-compressed index files.

  • Type: boolean
  • Required: No
  • Default: true

<profileProperties>

Additional properties against which p2 filters are evaluated while aggregating.

  • Type: java.util.Map<java.lang.String, java.lang.String>
  • Required: No

<qualifier>

No description.
  • Type: java.lang.String
  • Required: No
  • User Property: buildQualifier

<repositoryFileName>

Specify the filename of the additionally generated OSGi Repository (if enabled)
  • Type: java.lang.String
  • Required: No
  • Default: repository.xml

<repositoryLocation>

No description.
  • Type: java.io.File
  • Required: No
  • User Property: p2.repository.location

<repositoryName>

The name attribute stored in the created p2 repository.

  • Type: java.lang.String
  • Required: No
  • Default: ${project.name}

<repositoryReferenceFilter>

Filters to exclude automatically derived repository references from being added to the assembled repository.

Repository references can be filtered based on their location URI using a list of exclusion pattern:
The location of a reference must not be matched by any pattern, in order to be eventually added to the assembled repository. An arbitrary number of patterns can be specified.

If the sub-property addOnlyProviding is set to true (the default), references to repositories that don't provide any relevant unit are excluded from being added to the assembled repository.

All those filters are only applied to those repository references derived from the target-definition or pom file, when addIUTargetRepositoryReferences respectively addPomRepositoryReferences is set true. References explicitly listed in the repository file (category.xml) are always added.

Configuration example 1

<repositoryReferenceFilter>
  <addOnlyProviding>true</addOnlyProviding>
  <exclude>https://foo.bar.org/hidden/**</exclude>
</repositoryReferenceFilter>
Configuration example 2
<repositoryReferenceFilter>
  <addOnlyProviding>false</addOnlyProviding>
  <exclude>
    <location>https://foo.bar.org/hidden/**</location>
    <location>%regex[http(s)?:\/\/foo\.bar\.org\/secret\/.*]</location>
    <location>![https://foo.bar.org/**]</location>
  </exclude>
</repositoryReferenceFilter>
In the second example the first of the three patterns uses ANT-style syntax, the second one uses a Java RegEx java.util.regex.Pattern (enclosed in %regex[<the-regex-pattern>]).
The third pattern is a negated (enclosed in ![<the-negated-pattern>]), which effectively makes it an inclusion pattern that all references must match in order to be added. Unlike in the first example, in the second example all references that pass the location filter are added, regardless of if the provide any unit or not.

  • Type: org.eclipse.tycho.plugins.p2.repository.AssembleRepositoryMojo$RepositoryReferenceFilter
  • Required: No

<xzCompress>

Add XZ-compressed repository index files. XZ offers better compression ratios esp. for highly redundant file content.

  • Type: boolean
  • Required: No
  • Default: true