Skip to content

Commit

Permalink
move to static field
Browse files Browse the repository at this point in the history
  • Loading branch information
evacchi authored and mswiderski committed Apr 3, 2019
1 parent b7b8c62 commit 0cf4fb9
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ public class GenerateProcessModelMojo extends AbstractKieMojo {
private static final String RESOURCE_CLASS_SUFFIX = "Resource";
private static final String BOOTSTRAP_PACKAGE = "org.kie.bootstrap.process";
private static final String BOOTSTRAP_CLASS = BOOTSTRAP_PACKAGE + ".ProcessRuntimeProvider";
private static final SemanticModules BPMN_SEMANTIC_MODULES = new SemanticModules();
static {
BPMN_SEMANTIC_MODULES.addSemanticModule(new BPMNSemanticModule());
BPMN_SEMANTIC_MODULES.addSemanticModule(new BPMNExtensionsSemanticModule());
BPMN_SEMANTIC_MODULES.addSemanticModule(new BPMNDISemanticModule());
}

@Parameter(required = true, defaultValue = "${project.basedir}/src")
private File sourceDir;
Expand Down Expand Up @@ -213,14 +219,9 @@ private void generateProcessModel() throws MojoExecutionException {
}

private Collection<? extends Process> parseProcessFile(Resource r) throws IOException, MojoExecutionException {
SemanticModules semanticModules = new SemanticModules();
semanticModules.addSemanticModule(new BPMNSemanticModule());
semanticModules.addSemanticModule(new BPMNExtensionsSemanticModule());
semanticModules.addSemanticModule(new BPMNDISemanticModule());

try {
XmlProcessReader xmlReader = new XmlProcessReader(
semanticModules,
BPMN_SEMANTIC_MODULES,
Thread.currentThread().getContextClassLoader());
return xmlReader.read(r.getReader());
} catch (SAXException e) {
Expand Down

0 comments on commit 0cf4fb9

Please sign in to comment.