Environments Maven Plugin

Allows for the creation of Environment configurations, which can then be packaged into specific releases.

Лицензия

Лицензия

Категории

Категории

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

Группа

com.github.mikesena.maven.plugins
Идентификатор

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

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

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

0.0.17
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

Environments Maven Plugin
Allows for the creation of Environment configurations, which can then be packaged into specific releases.
Ссылка на сайт

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

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

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

https://github.com/mikesena/environments-maven-plugin.git

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

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

<plugin>
    <groupId>com.github.mikesena.maven.plugins</groupId>
    <artifactId>environments-maven-plugin</artifactId>
    <version>0.0.17</version>
</plugin>

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.apache.maven : maven-core jar 3.0.3
org.apache.maven : maven-plugin-api jar 3.0.3
org.twdata.maven : mojo-executor jar 2.1.0

provided (1)

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

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.11

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

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

environments-maven-plugin

Build Status

A Maven plugin to manage generation of multiple environment configurations and artefacts, using the power of Maven, and without the headaches of hacking the build lifecycle.

Scenarios

  • Build versions for multiple development environments, each with its own configuration
  • Different product versions, such as a standard / deluxe.

The plugin was originally created so that separate deployable packages could be created for test environments and production. This was achieved through this plugin creating multiple environment configurations, during the same build, which were then packaged by the Maven Assembly plugin into individual ZIP releases.

Installation

The plugin is available through Maven central (hosted by Sonatype).

<dependency>
    <groupId>com.github.mikesena.maven.plugins</groupId>
    <artifactId>environments-maven-plugin</artifactId>
    <version>0.0.17</version>
</dependency>

Goals

Currently, only one goal is available / required for the plugin to work.

<executions>
    <execution>
        <phase>generate-sources</phase>
        <goals>
            <goal>create-environment-configurations</goal>
        </goals>
    </execution>
</executions>

Configuration

Required Parameters

Parameter Description
environments List of environments that will be created.
outputDirectory Directory to create the environments.
propertiesDirectory Input directory, containing all the environment property files.
templateDirectory Directory containing the environment template.

Example

<configuration>
    <!-- Files here will be read and used for all environments. -->
    <commonPropertiesDirectory>src/main/properties</commonPropertiesDirectory>
    
    <!-- Environments to create.  Correlate to folders in 'preportiesDirectory'. -->
    <environments>
        <environment>env1</environment>
        <environment>env3</environment>
        <environment>env7</environment>
        <environment>prod</environment>
    </environments>
    
    <!-- Location of the environment configurations. -->
    <propertiesDirectory>src/main/properties/envs</propertiesDirectory>
    
    <!-- Template to use as the base of each environment. -->
    <templateDirectory>src/main/environment-template</templateDirectory>
    
    <!-- Where files can be placed on completion. -->
    <outputDirectory>${project.build.directory}/environments</outputDirectory>
</configuration>

Optional Parameters

Parameter Description Default
commonPropertiesDirectory Directory, containing property files with common properties in them.
enforcePropertiesMustExist Performs a check, so that all environment files can guaranteed to all have the same proprety keys. true
filterOnFilenames Whether directory & file names are filtered (allows files to be renamed based on a property). true
overrideIfExists Whether to override files that already exist when creating an environment. true

Usage Examples

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

Версия
0.0.17
0.0.16