Skip to content

Commit

Permalink
Remove tycho.mode=maven
Browse files Browse the repository at this point in the history
Fix #676
  • Loading branch information
laeubi committed Jan 28, 2024
1 parent 98123cb commit a0dc64d
Showing 1 changed file with 1 addition and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.ForkJoinTask;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -364,7 +363,7 @@ 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) {
return isMavenMode(session) || isM2E(session) || isCleanOnly(session);
return isM2E(session) || isCleanOnly(session);
}

private boolean isCleanOnly(MavenSession session) {
Expand All @@ -376,28 +375,6 @@ private boolean isM2E(MavenSession session) {
return session.getUserProperties().containsKey("m2e.version");
}

private boolean isMavenMode(MavenSession session) {
// command line property to disable Tycho lifecycle participant
if ("maven".equals(session.getUserProperties().get(TychoConstants.SESSION_PROPERTY_TYCHO_MODE))) {
synchronized (TychoMavenLifecycleParticipant.class) {
if (!warnedAboutTychoMode) {
warnedAboutTychoMode = true;
log.warn("######## IMPORTANT #######");
log.warn("Usage of " + TychoConstants.SESSION_PROPERTY_TYCHO_MODE
+ "=maven is deprecated and will be removed in later Tycho versions, see https://github.com/eclipse-tycho/tycho/issues/676");
log.warn("######## IMPORTANT #######");
try {
//to give user change to see the message....
TimeUnit.SECONDS.sleep(5);
} catch (InterruptedException e) {
}
}
}
return true;
}
return false;
}

private void configureComponents(MavenSession session) {
// TODO why does the bundle reader need to cache stuff in the local maven repository?
File localRepository = new File(session.getLocalRepository().getBasedir());
Expand Down

0 comments on commit a0dc64d

Please sign in to comment.