Added support for resource filtering. Note: It's not fully working yet but shouldn't impact anything.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113491 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
vmassol
2003-06-13 12:24:36 +00:00
parent 06e10bd102
commit fb4145161b
6 changed files with 110 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
maven.log
target
lib
velocity.log

View File

@@ -0,0 +1,8 @@
<project xmlns:j="jelly:core" xmlns:ant="jelly:ant">
<preGoal name="java:jar-resources">
<echo>Creating filters...</echo>
<ant:filter token="testFilter" value="it worked!"/>
</preGoal>
</project>

View File

@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<!-- the version of maven's project object model -->
<pomVersion>3</pomVersion>
<!-- a unique name for this project -->
<id>maven-examples-simple-filtering</id>
<!-- a short but descriptive name for the project -->
<name>Simple Filtering</name>
<!-- The version of the project under development, e.g.
1.1, 1.2, 2.0-dev -->
<currentVersion>1.0-SNAPSHOT</currentVersion>
<!-- details about the organization that 'owns' the project -->
<organization>
<name>Apache Software Foundation</name>
<url>http://jakarta.apache.org/</url>
</organization>
<!-- the year the project started -->
<inceptionYear>2002</inceptionYear>
<!-- the top level of java packages that this project defines
e.g. if your project contains the packages
com.mycompany.accounts.reports, com.mycompany.accounts.reports
and com.mycompany.accounts.utils, the package would be
'com.mycompany.accounts' -->
<package>org.apache.maven.examples.simplefiltering</package>
<!-- a short description of what the project does -->
<shortDescription>A simple project showing filtering of resources</shortDescription>
<!-- the project home page -->
<url>http://maven.apache.org/</url>
<!-- the version control repository and http url for online access
the connection element has the form:
scm:<system>:<system specific connection string> -->
<repository>
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven</connection>
<url>http://cvs.apache.org/viewcvs/maven/</url>
</repository>
<!-- any mailing lists for the project -->
<mailingLists/>
<!-- who the developers are for the project -->
<developers />
<!-- jar files the project is dependent on -->
<dependencies/>
<!-- build information for the project -->
<build>
<sourceDirectory>src/java</sourceDirectory>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/conf</directory>
<includes>
<include>test.properties</include>
</includes>
</resource>
<resource>
<directory>src/conf</directory>
<includes>
<include>test-nofilter.properties</include>
</includes>
</resource>
</resources>
</build>
</project>

View File

@@ -0,0 +1 @@
# A simple config file that should not be filtered

View File

@@ -0,0 +1,3 @@
# A simple config file with an Ant filter
test.property = @testFilter@

View File

@@ -0,0 +1,15 @@
package org.apache.maven.examples.simplejava;
/**
* A really simple java class
* @author dIon
*/
public class SimpleJava {
/**
* Print a message
* @param args unused
*/
public static void main(String[] args) {
System.out.println("Hello from Maven's SimpleFiltering");
}
}