--- maven/manifest.mf +++ maven/manifest.mf @@ -1,6 +1,6 @@ Manifest-Version: 1.0 OpenIDE-Module: org.netbeans.modules.maven/2 -OpenIDE-Module-Specification-Version: 2.70 +OpenIDE-Module-Specification-Version: 2.71 OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/maven/Bundle.properties OpenIDE-Module-Layer: org/netbeans/modules/maven/layer.xml AutoUpdate-Show-In-Client: false --- maven/nbproject/project.xml +++ maven/nbproject/project.xml @@ -258,7 +258,7 @@ 1 - 1.67 + 1.69 --- maven/src/org/netbeans/modules/maven/execute/AbstractMavenExecutor.java +++ maven/src/org/netbeans/modules/maven/execute/AbstractMavenExecutor.java @@ -76,6 +76,7 @@ import org.openide.DialogDisplayer; import org.openide.awt.StatusDisplayer; import org.openide.execution.ExecutorTask; +import org.openide.filesystems.FileObject; import org.openide.util.Cancellable; import org.openide.util.Exceptions; import org.openide.util.ImageUtilities; @@ -429,7 +430,7 @@ } - protected class MavenItem implements BuildExecutionSupport.Item { + protected class MavenItem implements BuildExecutionSupport.ActionItem { @Override public String getDisplayName() { return config.getTaskDisplayName(); @@ -447,6 +448,47 @@ AbstractMavenExecutor.this.cancel(); } + @Override + public String getAction() { + return config.getActionName() != null ? config.getActionName() : "xxx-custom"; } + @Override + public FileObject getProjectDirectory() { + return config.getProject() != null ? config.getProject().getProjectDirectory() : null; } + + @Override + public int hashCode() { + int hash = 5; + hash = 41 * hash + getAction().hashCode(); + hash = 41 * hash + getProjectDirectory().hashCode(); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final MavenItem other = (MavenItem) obj; + if (!this.getAction().equals(other.getAction())) { + return false; + } + if (this.getProjectDirectory() != other.getProjectDirectory() && (this.getProjectDirectory() == null || !this.getProjectDirectory().equals(other.getProjectDirectory()))) { + return false; + } + return true; + } + + + + + + + } + +}