Skip to content

Commit a0430df

Browse files
committed
Added a readme
1 parent 1370aff commit a0430df

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
`maven-velocity-plugin` is a [Velocity template](https://velocity.apache.org/) plugin for Maven.
2+
3+
It interprets any template file in `src/main/velocity` (resp. `src/test/velocity`) and outputs the result to the appropriate locations: `*.java` files end up in `target/generated-sources/{main,test}` so that they can be compiled, while other files end up in `target/generated-resources/{main,test}`.
4+
5+
It is licensed under a BSD license.
6+
7+
# Usage
8+
9+
```
10+
<build>
11+
<plugins>
12+
<plugin>
13+
<groupId>com.nativelibs4java</groupId>
14+
<artifactId>maven-velocity-plugin</artifactId>
15+
<version>0.9</version>
16+
<configuration>
17+
<properties>
18+
<foo>bar</foo>
19+
</properties>
20+
</configuration>
21+
</plugin>
22+
...
23+
</plugins>
24+
</build>
25+
```
26+
27+
For a complete example of use of this plugin in production, have a look at BridJ's [source templates](https://github.com/ochafik/BridJ/tree/master/src/main/velocity/) and [test templates](https://github.com/ochafik/BridJ/tree/master/src/test/velocity/).
28+
29+
# Predefined properties
30+
31+
Every project property defined in the POM are reflected as Velocity variables, and the POM itself is accessible through the `pom` property.
32+
33+
There are also a couple of predefined BridJ-specific properties that are available (TODO: remove them?).
34+

0 commit comments

Comments
 (0)