Lines 58-65
Link Here
|
58 |
import org.apache.maven.execution.DefaultMavenExecutionRequest; |
58 |
import org.apache.maven.execution.DefaultMavenExecutionRequest; |
59 |
import org.apache.maven.execution.MavenExecutionRequest; |
59 |
import org.apache.maven.execution.MavenExecutionRequest; |
60 |
import org.apache.maven.execution.MavenExecutionResult; |
60 |
import org.apache.maven.execution.MavenExecutionResult; |
61 |
import org.apache.maven.plugin.MojoExecutionException; |
|
|
62 |
import org.apache.maven.plugin.MojoFailureException; |
63 |
import org.netbeans.api.options.OptionsDisplayer; |
61 |
import org.netbeans.api.options.OptionsDisplayer; |
64 |
import org.netbeans.api.progress.ProgressHandle; |
62 |
import org.netbeans.api.progress.ProgressHandle; |
65 |
import org.netbeans.api.progress.ProgressHandleFactory; |
63 |
import org.netbeans.api.progress.ProgressHandleFactory; |
Lines 75-80
Link Here
|
75 |
import org.netbeans.modules.maven.api.execute.ExecutionContext; |
73 |
import org.netbeans.modules.maven.api.execute.ExecutionContext; |
76 |
import org.netbeans.modules.maven.api.execute.ExecutionResultChecker; |
74 |
import org.netbeans.modules.maven.api.execute.ExecutionResultChecker; |
77 |
import org.netbeans.modules.maven.api.execute.LateBoundPrerequisitesChecker; |
75 |
import org.netbeans.modules.maven.api.execute.LateBoundPrerequisitesChecker; |
|
|
76 |
import org.netbeans.spi.project.ui.support.BuildExecutionSupport; |
78 |
import org.openide.awt.StatusDisplayer; |
77 |
import org.openide.awt.StatusDisplayer; |
79 |
import org.openide.filesystems.FileObject; |
78 |
import org.openide.filesystems.FileObject; |
80 |
import org.openide.filesystems.FileUtil; |
79 |
import org.openide.filesystems.FileUtil; |
Lines 111-116
Link Here
|
111 |
handle.addContributor(backupContrib); |
110 |
handle.addContributor(backupContrib); |
112 |
} |
111 |
} |
113 |
|
112 |
|
|
|
113 |
@Override |
114 |
protected boolean isEmbedded() { |
114 |
protected boolean isEmbedded() { |
115 |
return true; |
115 |
return true; |
116 |
} |
116 |
} |
Lines 121-126
Link Here
|
121 |
* not to be called directrly.. use execute(); |
121 |
* not to be called directrly.. use execute(); |
122 |
*/ |
122 |
*/ |
123 |
public void run() { |
123 |
public void run() { |
|
|
124 |
synchronized (SEMAPHORE) { |
125 |
if (task == null) { |
126 |
try { |
127 |
SEMAPHORE.wait(); |
128 |
} catch (InterruptedException ex) { |
129 |
LOGGER.log(Level.FINE, "interrupted", ex); |
130 |
} |
131 |
} |
132 |
} |
133 |
|
124 |
finishing = false; |
134 |
finishing = false; |
125 |
RunConfig clonedConfig = new BeanRunConfig(this.config); |
135 |
RunConfig clonedConfig = new BeanRunConfig(this.config); |
126 |
// check the prerequisites |
136 |
// check the prerequisites |
Lines 162-167
Link Here
|
162 |
MavenExecutionRequest req = new DefaultMavenExecutionRequest(); |
172 |
MavenExecutionRequest req = new DefaultMavenExecutionRequest(); |
163 |
int executionResult = -10; |
173 |
int executionResult = -10; |
164 |
try { |
174 |
try { |
|
|
175 |
BuildExecutionSupport.registerRunningItem(item); |
176 |
|
165 |
MavenEmbedder embedder; |
177 |
MavenEmbedder embedder; |
166 |
ProgressTransferListener.setAggregateHandle(handle); |
178 |
ProgressTransferListener.setAggregateHandle(handle); |
167 |
out = new JavaOutputHandler(ioput, clonedConfig.getProject(), handle, clonedConfig); |
179 |
out = new JavaOutputHandler(ioput, clonedConfig.getProject(), handle, clonedConfig); |
Lines 256-261
Link Here
|
256 |
} finally { |
268 |
} finally { |
257 |
finishing = true; //#103460 |
269 |
finishing = true; //#103460 |
258 |
ProgressHandle ph = ProgressHandleFactory.createSystemHandle( "Additional maven build processing"); |
270 |
ProgressHandle ph = ProgressHandleFactory.createSystemHandle( "Additional maven build processing"); |
|
|
271 |
BuildExecutionSupport.registerFinishedItem(item); |
272 |
|
259 |
ph.start(); |
273 |
ph.start(); |
260 |
try { //defend against badly written extensions.. |
274 |
try { //defend against badly written extensions.. |
261 |
out.buildFinished(); |
275 |
out.buildFinished(); |