You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2020/02/13 22:11:24 UTC
[maven-filtering] 14/44: start a simple documentation
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to annotated tag maven-filtering-1.0-alpha-1
in repository https://gitbox.apache.org/repos/asf/maven-filtering.git
commit 4d2cb1414a337c7e2c73954fc4b0f47339e554c2
Author: Oliver Lamy <ol...@apache.org>
AuthorDate: Sat Feb 9 23:26:31 2008 +0000
start a simple documentation
git-svn-id: https://svn.apache.org/repos/asf/maven/sandbox/trunk/shared/maven-filtering@620216 13f79535-47bb-0310-9956-ffa450edef68
---
src/site/apt/index.apt | 52 ++++++++++++++++++
src/site/site.xml | 64 ++++++++++++++++++++++
.../DefaultMavenResourcesFilteringTest.java | 4 +-
.../maven-resources-filtering.txt | 3 +-
4 files changed, 121 insertions(+), 2 deletions(-)
diff --git a/src/site/apt/index.apt b/src/site/apt/index.apt
new file mode 100755
index 0000000..5a1354c
--- /dev/null
+++ b/src/site/apt/index.apt
@@ -0,0 +1,52 @@
+ ------
+ Reference
+ ------
+ Olivier Lamy
+ ------
+ 2008-01-01
+ ------
+
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements. See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership. The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License. You may obtain a copy of the License at
+ ~~
+ ~~ http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied. See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+Maven Filtering Component
+
+ This Plexus components has been build with the filtering process coming from the maven-resources-plugin.
+
+ The goal is to provide a common way for all plugins which needs to filtering resources.
+
+* Component MavenResourcesFiltering
+
+ This component will apply filtering on a List of org.apache.maven.model.Resource.
+ The method without the filterWrappers parameter will interpolate the files using the default FileUtils.FilterWrapper.
+
+* Component MavenFileFilter
+
+ This component has a method which returns the default FileUtils.FilterWrapper.
+ This are :
+
+ * interpolation with token ${ } and values from SystemProps, project.properties, filters, project.filters and project.build.filters
+
+ * interpolation with token @ @ and values from SystemProps, project.properties, filters, project.filters and project.build.filters
+
+ * interpolation with token ${ } and values from mavenProject interpolation
+
+ []
+
+ <<NOTE>> : The sentence "values from SystemProps, project.properties, filters, project.filters and project.build.filters"
+ means pairs of key/value will be loaded/overriding with this order. The value for key java.version can be overriding
+ with a property in the maven project (yes crazy but possible).
\ No newline at end of file
diff --git a/src/site/site.xml b/src/site/site.xml
new file mode 100755
index 0000000..4afb631
--- /dev/null
+++ b/src/site/site.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<project>
+ <!-- TODO: Most of the stuff in this file should be inherited from the shared parent -->
+ <!-- TODO: banners, skin, publish date, version should be inherited from Maven itself -->
+ <bannerLeft>
+ <name>${project.name}</name>
+ <src>http://maven.apache.org/images/apache-maven-project-2.png</src>
+ <href>http://maven.apache.org/</href>
+ </bannerLeft>
+ <bannerRight>
+ <src>http://maven.apache.org/images/maven-logo-2.gif</src>
+ </bannerRight>
+ <skin>
+ <groupId>org.apache.maven.skins</groupId>
+ <artifactId>maven-stylus-skin</artifactId>
+ </skin>
+ <publishDate format="dd MMM yyyy" position="left" />
+ <version position="left" />
+ <body>
+ <menu name="Overview">
+ <item name="Reference" href="index.html"/>
+ </menu>
+ <!-- TODO: Link, head, reports should be inherited -->
+ <!-- TODO: use breadcrumbs more structure, links for links, and inherit subprojects as a menu or not at all -->
+ <links>
+ <item name="Apache" href="http://www.apache.org/"/>
+ <item name="Maven 1.x" href="http://maven.apache.org/maven-1.x"/>
+ <item name="Maven 2.x" href="http://maven.apache.org/"/>
+ <item name="Maven 2.x Plugins" href="http://maven.apache.org/plugins/"/>
+ <item name="Continuum" href="http://maven.apache.org/continuum"/>
+ <item name="SCM" href="http://maven.apache.org/scm"/>
+ <item name="Wagon" href="http://maven.apache.org/wagon"/>
+ <item name="JXR" href="http://maven.apache.org/jxr"/>
+ <item name="Doxia" href="http://maven.apache.org/doxia"/>
+ </links>
+ <head>
+ <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
+ </script>
+ <script type="text/javascript">
+ _uacct = "UA-140879-1";
+ urchinTracker();
+ </script>
+ </head>
+ <menu ref="reports" inherit="bottom" />
+ </body>
+</project>
diff --git a/src/test/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFilteringTest.java b/src/test/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFilteringTest.java
index b8d3fce..b956042 100755
--- a/src/test/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFilteringTest.java
+++ b/src/test/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFilteringTest.java
@@ -60,7 +60,8 @@ public class DefaultMavenResourcesFilteringTest
mavenProject.setGroupId( "org.apache" );
Properties projectProperties = new Properties();
- projectProperties.put( "foo", "bar" );
+ projectProperties.put( "foo", "bar" );
+ projectProperties.put( "java.version", "zloug" );
mavenProject.setProperties( projectProperties );
MavenResourcesFiltering mavenResourcesFiltering = (MavenResourcesFiltering) lookup( MavenResourcesFiltering.class
.getName() );
@@ -88,6 +89,7 @@ public class DefaultMavenResourcesFilteringTest
assertEquals( "@@", result.getProperty( "emptyexpression" ) );
assertEquals( "${}", result.getProperty( "emptyexpression2" ) );
+ assertEquals( "zloug", result.getProperty( "javaVersion" ) );
}
public void testNoFiltering()
diff --git a/src/test/units-files/maven-resources-filtering/maven-resources-filtering.txt b/src/test/units-files/maven-resources-filtering/maven-resources-filtering.txt
index 3826b6f..47eaa4e 100755
--- a/src/test/units-files/maven-resources-filtering/maven-resources-filtering.txt
+++ b/src/test/units-files/maven-resources-filtering/maven-resources-filtering.txt
@@ -22,4 +22,5 @@ foo=${foo}
none=none filtered
base=${pom.basedir}
emptyexpression=@@
-emptyexpression2=${}
\ No newline at end of file
+emptyexpression2=${}
+javaVersion=${java.version}
\ No newline at end of file