Skip to content

Commit 7e4468c

Browse files
committed
Set needRebuild=false before triggering the build
1 parent 296e8fb commit 7e4468c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/runtime/cmd/BuildProjectCommand.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ public BuildProjectCommand() {
3131
@Override
3232
public void execute() {
3333
try {
34-
project().build(IncrementalProjectBuilder.FULL_BUILD, this.getMonitor());
35-
3634
LOG.debug("Build for Project {} triggered, setting needRebuild=false", project().getName());
35+
// set needRebuild=false before triggering the build, as the build might load the properties
36+
// in parallel still with needRebuild=true
3737
projectProperties().setNeedRebuild(false);
38+
39+
project().build(IncrementalProjectBuilder.FULL_BUILD, this.getMonitor());
3840
} catch (CoreException | PropertiesException e) {
3941
throw new RuntimeException(e);
4042
} finally {

0 commit comments

Comments
 (0)