Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#166: consider all clean-lifecylce phases and add release-notes entry #172

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
|| (session.getGoals().size() == 1 && CLEAN_PHASES.contains(session.getGoals().get(0))); // disable for clean-only session
HannesWell marked this conversation as resolved.
Show resolved Hide resolved
}

private void configureComponents(MavenSession session) {
Expand Down