Skip to content

Commit

Permalink
#166: consider all clean-lifecylce phases and add release-notes entry (
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesWell committed Jul 5, 2021
1 parent b9e57ff commit ce14ac0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions RELEASE_NOTES.md
Expand Up @@ -86,6 +86,11 @@ Tycho now understands the `additional.bundles` directive in the `build.propertie

A new mojo [tycho-p2-repository-plugin:assemble-maven-repository](https://www.eclipse.org/tycho/sitedocs/tycho-p2-repository-plugin/assemble-maven-repository.html) 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](https://github.com/eclipse/tycho/issues/166)

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.

## 2.3.0

### Official Equinox Resolver used for dependency resolution (stricter and can produce errors for split packages)
Expand Down
Expand Up @@ -234,11 +234,13 @@ private void validateUniqueBaseDirs(List<MavenProject> projects) throws MavenExe
}
}

private static final Set<String> CLEAN_PHASES = Set.of("pre-clean", "clean", "post-clean");

private boolean disableLifecycleParticipation(MavenSession session) {
// command line property to disable Tycho lifecycle participant
return "maven".equals(session.getUserProperties().get("tycho.mode"))
|| session.getUserProperties().containsKey("m2e.version")
|| session.getGoals().equals(List.of("clean")); // disable for clean-only session
|| CLEAN_PHASES.containsAll(session.getGoals());
}

private void configureComponents(MavenSession session) {
Expand Down

0 comments on commit ce14ac0

Please sign in to comment.