- * A component to work with Velocity templates from within plugins. - *
- * You will need to reference the velocity component as a parameter - * in your plugin. Like this: - *
- * /** - * * Velocity Component - * * @component - * */ - * private VelocityComponent velocity; - *- * - * @author Joakim Erdfelt - * - */ -@Deprecated -public class VelocityTemplate { - private String templateDirectory; - - private Log log; - - private VelocityComponent velocity; - - public VelocityTemplate(VelocityComponent velocityComponent, String templateBaseDirectory) { - this.velocity = velocityComponent; - this.templateDirectory = templateBaseDirectory; - } - - public String getTemplateDirectory() { - return templateDirectory; - } - - public VelocityComponent getVelocity() { - return velocity; - } - - /** - * Using a specified Velocity Template and provided context, create the outputFilename. - * - * @param outputFilename the file to be generated. - * @param template the velocity template to use - * @param context the velocity context map - * @throws VelocityException if the template was not found or any other Velocity exception - * @throws MojoExecutionException if merging the velocity template failed - * @throws IOException if there was an error writing to the output file - */ - public void generate(String outputFilename, String template, Context context) - throws VelocityException, MojoExecutionException, IOException { - - File outputFile = new File(outputFilename); - if (!outputFile.getParentFile().exists()) { - outputFile.getParentFile().mkdirs(); - } - - try (Writer writer = new OutputStreamWriter(new FileOutputStream(outputFile), StandardCharsets.UTF_8)) { - getVelocity().getEngine().mergeTemplate(templateDirectory + "/" + template, context, writer); - } catch (ResourceNotFoundException e) { - throw new ResourceNotFoundException("Template not found: " + templateDirectory + "/" + template, e); - } catch (RuntimeException e) { - throw new MojoExecutionException(e.getMessage(), e); - } - } - - public void setTemplateDirectory(String templateDirectory) { - this.templateDirectory = templateDirectory; - } - - public void setVelocity(VelocityComponent velocity) { - this.velocity = velocity; - } - - public Log getLog() { - if (this.log == null) { - this.log = new SystemStreamLog(); - } - return log; - } - - public void setLog(Log log) { - this.log = log; - } -} diff --git a/src/main/resources/org/apache/maven/plugins/checkstyle/checkstyle-rss.vm b/src/main/resources/org/apache/maven/plugins/checkstyle/checkstyle-rss.vm deleted file mode 100644 index 77c908d7..00000000 --- a/src/main/resources/org/apache/maven/plugins/checkstyle/checkstyle-rss.vm +++ /dev/null @@ -1,74 +0,0 @@ - - -
Click here for the full Checkstyle report.
- -Files | -I | -W | -E | -
---|---|---|---|
- $filename - | -- $results.getSeverityCount(${key}, $levelInfo) - | -- $results.getSeverityCount(${key}, $levelWarning) - | -- $results.getSeverityCount(${key}, $levelError) - | -