maven-replacer-plugin Maven Mojo

Maven plugin to replace tokens in a given file with a value

Лицензия

Лицензия

Группа

Группа

com.github.iarellano
Идентификатор

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

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

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

1.6.0
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

maven-replacer-plugin Maven Mojo
Maven plugin to replace tokens in a given file with a value
Ссылка на сайт

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

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

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

https://github.com/iarellano/maven-replacer-plugin

Скачать replacer

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

<plugin>
    <groupId>com.github.iarellano</groupId>
    <artifactId>replacer</artifactId>
    <version>1.6.0</version>
</plugin>

Зависимости

compile (7)

Идентификатор библиотеки Тип Версия
org.apache.maven : maven-plugin-api jar 3.0.3
org.apache.ant : ant jar 1.8.2
commons-lang : commons-lang jar 2.6
commons-io : commons-io jar 2.1
xerces : xercesImpl jar 2.8.0
com.jayway.jsonpath : json-path jar 2.3.0
com.google.code.gson : gson jar 2.8.4

test (3)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.10
org.mockito : mockito-all jar 1.8.5
org.hamcrest : hamcrest-all jar 1.1

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

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

maven-replacer-plugin

based on http://code.google.com/p/maven-replacer-plugin

maven-replacer-plugin

Overview

添加了多文件替换的支持,再configure中添加了files 和 outputFiles标签。

Content

Compile & Package

mvn clean -Dmaven.test.skip=true compile assembly:assembly

Install

mvn install:install-file -Dfile=target/replacer-1.6.0.jar -DgroupId=com.google.code.maven-replacer-plugin -DartifactId=replacer -Dversion=1.6.0 -Dpackaging=jar

Useage in pom.xml

<plugin>
	<groupId>com.google.code.maven-replacer-plugin</groupId>
	<artifactId>replacer</artifactId>
	<version>${replacer.version}</version>
	<executions>
		<execution>
			<phase>process-sources</phase>
			<goals>
				<goal>replace</goal>
			</goals>
		</execution>
	</executions>
	<configuration>
		<files>
			<file>${host.template.file}</file>
			<file>${sckey.template.file}</file>
		</files>
		<outputFiles>
			<outputFile>${host.file}</outputFile>
			<outputFile>${sckey.file}</outputFile>
		</outputFiles>
		<replacements>
			<replacement>
				<token>@hosturl@</token>
				<value>http://github.com</value>
			</replacement>
			<replacement>
				<token>@imageurl@</token>
				<value>http://image.xxx.com</value>
			</replacement>
		</replacements>
	</configuration>
</plugin>

Run

mvn com.google.code.maven-replacer-plugin:replacer:replace

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

Версия
1.6.0