IDEA-153582 MavenPlugin.Execution phase

This commit is contained in:
Vladislav.Soroka
2016-04-07 18:12:29 +03:00
parent 9475e4d62b
commit 0d02e63f28
3 changed files with 16 additions and 2 deletions
@@ -160,17 +160,27 @@ public class MavenPlugin implements Serializable {
private final List<String> myGoals;
private final Element myConfiguration;
private final String myExecutionId;
private final String myPhase;
public Execution(String executionId, List<String> goals, Element configuration) {
this(executionId, null, goals, configuration);
}
public Execution(String executionId, String phase, List<String> goals, Element configuration) {
myGoals = goals;
myConfiguration = configuration;
myExecutionId = executionId;
myPhase = phase;
}
public String getExecutionId() {
return myExecutionId;
}
public String getPhase() {
return myPhase;
}
public List<String> getGoals() {
return myGoals;
}
@@ -189,6 +199,7 @@ public class MavenPlugin implements Serializable {
if (myGoals != null ? !myGoals.equals(that.myGoals) : that.myGoals != null) return false;
if (myExecutionId != null ? !myExecutionId.equals(that.myExecutionId) : that.myExecutionId != null) return false;
if (myPhase != null ? !myPhase.equals(that.myPhase) : that.myPhase != null) return false;
if (!JDOMUtil.areElementsEqual(myConfiguration, that.myConfiguration)) return false;
return true;
@@ -200,6 +211,9 @@ public class MavenPlugin implements Serializable {
if (myExecutionId != null) {
result = 31 * result + myExecutionId.hashCode();
}
if (myPhase != null) {
result = 31 * result + myPhase.hashCode();
}
return result;
}
@@ -273,7 +273,7 @@ public class Maven2ModelConverter {
}
public static MavenPlugin.Execution convertExecution(PluginExecution execution) throws RemoteException {
return new MavenPlugin.Execution(execution.getId(), execution.getGoals(), convertConfiguration(execution.getConfiguration()));
return new MavenPlugin.Execution(execution.getId(), execution.getPhase(), execution.getGoals(), convertConfiguration(execution.getConfiguration()));
}
private static Element convertConfiguration(Object config) throws RemoteException {
@@ -264,7 +264,7 @@ public class MavenModelConverter {
}
public static MavenPlugin.Execution convertExecution(PluginExecution execution) throws RemoteException {
return new MavenPlugin.Execution(execution.getId(), execution.getGoals(), convertConfiguration(execution.getConfiguration()));
return new MavenPlugin.Execution(execution.getId(), execution.getPhase(), execution.getGoals(), convertConfiguration(execution.getConfiguration()));
}
private static Element convertConfiguration(Object config) throws RemoteException {