Skip to content

Commit

Permalink
Drop templateDir check
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceCondor committed Jan 16, 2025
1 parent 99cb978 commit 87195a5
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -729,19 +729,16 @@ public void execute() throws MojoExecutionException {
configurator.setApiNameSuffix(apiNameSuffix);
}

String templateDir = null;

if (null != templateDirectory) {
configurator.setTemplateDir(templateDirectory.getAbsolutePath());
templateDir = templateDirectory.getAbsolutePath();
}

if (StringUtils.isNotEmpty(templateResourcePath)) {
if (null != templateDirectory) {
LOGGER.warn("Both templateDirectory and templateResourcePath were configured. templateResourcePath overwrites templateDirectory.");
}
configurator.setTemplateDir(templateResourcePath);
templateDir = templateResourcePath;
}

if (null != engine) {
Expand Down Expand Up @@ -948,12 +945,6 @@ public void execute() throws MojoExecutionException {
}

if(userDefinedTemplateFiles != null && userDefinedTemplateFiles.size() > 0) {

if(templateDir == null) {
LOGGER.error("User defined templates have been defined, but no template directory has been set.");
throw new MojoExecutionException("User defined templates have been defined, but no template directory has been set. Please configure the template directory.");
}

applyUserDefinedTemplateFilesKvpList(userDefinedTemplateFiles, configurator);
}

Expand Down

0 comments on commit 87195a5

Please sign in to comment.