Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Tycho/Release Notes/2.3"

(A mojo to remap Maven artifacts to Maven URLs in artifact repository)
(New and Noteworthy)
 
(7 intermediate revisions by 4 users not shown)
Line 5: Line 5:
 
<div id="versionNav" class="alert alert-small alert-warning">[[Tycho/Release Notes/2.2|&lt; Previous Version]] | [[Tycho/Release Notes/2.4|Next Version &gt;]]</div>
 
<div id="versionNav" class="alert alert-small alert-warning">[[Tycho/Release Notes/2.2|&lt; Previous Version]] | [[Tycho/Release Notes/2.4|Next Version &gt;]]</div>
  
 +
<!--
 
== SNAPSHOT builds ==
 
== SNAPSHOT builds ==
  
Line 21: Line 22:
 
   
 
   
 
Refer to the [https://ci.eclipse.org/tycho/job/tycho-sitedocs/lastSuccessfulBuild/artifact/target/staging/index.html latest SNAPSHOT site docs for Tycho].
 
Refer to the [https://ci.eclipse.org/tycho/job/tycho-sitedocs/lastSuccessfulBuild/artifact/target/staging/index.html latest SNAPSHOT site docs for Tycho].
 
<!--
 
  
 
== Staging build ==
 
== Staging build ==
Line 32: Line 31:
 
   <pluginRepository>
 
   <pluginRepository>
 
     <id>tycho-staged</id>
 
     <id>tycho-staged</id>
     <url>https://oss.sonatype.org/content/repositories/orgeclipsetycho-1064/</url>
+
     <url>https://oss.sonatype.org/content/repositories/orgeclipsetycho-1066/</url>
 
   </pluginRepository>
 
   </pluginRepository>
 
</pluginRepositories>
 
</pluginRepositories>
 
</source>
 
</source>
 
-->
 
-->
 
 
[[Category:Tycho|Release Notes/2.2]]
 
[[Category:Tycho|Release Notes/2.2]]
  
Line 46: Line 44:
 
   #versionNav{ position:absolute; top: 0px; right: 0px; border-color: transparent; background: transparent; }
 
   #versionNav{ position:absolute; top: 0px; right: 0px; border-color: transparent; background: transparent; }
 
</css>
 
</css>
 +
 +
=== Official Equinox Resolver used for dependency resolution (stricter and can produce errors for split packages) ===
 +
 +
{{bug|570189}} Tycho now uses the same resolver as Equinox uses at runtime. This resolver is stricter and more correct than the previous one, and as a result should provide resolution results that are much more consistent with actual dependency resolution at runtime.
 +
 +
However, this change makes {{bug|403196}} more visible in some cases with split package, for example
 +
<pre>
 +
  Unresolved requirement: Require-Bundle: org.eclipse.equinox.security
 +
    -> Bundle-SymbolicName: org.eclipse.equinox.security; bundle-version="1.3.600.v20210126-1005"; singleton:="true"
 +
      org.eclipse.equinox.security [1]
 +
        Unresolved requirement: Import-Package: org.eclipse.core.runtime; registry="split"
 +
</pre>
 +
which means that the p2 resolution succeeds while it actually failed at providing the <tt>Import-Package: org.eclipse.core.runtime; registry="split"</tt> and later OSGi resolution will find it's missing and complain.<br>
 +
In such case, the workaround/solution is to ensure that the bundle that provides <tt>Import-Package: org.eclipse.core.runtime; registry="split"</tt> gets added as part of p2 resolution despite {{bug|403196}}, typically by adding <tt>org.eclipse.equinox.registry</tt> to the <tt>Required-Bundle</tt> of the bundles being built, or by adding it to <tt>target-platform-configuration</tt> as described in https://www.eclipse.org/tycho/sitedocs/target-platform-configuration/target-platform-configuration-mojo.html#dependency-resolution .
  
 
=== Enable reuse of workspace by tycho-eclipserun-plugin ===
 
=== Enable reuse of workspace by tycho-eclipserun-plugin ===
Line 59: Line 71:
 
The [https://ci.eclipse.org/tycho/job/tycho-sitedocs/lastSuccessfulBuild/artifact/target/staging/tycho-p2/tycho-p2-repository-plugin/remap-artifacts-to-m2-repo-mojo.html org.eclipse.tycho:tycho-p2-repository-plugin:remap-artifacts-to-m2-repo] was added. It modifies the artifact metadata of the provided p2 repository by adding extra mapping rules for artifacts the can be resolved to Maven repositories so the URL under Maven repository is used for fetching and artifact is not duplicated inside this repo. See [https://git.eclipse.org/c/tycho/org.eclipse.tycho.git/tree/tycho-its/projects/p2Repository.mavenRepo/pom.xml#n28 this example].
 
The [https://ci.eclipse.org/tycho/job/tycho-sitedocs/lastSuccessfulBuild/artifact/target/staging/tycho-p2/tycho-p2-repository-plugin/remap-artifacts-to-m2-repo-mojo.html org.eclipse.tycho:tycho-p2-repository-plugin:remap-artifacts-to-m2-repo] was added. It modifies the artifact metadata of the provided p2 repository by adding extra mapping rules for artifacts the can be resolved to Maven repositories so the URL under Maven repository is used for fetching and artifact is not duplicated inside this repo. See [https://git.eclipse.org/c/tycho/org.eclipse.tycho.git/tree/tycho-its/projects/p2Repository.mavenRepo/pom.xml#n28 this example].
  
=== Noteworthy item 1 ===
+
=== Target files can be specified directly now ===
 +
 
 +
{{bug|571520}} allow to specify a target file as an alternative to a target artifact
 +
 
 +
  <plugin>
 +
    <groupId>org.eclipse.tycho</groupId>
 +
    <artifactId>target-platform-configuration</artifactId>
 +
    <version>${tycho-version}</version>
 +
    <configuration>
 +
      <target>
 +
        <file>jetty.target</file>
 +
      </target>
 +
    </configuration>
 +
  </plugin>
 +
 
 +
=== Multi-platform product packaging ===
  
{{bug|123456}}, description
+
{{bug|572082}}, allow applications to use bundle pools in order to have a "cross platform" installation structure without duplicating the bundles. To activate the multi-platform package, simply add <tt><multiPlatformPackage>true</multiPlatformPackage></tt> to the product definition in the <tt>pom.xml</tt> file.

Latest revision as of 03:25, 31 March 2021

New and Noteworthy

Complete list of bug fixes and enhancements in 2.3.0-SNAPSHOT

Official Equinox Resolver used for dependency resolution (stricter and can produce errors for split packages)

bug 570189 Tycho now uses the same resolver as Equinox uses at runtime. This resolver is stricter and more correct than the previous one, and as a result should provide resolution results that are much more consistent with actual dependency resolution at runtime.

However, this change makes bug 403196 more visible in some cases with split package, for example

  Unresolved requirement: Require-Bundle: org.eclipse.equinox.security
    -> Bundle-SymbolicName: org.eclipse.equinox.security; bundle-version="1.3.600.v20210126-1005"; singleton:="true"
       org.eclipse.equinox.security [1]
         Unresolved requirement: Import-Package: org.eclipse.core.runtime; registry="split"

which means that the p2 resolution succeeds while it actually failed at providing the Import-Package: org.eclipse.core.runtime; registry="split" and later OSGi resolution will find it's missing and complain.
In such case, the workaround/solution is to ensure that the bundle that provides Import-Package: org.eclipse.core.runtime; registry="split" gets added as part of p2 resolution despite bug 403196, typically by adding org.eclipse.equinox.registry to the Required-Bundle of the bundles being built, or by adding it to target-platform-configuration as described in https://www.eclipse.org/tycho/sitedocs/target-platform-configuration/target-platform-configuration-mojo.html#dependency-resolution .

Enable reuse of workspace by tycho-eclipserun-plugin

bug 570477, The tycho-eclipserun-plugin now has a configuration-parameter named clearWorkspaceBeforeLaunch to specify if the workspace should be cleared before running eclipse or not (default is true, matching the behavior until now). If the value is false, the workspace of the previous run is reused (if present), if the value is true the workspace-directory (i.e. the 'data' directory within the work-directory) and its content is deleted.

A mojo to "fix" modified metadata in artifact repository (artifacts modified after after aggregation)

The org.eclipse.tycho:tycho-p2-repository-plugin:fix-artifacts-metadata was added. It updates the artifact repository metadata checksums and size of modified artifacts in the given folder. This can be used if some other mojo (e.g. jar-signer) modifies the repository artifacts after the assemble-repository step. An example could be found in the jar-signing-extra integration test

A mojo to remap Maven artifacts to Maven URLs in artifact repository

The org.eclipse.tycho:tycho-p2-repository-plugin:remap-artifacts-to-m2-repo was added. It modifies the artifact metadata of the provided p2 repository by adding extra mapping rules for artifacts the can be resolved to Maven repositories so the URL under Maven repository is used for fetching and artifact is not duplicated inside this repo. See this example.

Target files can be specified directly now

bug 571520 allow to specify a target file as an alternative to a target artifact

 <plugin>
   <groupId>org.eclipse.tycho</groupId>
   <artifactId>target-platform-configuration</artifactId>
   <version>${tycho-version}</version>
   <configuration>
     <target>
       <file>jetty.target</file>
     </target>
   </configuration>
 </plugin>

Multi-platform product packaging

bug 572082, allow applications to use bundle pools in order to have a "cross platform" installation structure without duplicating the bundles. To activate the multi-platform package, simply add <multiPlatformPackage>true</multiPlatformPackage> to the product definition in the pom.xml file.

Back to the top