A ready-configured Apache Velocity engine as an injectable component, so a plugin can render a template without setting up Velocity itself.
Maintained, quietly. It is a thin wrapper over Velocity; most changes here are Velocity upgrades.
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-velocity</artifactId>
<version>2.3.0</version>
</dependency>Check the badge above for the current version.
@Inject
VelocityComponent velocityComponent;
VelocityContext context = new VelocityContext();
Template template = velocityComponent.getEngine().getTemplate( "path/to/template.vm" );
StringWriter writer = new StringWriter();
template.merge( context, writer );The default configuration is meant to be customised: provide a VelocityComponentConfigurator
implementation and it will be picked up. It is optional. See the
Velocity configuration reference for what
can be set.
Java 8 or later.
See CONTRIBUTING.md. In short:
mvn verify builds, and run mvn spotless:apply before pushing or CI will fail on formatting.
Please report security vulnerabilities privately — see SECURITY.md, not a public issue.