mirror of https://github.com/apache/maven.git
[MNG-7689] Check if execution lifecycle phase is not null (#996)
This commit is contained in:
parent
7b38457506
commit
b82479bf11
|
@ -318,11 +318,13 @@ class ReactorReader implements MavenWorkspaceReader {
|
|||
switch (event.getType()) {
|
||||
case MojoStarted:
|
||||
String phase = event.getMojoExecution().getLifecyclePhase();
|
||||
Deque<String> phases = getLifecycles(project);
|
||||
if (!Objects.equals(phase, phases.peekLast())) {
|
||||
phases.addLast(phase);
|
||||
if ("clean".equals(phase)) {
|
||||
cleanProjectLocalRepository(project);
|
||||
if (phase != null) {
|
||||
Deque<String> phases = getLifecycles(project);
|
||||
if (!Objects.equals(phase, phases.peekLast())) {
|
||||
phases.addLast(phase);
|
||||
if ("clean".equals(phase)) {
|
||||
cleanProjectLocalRepository(project);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue