Skip to content

Update tycho.version to v2.4.0

Renovate requested to merge renovate/tycho.version into develop

This MR contains the following updates:

Package Update Change
org.eclipse.tycho:tycho-p2-plugin (source) minor 2.3.0 -> 2.4.0
org.eclipse.tycho.extras:tycho-buildtimestamp-jgit (source) minor 2.3.0 -> 2.4.0
org.eclipse.tycho:tycho-packaging-plugin (source) minor 2.3.0 -> 2.4.0
org.eclipse.tycho.extras:tycho-source-feature-plugin (source) minor 2.3.0 -> 2.4.0
org.eclipse.tycho:tycho-source-plugin (source) minor 2.3.0 -> 2.4.0
org.eclipse.tycho:target-platform-configuration (source) minor 2.3.0 -> 2.4.0
org.eclipse.tycho:tycho-maven-plugin (source) minor 2.3.0 -> 2.4.0

Release Notes

eclipse/tycho

v2.4.0

Support resolving of JUnit Classpath Container

It is now possible to resolve the JDT 'JUnit Classpath Container', for this do the follwoing:

  • add the 'JUnit Classpath Container' to the classpath of your eclipse project
  • make sure you check in the .classpath file
  • Now you can use the Junit classes without explcitly adding them to your bundle via require-bundle/import package

For an example take a look at the integration tests

Execute unit-tests with eclipse-plugin packaging

Before unit-tests are only executed for eclipse-test-plugin packaging types. Beside that it was only possible to execute them as part of tycho-surefire (what executes them inside an OSGi runtime) in the integration-test phase (making them actually some kind of integration test).

From now on this restriction is no longer true and one is able to execute unit-test with maven-surefire as well as integration-tests with tycho-failfast plugin. This works the following way:

  • create a source-folder in your eclipse-plugin packaged project and mark them as a contains test-sources in the classpath settings:grafik
  • Create a unit-test inside that folder, either name it with any of the default-pattern maven-surefire plugin of or configure them explicitly.
  • Include maven-surefire plugin configuration in your pom to select the approriate test-providers
<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-surefire-plugin</artifactId>
	<version>3.0.0-M5</version>
	<dependencies>
		<dependency>
			<groupId>org.apache.maven.surefire</groupId>
			<artifactId>surefire-junit47</artifactId>
			<version>3.0.0-M5</version>
		</dependency>
	</dependencies>
</plugin>
  • run your it with mvn test

Tycho also includes a new tycho-failsafe mojo, that is similar to the maven one:

  • it executes at the integration-test phase but do not fail the build if a test fails, instead a summary file is written
  • the outcome of the tests are checked in the verify phase (and fail the build there if neccesary)
  • this allows to hook some setup/teardown mojos (e.g. start webservers, ...) in the pre-integration-test phase and to safly tear them down in the post-integration test phase (thus the name 'failsafe' see tycho-failsafe-faq for some more details

Given you have the above setup you create an integration-test (executed in an OSGi runtime like traditional tycho-surefire mojo) as following:

  • create a new test that mathes the pattern *IT.java (or configure a different pattern that do not intersects with the surefire test pattern)
  • run your it with mvn verify

If you where previously using -Dtest=.... on the root level of your build tree it might now be neccesary to also include -Dsurefire.failIfNoSpecifiedTests=false as maven-surefire might otherwhise complain about

No tests were executed! (Set -DfailIfNoTests=false to ignore this error.)

for your eclipse-plugin packaged project if they do not match anything (the error message is a bit missleading, thsi is tracked in SUREFIRE-1910).

Enhanced support for debug output in surefire-tests

tycho-surefire now support to set .options files for debugging through the new debugOptions parameter, example:

<plugin>
  <groupId>org.eclipse.tycho</groupId>
  <artifactId>tycho-surefire-plugin</artifactId>
  <version>${tycho-version}</version>
  <configuration>
    <showEclipseLog>true</showEclipseLog>
    <debugOptions>${project.basedir}/../../debug.options</debugOptions>
</configuration>
</plugin>
Support for site/repository-reference/@​location in eclipse-repository

Tycho now correctly supports repository references in category.xml: in the previous versions, the content XML generated by Tycho only contained a reference to the metadata referred repository, but not to the artifacts referred repository, resulting in failures in installations (the verification phase went fine, but the actual installation could not be performed by p2).

Add PGP signatures to artifacts in p2 repositories

A new mojo tycho-gpg-plugin:sign-p2-artifacts-mojo was added to add GPG signatures to artifacts metadata. Those GPG signatures are later expected to be used by p2 during installation to verify integrity and build trust in installed components.

Support for "additional.bundles" directive in build.properties

Tycho now understands the additional.bundles directive in the build.properties file and properly resolves them during dependency resolution.

Create p2 repository referencing Maven artifacts

A new mojo tycho-p2-repository-plugin:assemble-maven-repository was added to enable creation of p2 repositories directly from Maven artifact references. This removes the usual need to create a target definition and a category.xml for this task.

Skip Tycho dependency-resolution for clean-only builds by default

To speed up Maven clean-only builds, Tycho's dependency resolution is now skipped, if the only phase specified is one from the clean lifecycle, namely clean,pre-clean,post-clean. Previously one had to specify the property -Dtycho.mode=maven to skip dependency resolution.


Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about these updates again.


  • If you want to rebase/retry this MR, check this box.

This MR has been generated by Renovate Bot.

Merge request reports

Loading