You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2008/02/10 00:26:33 UTC

svn commit: r620216 - in /maven/sandbox/trunk/shared/maven-filtering/src: site/ site/apt/ test/java/org/apache/maven/shared/filtering/ test/units-files/maven-resources-filtering/

Author: olamy
Date: Sat Feb  9 15:26:31 2008
New Revision: 620216

URL: http://svn.apache.org/viewvc?rev=620216&view=rev
Log:
start a simple documentation

Added:
    maven/sandbox/trunk/shared/maven-filtering/src/site/
    maven/sandbox/trunk/shared/maven-filtering/src/site/apt/
    maven/sandbox/trunk/shared/maven-filtering/src/site/apt/index.apt   (with props)
    maven/sandbox/trunk/shared/maven-filtering/src/site/site.xml   (with props)
Modified:
    maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFilteringTest.java
    maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/maven-resources-filtering.txt

Added: maven/sandbox/trunk/shared/maven-filtering/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-filtering/src/site/apt/index.apt?rev=620216&view=auto
==============================================================================
--- maven/sandbox/trunk/shared/maven-filtering/src/site/apt/index.apt (added)
+++ maven/sandbox/trunk/shared/maven-filtering/src/site/apt/index.apt Sat Feb  9 15:26:31 2008
@@ -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

Propchange: maven/sandbox/trunk/shared/maven-filtering/src/site/apt/index.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/shared/maven-filtering/src/site/apt/index.apt
------------------------------------------------------------------------------
    svn:executable = *

Propchange: maven/sandbox/trunk/shared/maven-filtering/src/site/apt/index.apt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/sandbox/trunk/shared/maven-filtering/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-filtering/src/site/site.xml?rev=620216&view=auto
==============================================================================
--- maven/sandbox/trunk/shared/maven-filtering/src/site/site.xml (added)
+++ maven/sandbox/trunk/shared/maven-filtering/src/site/site.xml Sat Feb  9 15:26:31 2008
@@ -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>

Propchange: maven/sandbox/trunk/shared/maven-filtering/src/site/site.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/shared/maven-filtering/src/site/site.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: maven/sandbox/trunk/shared/maven-filtering/src/site/site.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFilteringTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFilteringTest.java?rev=620216&r1=620215&r2=620216&view=diff
==============================================================================
--- maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFilteringTest.java (original)
+++ maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFilteringTest.java Sat Feb  9 15:26:31 2008
@@ -60,7 +60,8 @@
         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 @@
         
         assertEquals( "@@", result.getProperty( "emptyexpression" ) );
         assertEquals( "${}", result.getProperty( "emptyexpression2" ) );
+        assertEquals( "zloug", result.getProperty( "javaVersion" ) );
     }
     
     public void testNoFiltering()

Modified: maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/maven-resources-filtering.txt
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/maven-resources-filtering.txt?rev=620216&r1=620215&r2=620216&view=diff
==============================================================================
--- maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/maven-resources-filtering.txt (original)
+++ maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/maven-resources-filtering.txt Sat Feb  9 15:26:31 2008
@@ -22,4 +22,5 @@
 none=none filtered
 base=${pom.basedir}
 emptyexpression=@@
-emptyexpression2=${}
\ No newline at end of file
+emptyexpression2=${}
+javaVersion=${java.version}
\ No newline at end of file