velocity-whitespace-resource-filter

The velocity-whitespace-resource-filter is used in Maven builds to remove whitespace from Velocity Templates. Leading whitespace is removed from each line and a Velocity single line comment (##) is appended to the end of each line - making the output from the template more compact. This is useful when the templates generate output like XML, HTML, or JSON.

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

org.owasp.maven-tools
ArtifactId

ArtifactId

velocity-whitespace-resource-filter
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

velocity-whitespace-resource-filter
The velocity-whitespace-resource-filter is used in Maven builds to remove whitespace from Velocity Templates. Leading whitespace is removed from each line and a Velocity single line comment (##) is appended to the end of each line - making the output from the template more compact. This is useful when the templates generate output like XML, HTML, or JSON.
Project URL

Project URL

http://jeremylong.github.io/velocity-whitespace-resource-filter
Project Organization

Project Organization

OWASP
Source Code Management

Source Code Management

https://github.com/jeremylong/velocity-whitespace-resource-filter

Download velocity-whitespace-resource-filter

How to add to project

<!-- https://jarcasting.com/artifacts/org.owasp.maven-tools/velocity-whitespace-resource-filter/ -->
<dependency>
    <groupId>org.owasp.maven-tools</groupId>
    <artifactId>velocity-whitespace-resource-filter</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.owasp.maven-tools/velocity-whitespace-resource-filter/
implementation 'org.owasp.maven-tools:velocity-whitespace-resource-filter:1.0.0'
// https://jarcasting.com/artifacts/org.owasp.maven-tools/velocity-whitespace-resource-filter/
implementation ("org.owasp.maven-tools:velocity-whitespace-resource-filter:1.0.0")
'org.owasp.maven-tools:velocity-whitespace-resource-filter:jar:1.0.0'
<dependency org="org.owasp.maven-tools" name="velocity-whitespace-resource-filter" rev="1.0.0">
  <artifact name="velocity-whitespace-resource-filter" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.owasp.maven-tools', module='velocity-whitespace-resource-filter', version='1.0.0')
)
libraryDependencies += "org.owasp.maven-tools" % "velocity-whitespace-resource-filter" % "1.0.0"
[org.owasp.maven-tools/velocity-whitespace-resource-filter "1.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.apache.maven.shared : maven-filtering jar 3.1.0

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.hamcrest : hamcrest-core jar 1.3

Project Modules

There are no modules declared in this project.

Build Status Apache 2.0 License

velocity-whitespace-resource-filter

The velocity-whitespace-resource-filter is used in Maven builds to remove whitespace from Velocity Templates. Leading whitespace is removed from each line and a Velocity single line comment (##) is appended to the end of each line - making the output from the template more compact. This is useful when the templates generate output like XML, HTML, or JSON.

Files Processed

The velocity-whitespace-resource-filter only supports the following file extensions: vm, vtl, and vsl. If a different extension is used they will not be processed. Additionally, there is no current way to expand the list of file extensions - pull requests are welcome.

Usage

The following snippet from a standard maven pom.xml shows how to use the velocity-whitespace-resource-filter. The resources to filter must be specified in the resources section and the velocity-whitespace-resource-filter must be defined as a dependency of the `maven-resources-plugin:

<build>
    <resources>
        <resource>
            <directory>src/main/resources</directory>
            <includes>
                <include>**/*.vtl</include>
            </includes>
            <filtering>true</filtering>
        </resource>
    </resources>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <version>3.0.2</version>
            <dependencies>
                <dependency>
                    <groupId>org.owasp.maven-tools</groupId>
                    <artifactId>velocity-whitespace-resource-filter</artifactId>
                    <version>1.0.0</version>
                </dependency>
            </dependencies>
        </plugin>
    </plugins>
</build>

Permission to modify and redistribute is granted under the terms of the Apache 2.0 license. See the LICENSE.txt file for the full license.

Copyright (c) 2018 Jeremy Long. All Rights Reserved.

Versions

Version
1.0.0