Freemarker Maven Plugin

Maven Plugin for using the FreeMarker template engine in builds

Лицензия

Лицензия

Категории

Категории

Maven Компиляция и сборка
Группа

Группа

de.steffendingel
Идентификатор

Идентификатор

freemarker-maven-plugin
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

Freemarker Maven Plugin
Maven Plugin for using the FreeMarker template engine in builds
Ссылка на сайт

Ссылка на сайт

https://github.com/sdingel/freemarker-maven-plugin
Система контроля версий

Система контроля версий

https://github.com/sdingel/freemarker-maven-plugin

Скачать freemarker-maven-plugin

Как подключить последнюю версию

<plugin>
    <groupId>de.steffendingel</groupId>
    <artifactId>freemarker-maven-plugin</artifactId>
    <version>1.0.0</version>
</plugin>

Зависимости

compile (5)

Идентификатор библиотеки Тип Версия
org.apache.maven : maven-plugin-api jar 3.6.3
org.apache.maven.shared : file-management jar 3.0.0
javax.json : javax.json-api jar 1.1
org.glassfish : javax.json jar 1.1
org.freemarker : freemarker jar 2.3.30

provided (1)

Идентификатор библиотеки Тип Версия
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.6.0

Модули Проекта

Данный проект не имеет модулей.

FreeMarker Maven Plugin

GitHub Workflow Status (branch) Maven Central GitHub

Maven Plugin for using the FreeMarker template engine in builds

Usage

To use the plugin, place the following plugin element into your pom.xml under project/build/plugins (adjust the configuration element to your needs, see below):

<project>

    <build>
    
        <plugins>
        
            <plugin>
                <groupId>de.steffendingel</groupId>
                <artifactId>freemarker-maven-plugin</artifactId>
                <version>1.0.0</version>
                <executions>
                    <execution>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>freemarker</goal>
                        </goals>
                        <configuration>
                            <templateDirectory>${project.basedir}/src/main/freemarker</templateDirectory>
                            <templateName>simple-template.ftl</templateName>
                            <inputFiles>
                                <directory>${project.basedir}/src/main/model</directory>
                            </inputFiles>
                            <outputDirectory>${project.build.directory}/html</outputDirectory>
                            <outputExtension>html</outputExtension>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>

    </build>

</project>

Currently, the plugin supports only one goal freemarker:freemarker which applies a FreeMarker template to a set of JSON input files, writing one output file for each input file. By default, this goal binds to the Maven lifecylce phase generate-resources.

The goal supports the following configuration parameters:

  • templateDirectory (optional, default is ${project.basedir}/src/main/freemarker): Directory where the FreeMarker templates are located.
  • templateName (required): Name of the FreeMarker template file (including the extension).
  • inputFiles (required): Set of JSON input files (models) for FreeMarker. The path of each file relative to the base directory of the file set is used to determine the output file path.
  • outputDirectory (required): Directory to write the output files to. The output files are written in the same structure as the input files are found in the inputFiles file set.
  • outputExtension (required): File extension of the output file (without the dot).

Версии библиотеки

Версия
1.0.0