Skip to content

internetitem/write-properties-file-maven-plugin

Repository files navigation

write-properties-file-maven-plugin

Maven plugin to write Properties Files

Example Usage

      <plugin>
        <groupId>com.internetitem</groupId>
        <artifactId>write-properties-file-maven-plugin</artifactId>
        <version>2.0.0</version>
        <executions>
          <execution>
            <id>one</id>
            <phase>compile</phase>
            <goals>
                <goal>write-properties-file</goal>
            </goals>
            <configuration>
              <filename>test.properties</filename>
              <properties>
                <property>
                  <name>one</name>
                  <value>1</value>
                </property>
                <property>
                  <name>artifactId</name>
                  <value>My Artifact ID is ${project.artifactId}</value>
                </property>
              </properties>
            </configuration>
          </execution>
        </executions>
      </plugin>

Configuration

  • outputDirectory (optional) - defaults to ${project.build.outputDirectory} (i.e. target/classes)
  • filename (required)
  • properties (required) - one or more <property> elements, each of which must contain a <name> and <value>. Values may use other Maven properties for interpolation (see example)
  • comment (optional) - comment at the top of the properties file, defaults to "Generated by write-property-file Maven plugin", and may also be set to an empty string
  • createDirectory (optional) - defaults to true, whether to create the outputDirectory if it does not already exist

About

Maven plugin to write Properties Files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages