Read Files Maven Plugin

Reads File into Maven Properties

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

org.honton.chas
ArtifactId

ArtifactId

readfiles-maven-plugin
Last Version

Last Version

0.0.1
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Read Files Maven Plugin
Reads File into Maven Properties
Project URL

Project URL

https://github.com/chonton/readfiles-maven-plugin
Source Code Management

Source Code Management

https://github.com/chonton/readfiles-maven-plugin

Download readfiles-maven-plugin

How to add to project

<plugin>
    <groupId>org.honton.chas</groupId>
    <artifactId>readfiles-maven-plugin</artifactId>
    <version>0.0.1</version>
</plugin>

Dependencies

compile (1)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 3.0

provided (1)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.2

Project Modules

There are no modules declared in this project.

readfiles-maven-plugin

Read files into maven properties.

Mojo details at plugin info

Just one goal: readfiles sets maven properties to the contents of files. Each file is read fully and the contents are set to maven properties of the same name as the files.

Parameter Default Description
files The list of files to read
encoding ${project.build.sourceEncoding} The character encoding of the file (UTF-8 if not specified)
prefix Prefix each property name with this value
skip ${readfiles.skip} Skip executing the plugin

Typical use:

  <build>
    <plugins>

      <plugin>
        <groupId>org.honton.chas</groupId>
        <artifactId>readfiles-maven-plugin</artifactId>
        <version>0.0.1</version>
        <executions>
          <execution>
            <id>configurations</id>
            <goals>
              <goal>readfiles</goal>
            </goals>
            <configuration>
              <files>
                <!-- set application.json property -->
                <file>${basedir}/src/main/resources/application.json</file>
                <!-- set environment.conf property -->
                <file>${basedir}/src/main/resources/environment.conf</file>
              </files>
            </configuration>
          </execution>
          <execution>
            <id>index.html</id>
            <goals>
              <goal>readfiles</goal>
            </goals>
            <configuration>
              <encoding>iso-8859-1</encoding>
              <prefix>page.</prefix>
              <files>
                <!-- set page.index.html property -->
                <file>${basedir}/src/main/resources/index.html</file>
              </files>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

Versions

Version
0.0.1