Skip to content

Commit

Permalink
Merge pull request #29 from ethlo/issue-28
Browse files Browse the repository at this point in the history
Fix for issue #28
  • Loading branch information
ethlo authored Jan 29, 2020
2 parents ffcc364 + 6278014 commit fddc1bf
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ public class EclipselinkStaticWeaveMojo extends AbstractMojo
@Parameter(defaultValue = "true")
private boolean addClassesToPersistenceFile;

@Parameter(defaultValue = "true")
private boolean updatePersistenceXml;

@Parameter(defaultValue = "false", property = "eclipselink.weave.skip")
private boolean skip;
Expand Down Expand Up @@ -138,7 +140,15 @@ private void processWeaving(ClassLoader classLoader) throws MojoExecutionExcepti
final Set<String> entityClasses = findEntities(allBasePackages, classPath);
getLog().info("Entities found : " + entityClasses.size());

processPersistenceXml(classLoader, entityClasses);
if (updatePersistenceXml)
{
getLog().debug("Updating persistence.xml file");
processPersistenceXml(classLoader, entityClasses);
}
else
{
getLog().debug("Skipping update of persistence.xml file");
}

getLog().info("Source classes dir: " + source);
getLog().info("Target classes dir: " + target);
Expand Down

0 comments on commit fddc1bf

Please sign in to comment.