-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
StringTemplate allows loading templates from the classpath which is useful because I can bundle them in a jar and add that as a dependency to the plugin invocation. E.g.:
<groupId>com.webguys</groupId>
<artifactId>string-template-maven-plugin</artifactId>
<version>1.1</version>
<dependencies>
<dependency>
<groupId>foo.bar</groupId>
<artifactId>templates</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
<configuration>
<templates>
<template>
<directory>foo/bar/templates/</directory>
<name>MyAweseomeTemplate</name>
...
</template>
</templates>
<configuration>However, StringTemplate uses either the context classloader or the classloader used for loading stringtemplate, and this requires that the directory entry above is a non-absolute resource path (i.e. no leading slash). However the stringtemplate plugin takes that to mean a relative directory which it expands without checking whether that actually exists.
Ideally, the plugin would check if the expanded directory exists, and if not, leave the value unmodified.
Metadata
Metadata
Assignees
Labels
No labels