Skip to content

io7m-com/string-template-maven-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

string-template-maven-plugin

Maven Central Maven Central (snapshot) Codecov Java Version

string-template-maven-plugin

JVM Platform Status
OpenJDK (Temurin) Current Linux Build (OpenJDK (Temurin) Current, Linux)
OpenJDK (Temurin) LTS Linux Build (OpenJDK (Temurin) LTS, Linux)
OpenJDK (Temurin) Current Windows Build (OpenJDK (Temurin) Current, Windows)
OpenJDK (Temurin) LTS Windows Build (OpenJDK (Temurin) LTS, Windows)

string-template-maven-plugin

The string-template-maven-plugin package provides a plugin to execute StringTemplate templates during a build.

Usage

An example of generating a PAreasBDTest.java file from a template named PAreasTest in src/main/string-template/PAreasTest.st:

<build>
  <plugins>
...

<plugin>
  <groupId>com.io7m.stmp</groupId>
  <artifactId>string-template-maven-plugin</artifactId>
  <executions>
    <execution>
      <id>generate-area-P-BD</id>
      <phase>generate-sources</phase>
      <goals>
        <goal>renderTemplate</goal>
      </goals>
      <configuration>
        <template>
          <name>PAreasTest</name>
          <inputFile>
            ${project.basedir}/src/main/string-template/PAreasTest.st
          </inputFile>
          <outputFile>
            ${project.build.directory}/generated-sources/string-template/com/io7m/jregions/tests/core/parameterized/PAreasBDTest.java
          </outputFile>
          <properties>
            <scalarType>java.math.BigDecimal</scalarType>
            <scalarGeneratorType>Generator&lt;java.math.BigDecimal&gt;</scalarGeneratorType>
            <areaType>com.io7m.jregions.core.parameterized.areas.PAreaBD</areaType>
            <areaSizeType>com.io7m.jregions.core.parameterized.sizes.PAreaSizeBD</areaSizeType>
            <areaOpsType>com.io7m.jregions.core.parameterized.areas.PAreasBD</areaOpsType>
            <className>PAreasBDTest</className>
            <splitXType>com.io7m.jregions.core.parameterized.areas.PAreaXSplitBD</splitXType>
            <splitYType>com.io7m.jregions.core.parameterized.areas.PAreaYSplitBD</splitYType>
            <splitXYType>com.io7m.jregions.core.parameterized.areas.PAreaXYSplitBD</splitXYType>
            <opClass>PAreasBDTestOps</opClass>
          </properties>
        </template>
      </configuration>
    </execution>
  </executions>
</plugin>

...
  </plugins>
</build>

Languages

  • Java 98.8%
  • CSS 1.2%