You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2008/03/24 14:21:53 UTC
svn commit: r640407 [1/2] - in
/maven/plugins/trunk/maven-resources-plugin/src: it/filter/
it/filter/src/main/resources/ site/ site/apt/ site/apt/examples/ site/fml/
test/java/org/apache/maven/plugin/resources/
test/java/org/apache/maven/plugin/resourc...
Author: bentmann
Date: Mon Mar 24 06:21:50 2008
New Revision: 640407
URL: http://svn.apache.org/viewvc?rev=640407&view=rev
Log:
o Added svn:eol-style=native
Modified:
maven/plugins/trunk/maven-resources-plugin/src/it/filter/pom.xml (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/it/filter/src/main/resources/SomeResource.txt (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/encoding.apt (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/filter.apt (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/include-exclude.apt (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/resource-directory.apt (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/site/apt/index.apt (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/site/apt/usage.apt (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/site/fml/faq.fml (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/site/site.xml (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/AbstractPropertyUtilsTest.java (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/AdvancePropertyUtilsTest.java (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/BasicPropertyUtilsTest.java (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/EnhancedPropertyUtilsTest.java (props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/ReflectionPropertiesTest.java (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/ResourcesMojoTest.java (props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/TestResourcesTest.java (props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/stub/MavenProjectBasicStub.java (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/stub/MavenProjectBuildStub.java (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/stub/MavenProjectResourcesStub.java (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/resources/unit/propertiesutils-test/advance.properties (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/resources/unit/propertiesutils-test/advance_validation.properties (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/resources/unit/propertiesutils-test/basic.properties (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/resources/unit/propertiesutils-test/basic_validation.properties (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/resources/unit/propertiesutils-test/enhanced.properties (props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/resources/unit/propertiesutils-test/enhanced_validation.properties (props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/resources/unit/reflectionproperties-test/plugin-config.xml (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/resources/unit/reflectionproperties-test/validation.properties (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/resources/unit/reflectionproperties-test/validation_escapebackslashinpath.properties (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/resources/unit/resources-test/plugin-config-absolute-path.xml (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/resources/unit/resources-test/plugin-config-relative-path.xml (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/resources/unit/resources-test/plugin-config.xml (contents, props changed)
maven/plugins/trunk/maven-resources-plugin/src/test/resources/unit/resources-test/validation.properties (contents, props changed)
Modified: maven/plugins/trunk/maven-resources-plugin/src/it/filter/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/filter/pom.xml?rev=640407&r1=640406&r2=640407&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/filter/pom.xml (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/filter/pom.xml Mon Mar 24 06:21:50 2008
@@ -1,23 +1,23 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
Propchange: maven/plugins/trunk/maven-resources-plugin/src/it/filter/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-resources-plugin/src/it/filter/src/main/resources/SomeResource.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/filter/src/main/resources/SomeResource.txt?rev=640407&r1=640406&r2=640407&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/filter/src/main/resources/SomeResource.txt (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/filter/src/main/resources/SomeResource.txt Mon Mar 24 06:21:50 2008
@@ -1,10 +1,10 @@
-
-test:direct resolution project.version=${project.version}
-test:filter resolution project.version=${filter.token.project.version}
-
-test:filter direct projectProperty=${projectProperty}
-test:filter resolution projectProperty=${filter.token.projectProperty}
-
-test:filter direct profileProperty=${profileProperty}
-test:filter resolution profileProperty=${filter.token.profileProperty}
-
+
+test:direct resolution project.version=${project.version}
+test:filter resolution project.version=${filter.token.project.version}
+
+test:filter direct projectProperty=${projectProperty}
+test:filter resolution projectProperty=${filter.token.projectProperty}
+
+test:filter direct profileProperty=${profileProperty}
+test:filter resolution profileProperty=${filter.token.profileProperty}
+
Propchange: maven/plugins/trunk/maven-resources-plugin/src/it/filter/src/main/resources/SomeResource.txt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/encoding.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/encoding.apt?rev=640407&r1=640406&r2=640407&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/encoding.apt (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/encoding.apt Mon Mar 24 06:21:50 2008
@@ -1,56 +1,56 @@
- ------
- Specifying a character encoding scheme
- ------
- Franz Allan See
- ------
- July 2006
- ------
-
-~~ 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.
-
-~~ NOTE: For help with the syntax of this file, see:
-~~ http://maven.apache.org/guides/mini/guide-apt-format.html
-
-Specifying a character encoding scheme
-
- A character encoding scheme such as ASCII, UTF-8, or UTF-16 can be chosen to be
- used for the reading and writing of files.
-
- For example, if we want to specify that the character encoding scheme be UTF-8,
- we would simply have to modify the pom.
-
-+-----+
-<project>
- ...
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <configuration>
- ...
- <encoding>UTF-8</encoding>
- ...
- </configuration>
- </plugin>
- </plugins>
- ...
- </build>
- ...
-</project>
-+-----+
+ ------
+ Specifying a character encoding scheme
+ ------
+ Franz Allan See
+ ------
+ July 2006
+ ------
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+Specifying a character encoding scheme
+
+ A character encoding scheme such as ASCII, UTF-8, or UTF-16 can be chosen to be
+ used for the reading and writing of files.
+
+ For example, if we want to specify that the character encoding scheme be UTF-8,
+ we would simply have to modify the pom.
+
++-----+
+<project>
+ ...
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <configuration>
+ ...
+ <encoding>UTF-8</encoding>
+ ...
+ </configuration>
+ </plugin>
+ </plugins>
+ ...
+ </build>
+ ...
+</project>
++-----+
Propchange: maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/encoding.apt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/filter.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/filter.apt?rev=640407&r1=640406&r2=640407&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/filter.apt (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/filter.apt Mon Mar 24 06:21:50 2008
@@ -1,169 +1,169 @@
- ------
- Filtering
- ------
- Franz Allan See
- ------
- July 2006
- ------
-
-~~ 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.
-
-~~ NOTE: For help with the syntax of this file, see:
-~~ http://maven.apache.org/guides/mini/guide-apt-format.html
-
-Filtering
-
- Variables can be included in your resources. These variables, denoted by the
- $\{...\} delimiters, can come from the System properties, your project
- properties, from your filter resources and from the command lines.
-
- For example, if we have a resource src/main/resources/hello.txt containing
-
-+-----+
-Hello ${name}
-+-----+
-
- And a pom like this
-
-+-----+
-<project>
- [...]
- <name>My Resources Plugin Practice Project</name>
- [...]
- <build>
- [...]
- <resources>
- [...]
- <resource>
- <directory>src/main/resources</directory>
- </resource>
- [...]
- </resources>
- [...]
- </build>
- [...]
-</project>
-+-----+
-
- Upon calling
-
-+-----+
-mvn resources:resources
-+-----+
-
- This will create a resource output in target/class/hello.txt which contains
- exactly the same.
-
-+-----+
-Hello ${name}
-+-----+
-
- However, if we add a filtering tag to our pom and set it to true such as this
-
-+-----+
- [...]
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- </resource>
- [...]
-+-----+
-
- Our target/class/hello.txt after calling
-
-+-----+
-mvn resources:resources
-+-----+
-
- would be
-
-+-----+
-Hello My Resources Plugin Practice Project
-+-----+
-
- That's because the name variable was replaced by the value of the project's
- name (which was specified
- in the pom).
-
- Moreover, we can also assign values through the command line using the "-D"
- tag. For example, to change the value for the variable name to "world", we can
- simply invoke this command
-
-+-----+
-mvn resources:resources -Dname="world"
-+-----+
-
- And the output in target/class/hello.txt would be
-
-+-----+
-Hello world
-+-----+
-
- Furthermore, we are not limited to use pre-defined project variables. We can
- specify our own variables and their values under the properties tag. For
- example, if we want to change the variable from "name" to "your.name", we can
- do so by adding a "your.name" tag under the "properties" tag.
-
-+-----+
-<project>
- [...]
- <properties>
- <your.name>world</your.name>
- </properties>
- [...]
-</project>
-+-----+
-
- But to organize your project, you may want to put all your variables and their
- values on a separate file so that you will not have to rewrite your pom, or set
- their values all the time with every build. This can be done by adding a
- filter.
-
-+-----+
-<project>
- [...]
- <name>My Resources Plugin Practice Project</name>
- [...]
- <build>
- [...]
- <filters>
- <filter> [a filter property] </filter>
- </filters>
- [...]
- [...]
- </build>
- [...]
-</project>
-+-----+
-
- For example, we can separate "your.name" from pom by specifying a filter, "my
- filter values.properties" containing
-
-+-----+
-your.name = world
-+-----+
-
- and adding that to our pom
-
-+-----+
- [...]
- <filters>
- <filter>my filter values.properties</filter>
- </filters>
- [...]
-+-----+
+ ------
+ Filtering
+ ------
+ Franz Allan See
+ ------
+ July 2006
+ ------
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+Filtering
+
+ Variables can be included in your resources. These variables, denoted by the
+ $\{...\} delimiters, can come from the System properties, your project
+ properties, from your filter resources and from the command lines.
+
+ For example, if we have a resource src/main/resources/hello.txt containing
+
++-----+
+Hello ${name}
++-----+
+
+ And a pom like this
+
++-----+
+<project>
+ [...]
+ <name>My Resources Plugin Practice Project</name>
+ [...]
+ <build>
+ [...]
+ <resources>
+ [...]
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ [...]
+ </resources>
+ [...]
+ </build>
+ [...]
+</project>
++-----+
+
+ Upon calling
+
++-----+
+mvn resources:resources
++-----+
+
+ This will create a resource output in target/class/hello.txt which contains
+ exactly the same.
+
++-----+
+Hello ${name}
++-----+
+
+ However, if we add a filtering tag to our pom and set it to true such as this
+
++-----+
+ [...]
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ [...]
++-----+
+
+ Our target/class/hello.txt after calling
+
++-----+
+mvn resources:resources
++-----+
+
+ would be
+
++-----+
+Hello My Resources Plugin Practice Project
++-----+
+
+ That's because the name variable was replaced by the value of the project's
+ name (which was specified
+ in the pom).
+
+ Moreover, we can also assign values through the command line using the "-D"
+ tag. For example, to change the value for the variable name to "world", we can
+ simply invoke this command
+
++-----+
+mvn resources:resources -Dname="world"
++-----+
+
+ And the output in target/class/hello.txt would be
+
++-----+
+Hello world
++-----+
+
+ Furthermore, we are not limited to use pre-defined project variables. We can
+ specify our own variables and their values under the properties tag. For
+ example, if we want to change the variable from "name" to "your.name", we can
+ do so by adding a "your.name" tag under the "properties" tag.
+
++-----+
+<project>
+ [...]
+ <properties>
+ <your.name>world</your.name>
+ </properties>
+ [...]
+</project>
++-----+
+
+ But to organize your project, you may want to put all your variables and their
+ values on a separate file so that you will not have to rewrite your pom, or set
+ their values all the time with every build. This can be done by adding a
+ filter.
+
++-----+
+<project>
+ [...]
+ <name>My Resources Plugin Practice Project</name>
+ [...]
+ <build>
+ [...]
+ <filters>
+ <filter> [a filter property] </filter>
+ </filters>
+ [...]
+ [...]
+ </build>
+ [...]
+</project>
++-----+
+
+ For example, we can separate "your.name" from pom by specifying a filter, "my
+ filter values.properties" containing
+
++-----+
+your.name = world
++-----+
+
+ and adding that to our pom
+
++-----+
+ [...]
+ <filters>
+ <filter>my filter values.properties</filter>
+ </filters>
+ [...]
++-----+
Propchange: maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/filter.apt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/include-exclude.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/include-exclude.apt?rev=640407&r1=640406&r2=640407&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/include-exclude.apt (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/include-exclude.apt Mon Mar 24 06:21:50 2008
@@ -1,178 +1,178 @@
- ------
- Including and excluding files and directories
- ------
- Franz Allan See
- ------
- July 2006
- ------
-
-~~ 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.
-
-~~ NOTE: For help with the syntax of this file, see:
-~~ http://maven.apache.org/guides/mini/guide-apt-format.html
-
-Including and excluding files and directories
-
- When specifying a resource directory, every file within that directory may not
- be used. Thus, we may have to specify only the files that we want to inlcude or
- specify the files that we want to exclude.
-
- To include a resource, we only need to add an includes tag.
-
-+-----+
-<project>
- [...]
- <name>My Resources Plugin Practice Project</name>
- [...]
- <build>
- [...]
- <resources>
- [...]
- <resource>
- <directory> [your directory] </directory>
- <includes>
- <include> [resource file #1] </include>
- <include> [resource file #2] </include>
- <include> [resource file #3] </include>
- [...]
- <include> [resource file #n] </include>
- </includes>
- </resource>
- [...]
- </resources>
- [...]
- </build>
- [...]
-</project>
-+-----+
-
- And to exclude a resource, we only need to add an excludes tag.
-
-+-----+
-<project>
- [...]
- <name>My Resources Plugin Practice Project</name>
- [...]
- <build>
- [...]
- <resources>
- [...]
- <resource>
- <directory> [your directory] </directory>
- <excludes>
- <exclude> [non-resource file #1] </exclude>
- <exclude> [non-resource file #2] </exclude>
- <exclude> [non-resource file #3] </exclude>
- [...]
- <exclude> [non-resource file #n] </exclude>
- </excludes>
- </resource>
- [...]
- </resources>
- [...]
- </build>
- [...]
-</project>
-+-----+
-
- For example, if we want to include all text and rtf files under our
- src/my-resources directory and in all its subdirectory, we can do the
- following
-
-+-----+
-<project>
- [...]
- <name>My Resources Plugin Practice Project</name>
- [...]
- <build>
- [...]
- <resources>
- [...]
- <resource>
- <directory> src/my-resources </directory>
- <includes>
- <include> **/*.txt </include>
- <include> **/*.rtf </include>
- </includes>
- </resource>
- [...]
- </resources>
- [...]
- </build>
- [...]
-</project>
-+-----+
-
- Also, if we want to include everything except the bitmaps, jpegs, and gifs, we
- can simply exclude them by
-
-+-----+
-<project>
- [...]
- <name>My Resources Plugin Practice Project</name>
- [...]
- <build>
- [...]
- <resources>
- [...]
- <resource>
- <directory> src/my-resources </directory>
- <excludes>
- <exclude> **/*.bmp </exclude>
- <exclude> **/*.jpg </exclude>
- <exclude> **/*.jpeg </exclude>
- <exclude> **/*.gif </exclude>
- </excludes>
- </resource>
- [...]
- </resources>
- [...]
- </build>
- [...]
-</project>
-+-----+
-
- Of course, we can also have both includes and exclude tags. For example, if we
- want to include all text files that does not contain the word "test" in their
- filename
-
-+-----+
-<project>
- [...]
- <name>My Resources Plugin Practice Project</name>
- [...]
- <build>
- [...]
- <resources>
- [...]
- <resource>
- <directory> src/my-resources </directory>
- <includes>
- <include> **/*.txt </include>
- </inclues>
- <excludes>
- <exclude> **/*test*.* </exclude>
- </excludes>
- </resource>
- [...]
- </resources>
- [...]
- </build>
- [...]
-</project>
-+-----+
+ ------
+ Including and excluding files and directories
+ ------
+ Franz Allan See
+ ------
+ July 2006
+ ------
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+Including and excluding files and directories
+
+ When specifying a resource directory, every file within that directory may not
+ be used. Thus, we may have to specify only the files that we want to inlcude or
+ specify the files that we want to exclude.
+
+ To include a resource, we only need to add an includes tag.
+
++-----+
+<project>
+ [...]
+ <name>My Resources Plugin Practice Project</name>
+ [...]
+ <build>
+ [...]
+ <resources>
+ [...]
+ <resource>
+ <directory> [your directory] </directory>
+ <includes>
+ <include> [resource file #1] </include>
+ <include> [resource file #2] </include>
+ <include> [resource file #3] </include>
+ [...]
+ <include> [resource file #n] </include>
+ </includes>
+ </resource>
+ [...]
+ </resources>
+ [...]
+ </build>
+ [...]
+</project>
++-----+
+
+ And to exclude a resource, we only need to add an excludes tag.
+
++-----+
+<project>
+ [...]
+ <name>My Resources Plugin Practice Project</name>
+ [...]
+ <build>
+ [...]
+ <resources>
+ [...]
+ <resource>
+ <directory> [your directory] </directory>
+ <excludes>
+ <exclude> [non-resource file #1] </exclude>
+ <exclude> [non-resource file #2] </exclude>
+ <exclude> [non-resource file #3] </exclude>
+ [...]
+ <exclude> [non-resource file #n] </exclude>
+ </excludes>
+ </resource>
+ [...]
+ </resources>
+ [...]
+ </build>
+ [...]
+</project>
++-----+
+
+ For example, if we want to include all text and rtf files under our
+ src/my-resources directory and in all its subdirectory, we can do the
+ following
+
++-----+
+<project>
+ [...]
+ <name>My Resources Plugin Practice Project</name>
+ [...]
+ <build>
+ [...]
+ <resources>
+ [...]
+ <resource>
+ <directory> src/my-resources </directory>
+ <includes>
+ <include> **/*.txt </include>
+ <include> **/*.rtf </include>
+ </includes>
+ </resource>
+ [...]
+ </resources>
+ [...]
+ </build>
+ [...]
+</project>
++-----+
+
+ Also, if we want to include everything except the bitmaps, jpegs, and gifs, we
+ can simply exclude them by
+
++-----+
+<project>
+ [...]
+ <name>My Resources Plugin Practice Project</name>
+ [...]
+ <build>
+ [...]
+ <resources>
+ [...]
+ <resource>
+ <directory> src/my-resources </directory>
+ <excludes>
+ <exclude> **/*.bmp </exclude>
+ <exclude> **/*.jpg </exclude>
+ <exclude> **/*.jpeg </exclude>
+ <exclude> **/*.gif </exclude>
+ </excludes>
+ </resource>
+ [...]
+ </resources>
+ [...]
+ </build>
+ [...]
+</project>
++-----+
+
+ Of course, we can also have both includes and exclude tags. For example, if we
+ want to include all text files that does not contain the word "test" in their
+ filename
+
++-----+
+<project>
+ [...]
+ <name>My Resources Plugin Practice Project</name>
+ [...]
+ <build>
+ [...]
+ <resources>
+ [...]
+ <resource>
+ <directory> src/my-resources </directory>
+ <includes>
+ <include> **/*.txt </include>
+ </inclues>
+ <excludes>
+ <exclude> **/*test*.* </exclude>
+ </excludes>
+ </resource>
+ [...]
+ </resources>
+ [...]
+ </build>
+ [...]
+</project>
++-----+
Propchange: maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/include-exclude.apt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/resource-directory.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/resource-directory.apt?rev=640407&r1=640406&r2=640407&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/resource-directory.apt (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/resource-directory.apt Mon Mar 24 06:21:50 2008
@@ -1,99 +1,99 @@
- ------
- Specifying resource directories
- ------
- Franz Allan See
- ------
- July 2006
- ------
-
-~~ 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.
-
-~~ NOTE: For help with the syntax of this file, see:
-~~ http://maven.apache.org/guides/mini/guide-apt-format.html
-
-Specifying resource directories
-
- By default, maven will look for your project's resources under
- src/main/resources
-
-+-----+
-Project
-|-- pom.xml
-`-- src
- `-- main
- `-- resources
-+-----+
-
- However, all your resources may not be in src/main/resources. Thus, you'd have
- to specify those directories by adding the following to your pom.
-
-+-----+
-<project>
- [...]
- <build>
- [...]
- <resources>
- <resource>
- <directory> [your folder here] </directory>
- </resource>
- </resources>
- [...]
- </build>
- [...]
-</project>
-+-----+
-
- So if your resources resides in my-resources
-
-+-----+
-Project
-|-- pom.xml
-`-- src
- `-- my-resources
-+-----+
-
- you can specify that director by doing the following
-
-+-----+
- [...]
- <resources>
- <resource>
- <directory>src/my-resources</directory>
- </resource>
- </resources>
- [...]
-+-----+
-
- Furthermore, you can have several directories by adding resource tags
-
-+-----+
- [...]
- <resources>
- <resource>
- <directory>resource1</directory>
- </resource>
- <resource>
- <directory>resource2</directory>
- </resource>
- <resource>
- <directory>resource3</directory>
- </resource>
- </resources>
- [...]
-+-----+
-
+ ------
+ Specifying resource directories
+ ------
+ Franz Allan See
+ ------
+ July 2006
+ ------
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+Specifying resource directories
+
+ By default, maven will look for your project's resources under
+ src/main/resources
+
++-----+
+Project
+|-- pom.xml
+`-- src
+ `-- main
+ `-- resources
++-----+
+
+ However, all your resources may not be in src/main/resources. Thus, you'd have
+ to specify those directories by adding the following to your pom.
+
++-----+
+<project>
+ [...]
+ <build>
+ [...]
+ <resources>
+ <resource>
+ <directory> [your folder here] </directory>
+ </resource>
+ </resources>
+ [...]
+ </build>
+ [...]
+</project>
++-----+
+
+ So if your resources resides in my-resources
+
++-----+
+Project
+|-- pom.xml
+`-- src
+ `-- my-resources
++-----+
+
+ you can specify that director by doing the following
+
++-----+
+ [...]
+ <resources>
+ <resource>
+ <directory>src/my-resources</directory>
+ </resource>
+ </resources>
+ [...]
++-----+
+
+ Furthermore, you can have several directories by adding resource tags
+
++-----+
+ [...]
+ <resources>
+ <resource>
+ <directory>resource1</directory>
+ </resource>
+ <resource>
+ <directory>resource2</directory>
+ </resource>
+ <resource>
+ <directory>resource3</directory>
+ </resource>
+ </resources>
+ [...]
++-----+
+
Propchange: maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/resource-directory.apt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-resources-plugin/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/site/apt/index.apt?rev=640407&r1=640406&r2=640407&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/site/apt/index.apt (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/site/apt/index.apt Mon Mar 24 06:21:50 2008
@@ -1,69 +1,69 @@
- ------
- Introduction
- ------
- Franz Allan See
- ------
- 12 July 2006
- ------
-
-~~ 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.
-
-~~ NOTE: For help with the syntax of this file, see:
-~~ http://maven.apache.org/guides/mini/guide-apt-format.html
-
-Maven 2 Resources Plugin
-
- The Resources Plugin handles the copying of project resources to the output
- directory. Resources come in two: main resources and test resources. The
- difference is that the main resources are the resources associated to the main
- source code while the test resources are that for the test code.
-
- Thus, this allows the separation of resources for the main source code and its
- unit tests.
-
-* Goals Overview
-
- The Resources Plugin has two goals:
-
- * {{{resources-mojo.html}resources:resources}} copies the
- resources for the main source code to the main output directory.
-
- * {{{testResources-mojo.html}resources:testResources}} copies the
- resources for the test source code to the test output directory.
-
-* Usage
-
- Instructions on how to use the Resources Plugin can be found
- {{{usage.html}here}}.
-
-* Examples
-
- The following examples show how to use the Resources Plugin in more advanced
- usecases:
-
- * {{{examples/encoding.html}Specifying a character encoding scheme}}
-
- * {{{examples/resource-directory.html}Specifying resource directories}}
-
- * {{{examples/filter.html}Filtering}}
-
- * {{{examples/include-exclude.html}Including and excluding files and
- directories}}
-
-
-
+ ------
+ Introduction
+ ------
+ Franz Allan See
+ ------
+ 12 July 2006
+ ------
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+Maven 2 Resources Plugin
+
+ The Resources Plugin handles the copying of project resources to the output
+ directory. Resources come in two: main resources and test resources. The
+ difference is that the main resources are the resources associated to the main
+ source code while the test resources are that for the test code.
+
+ Thus, this allows the separation of resources for the main source code and its
+ unit tests.
+
+* Goals Overview
+
+ The Resources Plugin has two goals:
+
+ * {{{resources-mojo.html}resources:resources}} copies the
+ resources for the main source code to the main output directory.
+
+ * {{{testResources-mojo.html}resources:testResources}} copies the
+ resources for the test source code to the test output directory.
+
+* Usage
+
+ Instructions on how to use the Resources Plugin can be found
+ {{{usage.html}here}}.
+
+* Examples
+
+ The following examples show how to use the Resources Plugin in more advanced
+ usecases:
+
+ * {{{examples/encoding.html}Specifying a character encoding scheme}}
+
+ * {{{examples/resource-directory.html}Specifying resource directories}}
+
+ * {{{examples/filter.html}Filtering}}
+
+ * {{{examples/include-exclude.html}Including and excluding files and
+ directories}}
+
+
+
Propchange: maven/plugins/trunk/maven-resources-plugin/src/site/apt/index.apt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-resources-plugin/src/site/apt/usage.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/site/apt/usage.apt?rev=640407&r1=640406&r2=640407&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/site/apt/usage.apt (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/site/apt/usage.apt Mon Mar 24 06:21:50 2008
@@ -1,56 +1,56 @@
- ------
- Usage
- ------
- Franz Allan See
- ------
- 12 July 2006
- ------
-
-~~ 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.
-
-~~ NOTE: For help with the syntax of this file, see:
-~~ http://maven.apache.org/guides/mini/guide-apt-format.html
-
-Usage
-
- The Resources Plugin handles the copying of project resources to the output
- directory. The following examples describe the basic usage of the Plugin.
-
-* Copy resources for the main source code
-
-+-----+
-mvn resources:resources
-+-----+
-
- Upon executing this command, the resources for your main source code would be
- copied to the resources for your main output build. This does not affect the
- resources for your test code.
-
- Moreover, this goal is bounded to the process-resources phase.
-
-* Copy resources for the unit tests
-
-+-----+
-mvn resources:testResources
-+-----+
-
- Like the first goal, this goal copies the resources for your test code to your
- test output build. Also, this does not affect the resources for the main source
- code.
-
- Furthermore, this is bounded to the process-test-resources
+ ------
+ Usage
+ ------
+ Franz Allan See
+ ------
+ 12 July 2006
+ ------
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+Usage
+
+ The Resources Plugin handles the copying of project resources to the output
+ directory. The following examples describe the basic usage of the Plugin.
+
+* Copy resources for the main source code
+
++-----+
+mvn resources:resources
++-----+
+
+ Upon executing this command, the resources for your main source code would be
+ copied to the resources for your main output build. This does not affect the
+ resources for your test code.
+
+ Moreover, this goal is bounded to the process-resources phase.
+
+* Copy resources for the unit tests
+
++-----+
+mvn resources:testResources
++-----+
+
+ Like the first goal, this goal copies the resources for your test code to your
+ test output build. Also, this does not affect the resources for the main source
+ code.
+
+ Furthermore, this is bounded to the process-test-resources
Propchange: maven/plugins/trunk/maven-resources-plugin/src/site/apt/usage.apt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-resources-plugin/src/site/fml/faq.fml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/site/fml/faq.fml?rev=640407&r1=640406&r2=640407&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/site/fml/faq.fml (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/site/fml/faq.fml Mon Mar 24 06:21:50 2008
@@ -1,71 +1,71 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-
-<faqs id="FAQ" title="Frequently Asked Questions">
- <part id="General">
- <faq id="What are resources?">
- <question>
- What are resources?
- </question>
- <answer>
- <p>Resources are non-source code files used by your project. Examples of
- these are properties files, images and xml files</p>
- </answer>
- </faq>
- <faq id="When should I use the resouces plugin's goal outside a lifecycle?">
- <question>
- When should I use the resouces plugin's goal outside a lifecycle?
- </question>
- <answer>
- <p>The maven resource plugin simply copies resources from your source to
- your build output (with the optional filtering). So if that's the only
- operation you are interested in, you can skip the other phases such as
- compilation and testing and simply do mvn
- resources:resources.</p>
- <p>For example, if you just debugged your configuration file and you
- want to manually test it in your container if it works, you can simply
- do mvn resources:resources to produce those configuration files on your
- output thus skipping the other phases which may eat up a huge amount of
- your time.</p>
- </answer>
- </faq>
- <faq id="Do my main resources go to my test resources as well?">
- <question>
- Do my main resources go to my test resources as well?
- </question>
- <answer>
- <p>No. Your main resources and your test resources are separated from
- each other.</p>
- <p>Your test resources should only be used by your tests. Thus, they are
- separated from the main to avoid any side effects that may occur.</p>
- </answer>
- </faq>
- <faq id="What encoding values are allowed?">
- <question>
- What encoding values are allowed?
- </question>
- <answer>
- <p>The Maven Resource Plugin only allows encoding values representing
- the charsets supported by the Java platform, namely US-ASCII,
- ISO-8859-1, UTF-8, UTF-16BE, UTF-16LE, and UTF-16</p>
- </answer>
- </faq>
- </part>
-</faqs>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<faqs id="FAQ" title="Frequently Asked Questions">
+ <part id="General">
+ <faq id="What are resources?">
+ <question>
+ What are resources?
+ </question>
+ <answer>
+ <p>Resources are non-source code files used by your project. Examples of
+ these are properties files, images and xml files</p>
+ </answer>
+ </faq>
+ <faq id="When should I use the resouces plugin's goal outside a lifecycle?">
+ <question>
+ When should I use the resouces plugin's goal outside a lifecycle?
+ </question>
+ <answer>
+ <p>The maven resource plugin simply copies resources from your source to
+ your build output (with the optional filtering). So if that's the only
+ operation you are interested in, you can skip the other phases such as
+ compilation and testing and simply do mvn
+ resources:resources.</p>
+ <p>For example, if you just debugged your configuration file and you
+ want to manually test it in your container if it works, you can simply
+ do mvn resources:resources to produce those configuration files on your
+ output thus skipping the other phases which may eat up a huge amount of
+ your time.</p>
+ </answer>
+ </faq>
+ <faq id="Do my main resources go to my test resources as well?">
+ <question>
+ Do my main resources go to my test resources as well?
+ </question>
+ <answer>
+ <p>No. Your main resources and your test resources are separated from
+ each other.</p>
+ <p>Your test resources should only be used by your tests. Thus, they are
+ separated from the main to avoid any side effects that may occur.</p>
+ </answer>
+ </faq>
+ <faq id="What encoding values are allowed?">
+ <question>
+ What encoding values are allowed?
+ </question>
+ <answer>
+ <p>The Maven Resource Plugin only allows encoding values representing
+ the charsets supported by the Java platform, namely US-ASCII,
+ ISO-8859-1, UTF-8, UTF-16BE, UTF-16LE, and UTF-16</p>
+ </answer>
+ </faq>
+ </part>
+</faqs>
Propchange: maven/plugins/trunk/maven-resources-plugin/src/site/fml/faq.fml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-resources-plugin/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/site/site.xml?rev=640407&r1=640406&r2=640407&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/site/site.xml (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/site/site.xml Mon Mar 24 06:21:50 2008
@@ -1,40 +1,40 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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>
- <body>
- <menu name="Overview">
- <item name="Introduction" href="index.html"/>
- <item name="Goals" href="plugin-info.html"/>
- <item name="Usage" href="usage.html"/>
- <item name="FAQ" href="faq.html"/>
- </menu>
- <menu name="Examples">
- <item name="Specifying a character encoding scheme"
- href="/examples/encoding.html"/>
- <item name="Specifying resource directories"
- href="/examples/resource-directory.html"/>
- <item name="Filtering"
- href="/examples/filter.html"/>
- <item name="Including and excluding files and directories"
- href="/examples/include-exclude.html"/>
- </menu>
- </body>
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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>
+ <body>
+ <menu name="Overview">
+ <item name="Introduction" href="index.html"/>
+ <item name="Goals" href="plugin-info.html"/>
+ <item name="Usage" href="usage.html"/>
+ <item name="FAQ" href="faq.html"/>
+ </menu>
+ <menu name="Examples">
+ <item name="Specifying a character encoding scheme"
+ href="/examples/encoding.html"/>
+ <item name="Specifying resource directories"
+ href="/examples/resource-directory.html"/>
+ <item name="Filtering"
+ href="/examples/filter.html"/>
+ <item name="Including and excluding files and directories"
+ href="/examples/include-exclude.html"/>
+ </menu>
+ </body>
+</project>
Propchange: maven/plugins/trunk/maven-resources-plugin/src/site/site.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/AbstractPropertyUtilsTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/AbstractPropertyUtilsTest.java?rev=640407&r1=640406&r2=640407&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/AbstractPropertyUtilsTest.java (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/AbstractPropertyUtilsTest.java Mon Mar 24 06:21:50 2008
@@ -1,106 +1,106 @@
-package org.apache.maven.plugin.resources;
-
-/*
- * 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.
- */
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Properties;
-
-import org.apache.maven.plugin.testing.AbstractMojoTestCase;
-
-/**
- * Base class for propertyutils test case
- */
-
-public abstract class AbstractPropertyUtilsTest
- extends AbstractMojoTestCase
-{
- protected File propertyFile;
-
- protected File validationFile;
-
- protected Properties validationProp;
-
- protected abstract File getPropertyFile();
-
- protected abstract File getValidationFile();
-
- protected void setUp()
- throws Exception
- {
- super.setUp();
-
- // load data
- propertyFile = getPropertyFile();
- assertNotNull( propertyFile );
-
- validationFile = getValidationFile();
- assertNotNull( validationFile );
-
- loadValidationProperties( validationFile );
- }
-
- protected void tearDown()
- {
-
- }
-
- protected boolean validateProperties( Properties prop )
- {
- boolean bRetVal = false;
-
- Enumeration propKeys = prop.keys();
- String key;
-
- while ( propKeys.hasMoreElements() )
- {
- key = (String) propKeys.nextElement();
- bRetVal = prop.getProperty( key ).equals( validationProp.getProperty( key ) );
- if ( !bRetVal )
- {
- break;
- }
- }
-
- return bRetVal;
- }
-
- /**
- * load the property file for cross checking the
- * values in the processed property file
- *
- * @param validationPropFile
- */
- private void loadValidationProperties( File validationPropFile )
- {
- validationProp = new Properties();
-
- try
- {
- validationProp.load( new FileInputStream( validationPropFile ) );
- }
- catch ( IOException ex )
- {
- // TODO: do error handling
- }
- }
-}
+package org.apache.maven.plugin.resources;
+
+/*
+ * 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.
+ */
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Properties;
+
+import org.apache.maven.plugin.testing.AbstractMojoTestCase;
+
+/**
+ * Base class for propertyutils test case
+ */
+
+public abstract class AbstractPropertyUtilsTest
+ extends AbstractMojoTestCase
+{
+ protected File propertyFile;
+
+ protected File validationFile;
+
+ protected Properties validationProp;
+
+ protected abstract File getPropertyFile();
+
+ protected abstract File getValidationFile();
+
+ protected void setUp()
+ throws Exception
+ {
+ super.setUp();
+
+ // load data
+ propertyFile = getPropertyFile();
+ assertNotNull( propertyFile );
+
+ validationFile = getValidationFile();
+ assertNotNull( validationFile );
+
+ loadValidationProperties( validationFile );
+ }
+
+ protected void tearDown()
+ {
+
+ }
+
+ protected boolean validateProperties( Properties prop )
+ {
+ boolean bRetVal = false;
+
+ Enumeration propKeys = prop.keys();
+ String key;
+
+ while ( propKeys.hasMoreElements() )
+ {
+ key = (String) propKeys.nextElement();
+ bRetVal = prop.getProperty( key ).equals( validationProp.getProperty( key ) );
+ if ( !bRetVal )
+ {
+ break;
+ }
+ }
+
+ return bRetVal;
+ }
+
+ /**
+ * load the property file for cross checking the
+ * values in the processed property file
+ *
+ * @param validationPropFile
+ */
+ private void loadValidationProperties( File validationPropFile )
+ {
+ validationProp = new Properties();
+
+ try
+ {
+ validationProp.load( new FileInputStream( validationPropFile ) );
+ }
+ catch ( IOException ex )
+ {
+ // TODO: do error handling
+ }
+ }
+}
Propchange: maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/AbstractPropertyUtilsTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/AdvancePropertyUtilsTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/AdvancePropertyUtilsTest.java?rev=640407&r1=640406&r2=640407&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/AdvancePropertyUtilsTest.java (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/AdvancePropertyUtilsTest.java Mon Mar 24 06:21:50 2008
@@ -1,119 +1,119 @@
-package org.apache.maven.plugin.resources;
-
-/*
- * 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.
- */
-
-import java.io.File;
-import java.util.Properties;
-
-public class AdvancePropertyUtilsTest
- extends AbstractPropertyUtilsTest
-{
- final static protected String propFileName = "/target/test-classes/unit/propertiesutils-test/advance.properties";
-
- final static protected String validationFileName =
- "/target/test-classes/unit/propertiesutils-test/advance_validation.properties";
-
- protected File getPropertyFile()
- {
-
- File propFile = new File( getBasedir(), propFileName );
-
- if ( !propFile.exists() )
- {
- propFile = null;
- }
-
- return propFile;
- }
-
- protected File getValidationFile()
- {
-
- File validationFile = new File( getBasedir(), validationFileName );
-
- if ( !validationFile.exists() )
- {
- validationFile = null;
- }
-
- return validationFile;
- }
-
- /**
- * load property test case can be adjusted by modifying the advance.properties and
- * advance_validation.properties
- *
- * @throws Exception
- */
- public void testAdvanceLoadProperty_FF()
- throws Exception
- {
- Properties prop;
- boolean throwsException = false;
-
- try
- {
- prop = PropertyUtils.loadPropertyFile( propertyFile, false, false );
- }
- catch ( Exception ex )
- {
- prop = null;
- throwsException = true;
- }
-
- assertFalse( throwsException );
- assertNotNull( prop );
- assertTrue( validateProperties( prop ) );
-
- }
-
- /**
- * load property test case can be adjusted by modifying the advance.properties and
- * advance_validation properties
- *
- * @throws Exception
- */
- public void testAdvanceLoadProperty_TF()
- throws Exception
- {
- Properties prop = PropertyUtils.loadPropertyFile( propertyFile, true, false );
-
- assertNotNull( prop );
- assertTrue( validateProperties( prop ) );
- }
-
- /**
- * load property test case can be adjusted by modifying the advance.properties and
- * advance_validation properties
- *
- * @throws Exception
- */
- public void testAdvanceLoadProperty_TT()
- throws Exception
- {
- Properties prop = PropertyUtils.loadPropertyFile( propertyFile, true, true );
-
- // add system properties to our
- // validation table
- validationProp.putAll( System.getProperties() );
- assertNotNull( prop );
- assertTrue( validateProperties( prop ) );
- }
-}
+package org.apache.maven.plugin.resources;
+
+/*
+ * 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.
+ */
+
+import java.io.File;
+import java.util.Properties;
+
+public class AdvancePropertyUtilsTest
+ extends AbstractPropertyUtilsTest
+{
+ final static protected String propFileName = "/target/test-classes/unit/propertiesutils-test/advance.properties";
+
+ final static protected String validationFileName =
+ "/target/test-classes/unit/propertiesutils-test/advance_validation.properties";
+
+ protected File getPropertyFile()
+ {
+
+ File propFile = new File( getBasedir(), propFileName );
+
+ if ( !propFile.exists() )
+ {
+ propFile = null;
+ }
+
+ return propFile;
+ }
+
+ protected File getValidationFile()
+ {
+
+ File validationFile = new File( getBasedir(), validationFileName );
+
+ if ( !validationFile.exists() )
+ {
+ validationFile = null;
+ }
+
+ return validationFile;
+ }
+
+ /**
+ * load property test case can be adjusted by modifying the advance.properties and
+ * advance_validation.properties
+ *
+ * @throws Exception
+ */
+ public void testAdvanceLoadProperty_FF()
+ throws Exception
+ {
+ Properties prop;
+ boolean throwsException = false;
+
+ try
+ {
+ prop = PropertyUtils.loadPropertyFile( propertyFile, false, false );
+ }
+ catch ( Exception ex )
+ {
+ prop = null;
+ throwsException = true;
+ }
+
+ assertFalse( throwsException );
+ assertNotNull( prop );
+ assertTrue( validateProperties( prop ) );
+
+ }
+
+ /**
+ * load property test case can be adjusted by modifying the advance.properties and
+ * advance_validation properties
+ *
+ * @throws Exception
+ */
+ public void testAdvanceLoadProperty_TF()
+ throws Exception
+ {
+ Properties prop = PropertyUtils.loadPropertyFile( propertyFile, true, false );
+
+ assertNotNull( prop );
+ assertTrue( validateProperties( prop ) );
+ }
+
+ /**
+ * load property test case can be adjusted by modifying the advance.properties and
+ * advance_validation properties
+ *
+ * @throws Exception
+ */
+ public void testAdvanceLoadProperty_TT()
+ throws Exception
+ {
+ Properties prop = PropertyUtils.loadPropertyFile( propertyFile, true, true );
+
+ // add system properties to our
+ // validation table
+ validationProp.putAll( System.getProperties() );
+ assertNotNull( prop );
+ assertTrue( validateProperties( prop ) );
+ }
+}
Propchange: maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/AdvancePropertyUtilsTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/BasicPropertyUtilsTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/BasicPropertyUtilsTest.java?rev=640407&r1=640406&r2=640407&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/BasicPropertyUtilsTest.java (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/BasicPropertyUtilsTest.java Mon Mar 24 06:21:50 2008
@@ -1,141 +1,141 @@
-package org.apache.maven.plugin.resources;
-
-/*
- * 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.
- */
-
-import java.io.File;
-import java.util.Properties;
-
-public class BasicPropertyUtilsTest
- extends AbstractPropertyUtilsTest
-{
- final static protected String validationFileName =
- "/target/test-classes/unit/propertiesutils-test/basic_validation.properties";
-
- final static protected String propFileName = "/target/test-classes/unit/propertiesutils-test/basic.properties";
-
- protected File getPropertyFile()
- {
- File propFile = new File( getBasedir(), propFileName );
-
- if ( !propFile.exists() )
- {
- propFile = null;
- }
-
- return propFile;
- }
-
- protected File getValidationFile()
- {
- File validationFile = new File( getBasedir(), validationFileName );
-
- if ( !validationFile.exists() )
- {
- validationFile = null;
- }
-
- return validationFile;
- }
-
- /**
- * load property test case can be adjusted by modifying the basic.properties and
- * basic_validation properties
- *
- * @throws Exception
- */
- public void testBasicLoadProperty_FF()
- throws Exception
- {
- Properties prop = PropertyUtils.loadPropertyFile( propertyFile, false, false );
-
- assertNotNull( prop );
- assertTrue( validateProperties( prop ) );
- }
-
- /**
- * load property test case can be adjusted by modifying the basic.properties and
- * basic_validation properties
- *
- * @throws Exception
- */
- public void testBasicLoadProperty_TF()
- throws Exception
- {
- Properties prop = PropertyUtils.loadPropertyFile( propertyFile, true, false );
-
- assertNotNull( prop );
- assertTrue( validateProperties( prop ) );
- }
-
- /**
- * load property test case can be adjusted by modifying the basic.properties and
- * basic_validation properties
- *
- * @throws Exception
- */
- public void testBasicLoadProperty_TT()
- throws Exception
- {
- Properties prop = PropertyUtils.loadPropertyFile( propertyFile, true, true );
-
- validationProp.putAll( System.getProperties() );
- assertNotNull( prop );
- assertTrue( validateProperties( prop ) );
- }
-
- /**
- * load property test case can be adjusted by modifying the basic.properties and
- * basic_validation properties
- *
- * @throws Exception
- */
- public void testNonExistentProperty()
- throws Exception
- {
- Properties prop = PropertyUtils.loadPropertyFile( propertyFile, true, true );
-
- validationProp.putAll( System.getProperties() );
- assertNotNull( prop );
- assertNull( prop.getProperty( "does_not_exist" ) );
- }
-
- /**
- * load property test case can be adjusted by modifying the basic.properties and
- * basic_validation properties
- *
- * @throws Exception
- */
- public void testException()
- throws Exception
- {
- boolean failed = false;
-
- try
- {
- Properties prop = PropertyUtils.loadPropertyFile( new File( "NON_EXISTENT_FILE" ), true, true );
- }
- catch ( Exception ex )
- {
- failed = true;
- }
-
- assertTrue( failed );
- }
-}
+package org.apache.maven.plugin.resources;
+
+/*
+ * 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.
+ */
+
+import java.io.File;
+import java.util.Properties;
+
+public class BasicPropertyUtilsTest
+ extends AbstractPropertyUtilsTest
+{
+ final static protected String validationFileName =
+ "/target/test-classes/unit/propertiesutils-test/basic_validation.properties";
+
+ final static protected String propFileName = "/target/test-classes/unit/propertiesutils-test/basic.properties";
+
+ protected File getPropertyFile()
+ {
+ File propFile = new File( getBasedir(), propFileName );
+
+ if ( !propFile.exists() )
+ {
+ propFile = null;
+ }
+
+ return propFile;
+ }
+
+ protected File getValidationFile()
+ {
+ File validationFile = new File( getBasedir(), validationFileName );
+
+ if ( !validationFile.exists() )
+ {
+ validationFile = null;
+ }
+
+ return validationFile;
+ }
+
+ /**
+ * load property test case can be adjusted by modifying the basic.properties and
+ * basic_validation properties
+ *
+ * @throws Exception
+ */
+ public void testBasicLoadProperty_FF()
+ throws Exception
+ {
+ Properties prop = PropertyUtils.loadPropertyFile( propertyFile, false, false );
+
+ assertNotNull( prop );
+ assertTrue( validateProperties( prop ) );
+ }
+
+ /**
+ * load property test case can be adjusted by modifying the basic.properties and
+ * basic_validation properties
+ *
+ * @throws Exception
+ */
+ public void testBasicLoadProperty_TF()
+ throws Exception
+ {
+ Properties prop = PropertyUtils.loadPropertyFile( propertyFile, true, false );
+
+ assertNotNull( prop );
+ assertTrue( validateProperties( prop ) );
+ }
+
+ /**
+ * load property test case can be adjusted by modifying the basic.properties and
+ * basic_validation properties
+ *
+ * @throws Exception
+ */
+ public void testBasicLoadProperty_TT()
+ throws Exception
+ {
+ Properties prop = PropertyUtils.loadPropertyFile( propertyFile, true, true );
+
+ validationProp.putAll( System.getProperties() );
+ assertNotNull( prop );
+ assertTrue( validateProperties( prop ) );
+ }
+
+ /**
+ * load property test case can be adjusted by modifying the basic.properties and
+ * basic_validation properties
+ *
+ * @throws Exception
+ */
+ public void testNonExistentProperty()
+ throws Exception
+ {
+ Properties prop = PropertyUtils.loadPropertyFile( propertyFile, true, true );
+
+ validationProp.putAll( System.getProperties() );
+ assertNotNull( prop );
+ assertNull( prop.getProperty( "does_not_exist" ) );
+ }
+
+ /**
+ * load property test case can be adjusted by modifying the basic.properties and
+ * basic_validation properties
+ *
+ * @throws Exception
+ */
+ public void testException()
+ throws Exception
+ {
+ boolean failed = false;
+
+ try
+ {
+ Properties prop = PropertyUtils.loadPropertyFile( new File( "NON_EXISTENT_FILE" ), true, true );
+ }
+ catch ( Exception ex )
+ {
+ failed = true;
+ }
+
+ assertTrue( failed );
+ }
+}
Propchange: maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/BasicPropertyUtilsTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/EnhancedPropertyUtilsTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/ReflectionPropertiesTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/ReflectionPropertiesTest.java?rev=640407&r1=640406&r2=640407&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/ReflectionPropertiesTest.java (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/ReflectionPropertiesTest.java Mon Mar 24 06:21:50 2008
@@ -1,80 +1,80 @@
-package org.apache.maven.plugin.resources;
-
-/*
- * 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.
- */
-
-import org.apache.maven.plugin.resources.stub.MavenProjectBasicStub;
-import org.apache.maven.plugin.testing.AbstractMojoTestCase;
-
-public class ReflectionPropertiesTest
- extends AbstractMojoTestCase
-{
- // data
- final static protected String pomFilePath = "/target/test-classes/unit/reflectionproperties-test/plugin-config.xml";
-
-
- protected void setUp()
- throws Exception
- {
- super.setUp();
- }
-
- protected void tearDown()
- throws Exception
- {
-
- }
-
- public void testGet_escapeBackslashCharacterInPath()
- throws Exception
- {
- // setup data
- MavenProjectBasicStub project = new MavenProjectBasicStub( "escapeBackSlashCharacterInPath" );
-
- // set dummy value
- project.setDescription( "c:\\\\org\\apache\\test" );
-
- ReflectionProperties reflectProp = new ReflectionProperties( project, true );
-
- // project property to be verified
- String reflectPropValue = (String) reflectProp.get( "description" );
-
- // expected value is c\:\\\\org\\apache\\test
- assertTrue( reflectPropValue.equals( "c\\:\\\\\\\\org\\\\apache\\\\test" ) );
- }
-
- public void testGet_dontEscapeBackslashCharacterInPath()
- throws Exception
- {
- // setup data
- MavenProjectBasicStub project = new MavenProjectBasicStub( "dontEscapeBackSlashCharacterInPath" );
-
- // set dummy value
- project.setDescription( "c:\\\\org\\apache\\test" );
-
- // project property to be verified
- ReflectionProperties reflectProp = new ReflectionProperties( project, false );
-
- // project property to be verified
- String reflectPropValue = (String) reflectProp.get( "description" );
-
- // expected value is c:\\org\apache\test
- assertTrue( reflectPropValue.equals( "c:\\\\org\\apache\\test" ) );
- }
-}
+package org.apache.maven.plugin.resources;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.plugin.resources.stub.MavenProjectBasicStub;
+import org.apache.maven.plugin.testing.AbstractMojoTestCase;
+
+public class ReflectionPropertiesTest
+ extends AbstractMojoTestCase
+{
+ // data
+ final static protected String pomFilePath = "/target/test-classes/unit/reflectionproperties-test/plugin-config.xml";
+
+
+ protected void setUp()
+ throws Exception
+ {
+ super.setUp();
+ }
+
+ protected void tearDown()
+ throws Exception
+ {
+
+ }
+
+ public void testGet_escapeBackslashCharacterInPath()
+ throws Exception
+ {
+ // setup data
+ MavenProjectBasicStub project = new MavenProjectBasicStub( "escapeBackSlashCharacterInPath" );
+
+ // set dummy value
+ project.setDescription( "c:\\\\org\\apache\\test" );
+
+ ReflectionProperties reflectProp = new ReflectionProperties( project, true );
+
+ // project property to be verified
+ String reflectPropValue = (String) reflectProp.get( "description" );
+
+ // expected value is c\:\\\\org\\apache\\test
+ assertTrue( reflectPropValue.equals( "c\\:\\\\\\\\org\\\\apache\\\\test" ) );
+ }
+
+ public void testGet_dontEscapeBackslashCharacterInPath()
+ throws Exception
+ {
+ // setup data
+ MavenProjectBasicStub project = new MavenProjectBasicStub( "dontEscapeBackSlashCharacterInPath" );
+
+ // set dummy value
+ project.setDescription( "c:\\\\org\\apache\\test" );
+
+ // project property to be verified
+ ReflectionProperties reflectProp = new ReflectionProperties( project, false );
+
+ // project property to be verified
+ String reflectPropValue = (String) reflectProp.get( "description" );
+
+ // expected value is c:\\org\apache\test
+ assertTrue( reflectPropValue.equals( "c:\\\\org\\apache\\test" ) );
+ }
+}
Propchange: maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/ReflectionPropertiesTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/ResourcesMojoTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/TestResourcesTest.java
------------------------------------------------------------------------------
svn:eol-style = native