Author: dennisl Date: Fri Sep 5 13:25:20 2008 New Revision: 692530 URL: http://svn.apache.org/viewvc?rev=692530&view=rev Log: o Fix typos and improve the presentation.
Modified: maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/encoding.apt maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/filter.apt maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/include-exclude.apt maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/resource-directory.apt maven/plugins/trunk/maven-resources-plugin/src/site/apt/index.apt maven/plugins/trunk/maven-resources-plugin/src/site/apt/usage.apt maven/plugins/trunk/maven-resources-plugin/src/site/fml/faq.fml 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=692530&r1=692529&r2=692530&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 Fri Sep 5 13:25:20 2008 @@ -3,7 +3,7 @@ ------ Franz Allan See ------ - July 2006 + 2008-09-05 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one @@ -28,11 +28,11 @@ Specifying a character encoding scheme - A character encoding scheme such as ASCII, UTF-8, or UTF-16 can be chosen to be + 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. + For example, if we want to specify that the character encoding scheme be <<<UTF-8>>>, + we would simply have to modify the POM. +-----+ <project> @@ -49,7 +49,7 @@ </configuration> </plugin> </plugins> - ... + ... </build> ... </project> 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=692530&r1=692529&r2=692530&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 Fri Sep 5 13:25:20 2008 @@ -3,7 +3,7 @@ ------ Franz Allan See ------ - July 2006 + 2008-09-05 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one @@ -30,7 +30,7 @@ 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. + properties, from your filter resources and from the command line. For example, if we have a resource <<<src/main/resources/hello.txt>>> containing @@ -42,21 +42,20 @@ +-----+ <project> - [...] + ... <name>My Resources Plugin Practice Project</name> - [...] + ... <build> - [...] + ... <resources> - [...] <resource> <directory>src/main/resources</directory> </resource> - [...] + ... </resources> - [...] + ... </build> - [...] + ... </project> +-----+ @@ -67,21 +66,21 @@ +-----+ This will create a resource output in <<<target/classes/hello.txt>>> which contains - exactly the same. + exactly the same text. +-----+ Hello ${name} +-----+ - However, if we add a <<<\<filtering\>>>> tag to our POM and set it to <<<true>>> such as this + However, if we add a <<<\<filtering\>>>> tag to our POM and set it to <<<true>>> like this: +-----+ - [...] + ... <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> - [...] + ... +-----+ Our <<<target/classes/hello.txt>>> after calling @@ -100,8 +99,8 @@ 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 + option. For example, to change the value for the variable <<<name>>> to "world", we can + simply invoke this command: +-----+ mvn resources:resources -Dname="world" @@ -114,44 +113,43 @@ +-----+ 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 + specify our own variables and their values in the <<<\<properties\>>>> element. 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. + do so by adding a <<<\<your.name\>>>> element within the <<<\<properties\>>>> element. +-----+ <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 + values in 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 file <<<my - filter values.properties>>> containing + For example, we can separate "your.name" from the POM by specifying a filter file + <<<my-filter-values.properties>>> containing: +-----+ your.name = world @@ -160,11 +158,11 @@ and adding that to our POM +-----+ - [...] + ... <filters> - <filter>my filter values.properties</filter> + <filter>my-filter-values.properties</filter> </filters> - [...] + ... +-----+ <<Warning:>> Do not filter files with binary content like images! This will most likely result in corrupt output. If @@ -194,7 +192,7 @@ </resource> ... </resources> - ... + ... </build> ... </project> 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=692530&r1=692529&r2=692530&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 Fri Sep 5 13:25:20 2008 @@ -3,7 +3,7 @@ ------ Franz Allan See ------ - July 2006 + 2008-09-05 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one @@ -29,80 +29,77 @@ 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 + be used. Thus, we may have to specify only the files that we want to include or specify the files that we want to exclude. - To include a resource, we only need to add an includes tag. + To include a resource, we only need to add an <<<\<includes\>>>> element. +-----+ <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. + And to exclude a resource, we only need to add an <<<\<excludes\>>>> element. +-----+ <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 + For example, if we want to include all text and RTF files under our + <<<src/my-resources>>> directory and in all its subdirectories, we can do the + following: +-----+ <project> - [...] + ... <name>My Resources Plugin Practice Project</name> - [...] + ... <build> - [...] + ... <resources> - [...] <resource> <directory> src/my-resources </directory> <includes> @@ -110,26 +107,25 @@ <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 + can simply exclude them by: +-----+ <project> - [...] + ... <name>My Resources Plugin Practice Project</name> - [...] + ... <build> - [...] + ... <resources> - [...] <resource> <directory> src/my-resources </directory> <excludes> @@ -139,27 +135,26 @@ <exclude> **/*.gif </exclude> </excludes> </resource> - [...] + ... </resources> - [...] + ... </build> - [...] + ... </project> +-----+ - Of course, we can also have both includes and exclude tags. For example, if we + Of course, we can also have both <<<\<includes\>>>> and <<<\<excludes\>>>> elements. For example, if we want to include all text files that does not contain the word "test" in their - filename + filename. +-----+ <project> - [...] + ... <name>My Resources Plugin Practice Project</name> - [...] + ... <build> - [...] + ... <resources> - [...] <resource> <directory> src/my-resources </directory> <includes> @@ -169,10 +164,10 @@ <exclude> **/*test*.* </exclude> </excludes> </resource> - [...] + ... </resources> - [...] + ... </build> - [...] + ... </project> +-----+ 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=692530&r1=692529&r2=692530&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 Fri Sep 5 13:25:20 2008 @@ -3,7 +3,7 @@ ------ Franz Allan See ------ - July 2006 + 2008-09-05 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one @@ -28,8 +28,8 @@ Specifying resource directories - By default, maven will look for your project's resources under - src/main/resources + By default, Maven will look for your project's resources under + <<<src/main/resources>>>. +-----+ Project @@ -39,26 +39,26 @@ `-- 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. + 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 + So if your resources resides in <<<src/my-resources>>> +-----+ Project @@ -67,22 +67,22 @@ `-- my-resources +-----+ - you can specify that director by doing the following + you can specify that directory by doing the following: +-----+ - [...] + ... <resources> <resource> <directory>src/my-resources</directory> </resource> </resources> - [...] + ... +-----+ - Furthermore, you can have several directories by adding resource tags + Furthermore, you can have several directories by adding multiple <<<\<resource\>>>> elements: +-----+ - [...] + ... <resources> <resource> <directory>resource1</directory> @@ -94,6 +94,5 @@ <directory>resource3</directory> </resource> </resources> - [...] + ... +-----+ - 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=692530&r1=692529&r2=692530&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 Fri Sep 5 13:25:20 2008 @@ -3,7 +3,7 @@ ------ Franz Allan See ------ - 12 July 2006 + 2008-09-05 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one @@ -29,9 +29,9 @@ Maven 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 + directory. There are two different kinds of resources: 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. + source code while the test resources are associated to the test source code. Thus, this allows the separation of resources for the main source code and its unit tests. @@ -79,6 +79,3 @@ * {{{examples/include-exclude.html}Including and excluding files and directories}} - - - 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=692530&r1=692529&r2=692530&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 Fri Sep 5 13:25:20 2008 @@ -3,7 +3,7 @@ ------ Franz Allan See ------ - 12 July 2006 + 2008-09-05 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one @@ -37,11 +37,11 @@ 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 + Upon executing this command, the resources for your main source code will be + copied to your main build output directory. This does not affect the resources for your test code. - Moreover, this goal is bounded to the process-resources phase. + Moreover, this goal is bound to the <<<process-resources>>> phase. * Copy resources for the unit tests @@ -49,8 +49,8 @@ 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 + Like the first goal this goal copies resources, but this time for your test source code to your + test build output directory. Also, this does not affect the resources for the main source code. - Furthermore, this is bounded to the process-test-resources + Furthermore, this is bound to the <<<process-test-resources>>> phase. 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=692530&r1=692529&r2=692530&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 Fri Sep 5 13:25:20 2008 @@ -27,22 +27,28 @@ </question> <answer> <p>Resources are non-source code files used by your project. Examples of - these are properties files, images and xml files</p> + 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? + When should I use the Resources 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 + <p>The Maven Resource Plugin simply copies resources from your source to + your build output (with 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> + compilation and testing and simply do</p> + + <source>mvn resources:resources</source> + <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 + do</p> + + <source>mvn resources:resources</source> + + <p>This will produce those configuration files on your output thus skipping the other phases which may eat up a huge amount of your time.</p> </answer> @@ -54,6 +60,7 @@ <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> @@ -64,8 +71,8 @@ </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> + the charsets supported by the Java platform, namely <code>US-ASCII</code>, + <code>ISO-8859-1</code>, <code>UTF-8</code>, <code>UTF-16BE</code>, <code>UTF-16LE</code> and <code>UTF-16</code>.</p> </answer> </faq> </part>