Code Monkey home page Code Monkey logo

maven-replacer-plugin's Introduction

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

maven-replacer-plugin's People

Contributors

beiliubei avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.