Configurator Maven-Plugin

This Maven-Plugin configuring artifacts after its build using templating.

License

License

Categories

Categories

Maven Build Tools config Application Layer Libs Configuration
GroupId

GroupId

biz.paluch.maven.configurator
ArtifactId

ArtifactId

configurator-maven-plugin
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Configurator Maven-Plugin
This Maven-Plugin configuring artifacts after its build using templating.
Source Code Management

Source Code Management

http://github.com/mp911de/configurator-maven-plugin/

Download configurator-maven-plugin

How to add to project

<plugin>
    <groupId>biz.paluch.maven.configurator</groupId>
    <artifactId>configurator-maven-plugin</artifactId>
    <version>1.0.1</version>
</plugin>

Dependencies

compile (9)

Group / Artifact Type Version
org.apache.maven : maven-artifact jar 2.0.9
org.apache.maven : maven-plugin-api jar 2.0.9
org.apache.maven : maven-project jar 2.0.9
org.apache.maven : maven-model jar 2.0.9
org.apache.maven : maven-core jar 2.0.9
org.apache.maven : maven-artifact-manager jar 2.0.9
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.2
com.google.guava : guava jar 14.0.1
commons-io : commons-io jar 2.4

test (5)

Group / Artifact Type Version
org.mockito : mockito-all jar 1.9.5
junit : junit jar 4.11
org.apache.maven.shared : maven-plugin-testing-harness jar 1.1
org.apache.maven.plugin-testing : maven-plugin-testing-tools jar 2.1
org.apache.maven.plugin-testing : maven-plugin-testing-harness jar 2.1

Project Modules

There are no modules declared in this project.

Build Status

Introduction

The configurator-maven-plugin is used to configure a JAR, WAR or EAR file after the build with properties. You define one or more template files (naming pattern .template.) which will be processed. Template variables are replaced by property values.

Example:

Template-File config.template.properties

[email protected]@
[email protected]@

Properties-File production.properties

db.username=mark
db.url=jdbc:mysql://...

will become then

config.properties

username=mark
url=jdbc:mysql://...

This method is intended primarily for Java Web Applications and Java Enterprise Applications which are packaged as WAR or EAR file. As soon as you start packaging and deploying (artifact repository) environment-configured artifacts, the are not portable anymore. With this plugin you are able to create templated artifacts. Just before deployment you finalize the configuration by injecting property values into your WAR/EAR.

All WAR's/JAR's within an EAR/WAR/JAR will be processed (recursive).

See also Maven Site for more details.

Maven Configuration

 <project>
   ...
   <build>
     <!-- To define the plugin version in your parent POM -->
     <pluginManagement>
       <plugins>
         <plugin>
           <groupId>de.paluch.maven.configurator</groupId>
           <artifactId>configurator-maven-plugin</artifactId>
           <version>1.0.1</version>
         </plugin>
         ...
       </plugins>
     </pluginManagement>
     <!-- To use the plugin goals in your POM or parent POM -->
     <plugins>
       <plugin>
         <groupId>de.paluch.maven.configurator</groupId>
         <artifactId>configurator-maven-plugin</artifactId>
         <version>1.0.1</version>
         <configuration>
           <groupId>junit</groupId>
           <artifactId>junit</artifactId>
           <version>4.11</version>
           <propertySources>
             <propertySource>production.properties</propertySource>
           </propertySources>
          </configuration>
       </plugin>
       ...
     </plugins>
   </build>
   ...
 </project>

Goals

  • configurator:configure configures the build file from your current project
  • configurator:configure-artifact configures an arbitrary, external artifact.

License

Versions

Version
1.0.1
1.0