Skip to content

About

Filters sources into generated-sources so filtering does not touch the originals

Topics

Resources

Contributing

Security policy

Stars

18 stars

Watchers

13 watching

Forks

Latest commit

 

History

240 Commits

Folders and files

Repository files navigation

Templating Maven Plugin

Apache License, Version 2.0, January 2004 Maven Central GitHub CI

The Templating Maven Plugin copies the files of a template directory to an output directory while filtering them, and adds the output directory as a source root. Use it to put values such as POM properties into Java source code, for example into annotation constants. It requires Maven 3.9.0 or later and Java 8 or later.

Put the templates in src/main/java-templates (or src/test/java-templates for test sources) and bind the goals:

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>templating-maven-plugin</artifactId>
  <version><!-- latest release --></version>
  <executions>
    <execution>
      <id>filter-src</id>
      <goals>
        <goal>filter-sources</goal>
      </goals>
    </execution>
  </executions>
</plugin>

The usage guide and the goal parameters are on the plugin site. See AGENTS.md for build, test and pull request conventions.

Releasing

  • Make sure gpg-agent is running.
  • Execute mvn -B release:prepare release:perform

For publishing the site do the following:

cd target/checkout
mvn verify site site:stage scm-publish:publish-scm

About

Filters sources into generated-sources so filtering does not touch the originals

Topics

Resources

Contributing

Security policy

Stars

18 stars

Watchers

13 watching

Forks

Releases

Used by

Contributors

Languages