Skip to content

Commit

Permalink
Moved the BuildContext update until after the plugin execution.
Browse files Browse the repository at this point in the history
git-svn-id: file:///home/tiste/MOJOHAUS-TO-GIT/SVN-MOJO-WIP/trunk/mojo/jaxb2-maven-plugin@20576 52ab4f32-60fc-0310-b215-8acea882cd1b
  • Loading branch information
lennartj committed May 2, 2015
1 parent eb2696b commit dd389d8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/org/codehaus/mojo/jaxb2/AbstractJaxbMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,15 @@ public final void execute() throws MojoExecutionException, MojoFailureException
// 3) Are generated files stale?
if (isReGenerationRequired()) {

// Hack to support M2E
buildContext.refresh(getOutputDirectory());

if (performExecution()) {

// As instructed by the performExecution() method, update
// the timestamp of the stale File.
updateStaleFileTimestamp();

// Hack to support M2E
buildContext.refresh(getOutputDirectory());

} else if (isInfoEnabled) {
log.info("Not updating staleFile timestamp as instructed.");
}
Expand Down

0 comments on commit dd389d8

Please sign in to comment.