Modified: maven/website/content/faq-unoffical.html
==============================================================================
--- maven/website/content/faq-unoffical.html (original)
+++ maven/website/content/faq-unoffical.html Sun May 12 07:42:36 2024
@@ -2,14 +2,14 @@
 
 
 <!--
- | Generated by Apache Maven Doxia Site Renderer 2.0.0-M18 from 
content/markdown/faq-unoffical.md at 2024-05-11
+ | Generated by Apache Maven Doxia Site Renderer 2.0.0-M10 from 
content/markdown/faq-unoffical.md at 2024-05-12
  | Rendered using Apache Maven Fluido Skin 2.0.0-M6
 -->
 <html xmlns="http://www.w3.org/1999/xhtml"; lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1" />
-    <meta name="generator" content="Apache Maven Doxia Site Renderer 
2.0.0-M18" />
+    <meta name="generator" content="Apache Maven Doxia Site Renderer 
2.0.0-M10" />
     <title>Maven</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-2.0.0-M6.min.css" />
     <link rel="stylesheet" href="./css/site.css" />
@@ -37,10 +37,8 @@
     <div class="container-fluid">
       <header>
         <div id="banner">
-          <div class="pull-left"><a href="https://www.apache.org/"; 
id="bannerLeft"><h1>Apache Maven Site</h1>
-</a></div>
-          <div class="pull-right"><a href="./" id="bannerRight"><h1>$esc.xml( 
$banner.name )</h1>
-</a></div>
+          <div class="pull-left"><a href="https://www.apache.org/"; 
id="bannerLeft"><img src="images/apache-maven-project.png"  alt="Apache Maven 
Site" style="" /></a></div>
+          <div class="pull-right"><a href="./" id="bannerRight"><img 
src="images/maven-logo-black-on-white.png"  alt="" style="" /></a></div>
           <div class="clear"><hr/></div>
         </div>
 
@@ -50,7 +48,7 @@
       <li><a href="index.html" title="Maven">Maven</a><span 
class="divider">/</span></li>
 
     <li class="active ">Maven <a 
href="https://github.com/apache/maven-site/tree/master/content/markdown/faq-unoffical.md";><img
 src="./images/accessories-text-editor.png" title="Edit" /></a></li>
-        <li id="publishDate" class="pull-right"><span class="divider">|</span> 
Last Published: 2024-05-11</li>
+        <li id="publishDate" class="pull-right"><span class="divider">|</span> 
Last Published: 2024-05-12</li>
         <li class="pull-right"><span class="divider">|</span>
 <a href="scm.html" title="Get Sources">Get Sources</a></li>
         <li class="pull-right"><a href="download.cgi" 
title="Download">Download</a></li>
@@ -149,8 +147,1613 @@ under the License.
 -->
 <p><em>NOTE:</em> <em>This page contains drafts of user contributed FAQ 
entries. The content you see here might not be fully fool-proof or might not 
comply with the best practices promoted by Maven. What is only guaranteed is 
that they have worked once for some members. It is best to treat these items as 
&#x201c;works in progress&#x201d; until they have been reviewed and promoted to 
the main Maven documentation site.</em></p>
 <p>Please follow the format that is being used because it will help in our 
automated extraction of material which can then be incorporated into the main 
site.</p>
-<p>This page serves as a collection of questions <em>with</em> answers. If you 
have a frequently asked question that doesn't yet have an answer, please list 
that question on [the other page](FAQs].</p><section><a 
id="Answered_Questions_.28Index.29"></a>
-<h1>Answered Questions (Index)</h1><section>
+<p>This page serves as a collection of questions <em>with</em> answers. If you 
have a frequently asked question that doesn't yet have an answer, please list 
that question on [the other page](FAQs].</p><section>
+<h1>Answered Questions (Index)</h1><section><section>
+<h3>Reports &amp; Site Docs</h3>
+<p>[How do I merge a list of configuration items in a parent POM with those in 
a child POM?](#How do I merge a list of configuration items in a parent POM 
with those in a child POM?)
+[Why do I not get an index.html page generated for my project website?](#Why 
do I not get an index.html page generated for my project website?)
+[How do I include/exclude the other modules in the navigation menu in the 
parent site?](#How do I include/exclude the other modules in the navigation 
menu in the parent site?)
+[How do I create a report that does not require Doxia's Sink interface?](#How 
do I create a report that does not require Doxia's Sink interface?)
+[How do I generate Maven plug-in sites, with pages that include an overview of 
the goals and parameters for each plug-in?](#How do I generate Maven plug-in 
sites, with pages that include an overview of the goals and parameters for each 
plug-in?)
+[Is there a site.xml DTD?](#Is there a site.xml DTD?)
+[How do I integrate static (x)html into a Maven site?](#How do I integrate 
static (x)html into a Maven site?)
+[Where do I configure report plug-ins, like javadoc?](#Where do I configure 
report plug-ins, like javadoc?)
+[Is there a way to get Maven to report the number of compile errors 
found?](#Is there a way to get Maven to report the number of compile errors 
found?)
+[How do I add a description to the welcome page of the generated site when I 
execute mvn site?](#How do I add a description to the welcome page of the 
generated site when I execute mvn site?]
+[Which part in pom.xml the javadoc plugin should be configured?](#Which part 
in pom.xml the javadoc plugin should be configured?]</p></section><section>
+<h3>Eclipse</h3>
+<p>[How do I specify which output directories the Eclipse plugin puts into the 
.classpath file?](#How do I specify which output directories the Eclipse plugin 
puts into the .classpath file?]
+[Where can I get the Maven plugin for Eclipse?](#Where can I get the Maven 
plugin for Eclipse?]
+[I issued- mvn -Declipse.downloadSources=true eclipse eclipse goal. It created 
.classpath and .project for both modules, and in my local repository it 
downloaded sources Ho do I access them in eclipse?](#I issued- mvn 
-Declipse.downloadSources=true eclipse eclipse goal. It created .classpath and 
.project for both modules, and in my local repository it downloaded sources Ho 
do I access them in eclipse?]
+[Is it possible that if I do mvn eclipse eclipse goal that my project would 
get disconnected from the subversion repository?](#Is it possible that if I do 
mvn eclipse eclipse goal that my project would get disconnected from the 
subversion repository?]
+[Does it matter if the project's directory name is not the same as the 
artifactId?](#Does it matter if the project's directory name is not the same as 
the artifactId?]</p></section><section>
+<h3>Plugins</h3>
+<p>[How do I resolve the &quot; &lt; plugin name &gt; does not exist or no 
valid version &quot; error?](#no-valid-version]
+[How do I list available plugins?](#How do I list available plugins?]
+[How do I get a plug-in's dependencies from a Mojo?](#How do I get a plug-in's 
dependencies from a Mojo?]
+[How do I locate a required plug-in?](#How do I locate a required plug-in?]
+[How do I determine what version of a plugin I am using?](#How do I determine 
what version of a plugin I am using?]
+[How do I use SNAPSHOT versions of plug-ins?](#How do I use SNAPSHOT versions 
of plug-ins?]
+[I've just created a maven plugin. Is there a sample plugin integration test I 
can use?](#I've just created a maven plugin. Is there a sample plugin 
integration test I can use?]
+[The snapshot version of the plugin is not updated in the snapshot repo, What 
should I do to update my copy of the plugin?](#The snapshot version of the 
plugin is not updated in the snapshot repo, What should I do to update my copy 
of the plugin?]
+[How to list all goals available for a certain plugin?](#How to list all goals 
available for a certain plugin?]
+[What does the &#x2018;You cannot have two plugin executions with the same (or 
missing) <code>&lt;id/&gt;</code> elements&#x2019; message mean?](#What does 
the &#x2018;You cannot have two plugin executions with the same (or missing) 
<code>&lt;id/&gt;</code> elements&#x2019; message mean?]
+[#How do I execute the assembly plugin with different configurations]
+[Where is the plugin-registry.xml?](#Where is the plugin-registry.xml?]
+[How do I know which phase a plug-in is associated with?](#How do I know which 
phase a plug-in is associated with?]</p></section><section>
+<h3>POM</h3>
+<p>[#How do I install a file in my local repository along with a generic POM]
+[How do I install a file in my local repository along with my customized 
POM?](#How do I install a file in my local repository along with my customized 
POM?]
+[Does the v4.0.0 POM include a &lt; versions/ &gt; element?](#Does the v4.0.0 
POM include a &lt; versions/ &gt; element?]
+[How do I read the version from the pom.xml and then using Java display the 
version on my application?](#How do I read the version from the pom.xml and 
then using Java display the version on my application?]
+[How do I determine which POM contains missing transitive dependency?](#How do 
I determine which POM contains missing transitive dependency?]
+[Does a POM inherit its resources?](#Does a POM inherit its resources?]
+[Is it possible to specify multiple(s) in a POM at a greater depth than 1 
level?](#Is it possible to specify multiple(s) in a POM at a greater depth than 
1 level?]
+[Is there a way to read and examine the contents of a pom.xml file from inside 
an application?](#Is there a way to read and examine the contents of a pom.xml 
file from inside an application?]
+[Is there a way to use the current date in the POM?](#Is there a way to use 
the current date in the POM?]
+[Where are the Maven XSD schemas?](#Where are the Maven XSD schemas?]
+[Where can I find a complete list of properties available in the 
pom?](MavenPropertiesGuide]</p></section><section>
+<h3>Dependencies</h3>
+<p>[How to make a war artifact as a dependency?](#How to make a war artifact 
as a dependency?]
+[Can I disable transitive dependencies?](#Can I disable transitive 
dependencies?]
+[Is there a preferred way to communicate dependencies in documentation?](#Is 
there a preferred way to communicate dependencies in documentation?]
+[Are there any recommendations on how to handle dependencies, which aren't 
always required?](#Are there any recommendations on how to handle dependencies, 
which aren't always required?]
+[How do I determine my project's transitive dependencies, and if needed, 
exclude a particular  transitive dependency?](#How do I determine my project's 
transitive dependencies, and if needed, exclude a particular  transitive 
dependency?]
+[If two versions of the same dependency are at the same depth, how do you know 
or predict which version will be used?](#If two versions of the same dependency 
are at the same depth, how do you know or predict which version will be 
used?]</p></section><section>
+<h3>Inheritance</h3>
+<p>[How can I have a child project not inherit a goal (like install) from the 
parent?](#How can I have a child project not inherit a goal (like install) from 
the parent?]
+[What is Maven's order of inheritance?](#What is Maven's order of inheritance?]
+[How do I specify that all web modules will inherit the group's common files 
from a parent web module?](#How do I specify that all web modules will inherit 
the group's common files from a parent web module?]</p></section><section>
+<h3>Repository</h3>
+<p>[How do I prevent verification warnings with custom repositories?](#How do 
I prevent verification warnings with custom repositories?]
+[How do I access artifacts if Ibiblio is down?](#How do I access artifacts if 
Ibiblio is down?]
+[How do I specify my remote repo in Maven?](#How do I specify my remote repo 
in Maven?]
+[How do I install artifacts to a remote repository?](#How do I install 
artifacts to a remote repository?]
+[#Repository precedence]
+[#List of available maven mirrors.]
+[How do I change the default remote repository?](#How do I change the default 
remote repository?]
+[How to remove the artifact in the local repository?](#How to remove the 
artifact in the local repository?]
+[What is the purpose of remote repository (other than ibiblio)?](#What is the 
purpose of remote repository (other than ibiblio)?]</p></section><section>
+<h3>Errors</h3>
+<p>[#Why do I get java.lang.NoClassDefFoundError: 
org/codehaus/classworlds/Launcher when I try to execute Maven?]
+[What does the &#x201c;ERROR Cannot override read-only parameter &lt; 
parameter_name&gt;&#x201d; message, when running mean?](#What does the 
&#x201c;ERROR Cannot override read-only parameter &lt; 
parameter_name&gt;&#x201d; message, when running mean?]
+[What does the FATAL ERROR with the message *&#x2018;Class 
org.apache.commons.logging.impl.Jdk14Logger does not implement Log&#x2019;* 
when using the maven-checkstyle-plugin mean?](#What does the FATAL ERROR with 
the message <em>&#x2018;Class org.apache.commons.logging.impl.Jdk14Logger does 
not implement Log&#x2019;</em> when using the maven-checkstyle-plugin mean?]
+[Unsupported Protocol Error when deploying a 3rd party jar. What should I 
do?](#Unsupported Protocol Error when deploying a 3rd party jar. What should I 
do?]
+[I have my web.xml in my customed directory layout for my webapp, but why am I 
getting the error &#x201c;Deployment descriptor &lt; Path &gt;\WEB-INF\web.xml 
does not exist&#x201d;?](#I have my web.xml in my customed directory layout for 
my webapp, but why am I getting the error &#x201c;Deployment descriptor &lt; 
Path &gt;\WEB-INF\web.xml does not exist&#x201d;?]
+[How can I stop this &#x201c;WARNING While downloading 
artifactId-artifactId-version This artifact has been relocated to 
groupId-artifactId-version&#x201d;?](#How can I stop this &#x201c;WARNING While 
downloading artifactId-artifactId-version This artifact has been relocated to 
groupId-artifactId-version&#x201d;?]</p></section><section>
+<h3>Maven Comparisons</h3>
+<p>[What is the difference between Maven and Ivy?](#What is the difference 
between Maven and Ivy?]</p></section><section>
+<h3>Ant</h3>
+<p>[How can I use Ant tasks in Maven?](#How can I use Ant tasks in Maven?]
+[How do I run an ant task twice, against two different phases?](#How do I run 
an ant task twice, against two different phases?]
+[Can I define the antrun plug-in to be executed on demand?](#Can I define the 
antrun plug-in to be executed on demand?]
+[How do I generate sources with the antrun plug-in?](#How do I generate 
sources with the antrun plug-in?]
+[How do I setup the classpath of my antrun plugin to use the classpath from 
maven?](#How do I setup the classpath of my antrun plugin to use the classpath 
from maven?]</p></section><section>
+<h3>Mojo</h3>
+<p>[How do I get the project's sources from a Mojo?](#How do I get the 
project's sources from a Mojo?]
+[How do I properly populate variables, when extending a mojo from another 
plugin?](#How do I properly populate variables, when extending a mojo from 
another plugin?]
+[How do I determine the stale resources in a Mojo to avoid reprocessing 
them?](#How do I determine the stale resources in a Mojo to avoid reprocessing 
them?]
+[How do I create a command line parameter (i.e., -Dname=value ) in my 
mojo?](#How do I create a command line parameter (i.e., -Dname=value ) in my 
mojo?]
+[What does aggregator mean in mojo?](#What does aggregator mean in mojo?]
+[What would it take for the MOJO one to get out of the sandbox?](#What would 
it take for the MOJO one to get out of the sandbox?]
+[How do I indicate array types in a MOJO configuration?](#How do I indicate 
array types in a MOJO configuration?]</p></section><section>
+<h3>Deploy</h3>
+<p>[How do I deploy my binary during the deploy phase?](#How do I deploy my 
binary during the deploy phase?]
+[Is there a way to use the deploy phase to perform some tasks without maven 
trying to install the artifact to a maven repository?](#Is there a way to use 
the deploy phase to perform some tasks without maven trying to install the 
artifact to a maven repository?]
+[Is maven &#x2018;deploy&#x2019; goal and actually copying of a dependency or 
artifact jar to remote repository same?](#Is maven &#x2018;deploy&#x2019; goal 
and actually copying of a dependency or artifact jar to remote repository 
same?]</p></section><section>
+<h3>Release</h3>
+<p>[#When I run mvn release:prepare, I get a build failure saying 
&#x201c;Unable to tag SCM, File (&#x2026;) already exists&#x201d;. However, the 
tag does not exist. What is wrong?]</p></section><section>
+<h3>Profiles</h3>
+<p>[Can a profile inherit the configuration of a &#x201c;sibling&#x201d; 
profile?](#Can a profile inherit the configuration of a &#x201c;sibling&#x201d; 
profile?]</p></section><section>
+<h3>Testing</h3>
+<p>[How do I prevent tests from running twice, after adding a configuration 
for the surefire plugin?](#How do I prevent tests from running twice, after 
adding a configuration for the surefire plugin?]
+[How do I skip unit tests when building a project?](#How do I skip unit tests 
when building a project?]
+[Is there a setting for testing, where I can add a directory to the classpath, 
which will allow the tests to access the files?](#Is there a setting for 
testing, where I can add a directory to the classpath, which will allow the 
tests to access the files?]
+[Why does Maven compile my test classes but don't run them?](#Why does Maven 
compile my test classes but don't run them?]</p></section><section>
+<h3>Compile</h3>
+<p>[How do I compile 1.3 java sources with a 1.4.x or 1.5.x JDK?](#How do I 
compile 1.3 java sources with a 1.4.x or 1.5.x JDK?]
+[#Building modules only when they have changed]</p></section><section>
+<h3>Adding or Excluding</h3>
+<p>[Can I add a java source to my war package?](#Can I add a java source to my 
war package?]
+[How do I filter which classes should be put inside the packaged jar?](#How do 
I filter which classes should be put inside the packaged jar?]
+[Is it possible to exclude a package from the generated jar file?](#Is it 
possible to exclude a package from the generated jar file?]
+[How not to include all jar files from parent pom?](#How not to include all 
jar files from parent pom?]
+[How do I filter resources in the war?](#How do I filter resources in the war?]
+[How do I prevent including JARs in WEB-INF/lib? I need a &#x201c;compile 
only&#x201d; scope!](#How do I prevent including JARs in WEB-INF/lib? I need a 
&#x201c;compile only&#x201d; scope!]</p></section><section>
+<h3>Changing Locations</h3>
+<p>[How can I change the default location of the generated jar when I command 
&#x201c;mvn package&#x201d;?](#How can I change the default location of the 
generated jar when I command &#x201c;mvn package&#x201d;?]
+[Is there a way to specify a different output directory without having to edit 
the pom or configuration file each time I do a build?](#Is there a way to 
specify a different output directory without having to edit the pom or 
configuration file each time I do a build?]
+[How do I set the base directory for creating the packages created by 
assembly?](#How do I set the base directory for creating the packages created 
by assembly?]
+[Is it possible to create my own directory structure?](#Is it possible to 
create my own directory structure?]</p></section><section>
+<h3>JDK</h3>
+<p>[#I would like clarification on what version of the JDK is required for m2 
&#x2013; particularly with respect to creating Plugins.]
+[#i'm wondering what a &#x201c;snapshot&#x201d; actually is.]
+[How do I configure a project to use a specific version of a JDK?](#How do I 
configure a project to use a specific version of a JDK?]</p></section><section>
+<h3>Other</h3>
+<p>[Maven doesn't work, how do I get help?](#Maven doesn't work, how do I get 
help?]
+[How do I get a list of archetypes?](#How do I get a list of archetypes?]
+[How do I add main class in a generated jar's manifest?](#How do I add main 
class in a generated jar's manifest?]
+[How do I run a build/package/deploy process without waiting for reports or 
unit tests, so that I can quickly deploy to an integration box?](#How do I run 
a build/package/deploy process without waiting for reports or unit tests, so 
that I can quickly deploy to an integration box?]
+[Where is the source code? I couldn't seem to find a link anywhere on the 
Maven site.](#Where is the source code? I couldn't seem to find a link anywhere 
on the Maven site.]
+[How do I add my generated sources to the compile path of Maven, when using 
modello?](#How do I add my generated sources to the compile path of Maven, when 
using modello?]
+[Where can I get offline documentation for Maven?](#Where can I get offline 
documentation for Maven?]
+[What is the purpose of displaying read-only, plug-in fields in user 
documentation, if they are not configurable in the project descriptor?](#What 
is the purpose of displaying read-only, plug-in fields in user documentation, 
if they are not configurable in the project descriptor?]
+[How can I disable the timestamp appended in my deployed artifact?](#How can I 
disable the timestamp appended in my deployed artifact?]
+[How to run a java program from Maven?](#How to run a java program from Maven?]
+[Where to find the source code for org.apache.maven.model package?](#Where to 
find the source code for org.apache.maven.model package?]
+[How can I reference windows or unix environment variables in my POM?](#How 
can I reference windows or unix environment variables in my POM?]
+[Where to get sun.jdk-tools-jar-1.4.0 on MacOSX?](#Where to get 
sun.jdk-tools-jar-1.4.0 on MacOSX?]
+[How can I make the war plugin produces an exploded war instead of .war 
file?](#How can I make the war plugin produces an exploded war instead of .war 
file?]
+[Is there any variable to determine what version of an artifact was deployed 
after the deploy step runs?](#Is there any variable to determine what version 
of an artifact was deployed after the deploy step runs?]
+[How do I get the top line of a table to be &#x201c;headers&#x201d; for that 
column in APT?](#How do I get the top line of a table to be 
&#x201c;headers&#x201d; for that column in APT?]
+[What is the suggested way to download a remote file?](#What is the suggested 
way to download a remote file?]
+[How do I install the package generated by the assembly plugin to be installed 
in the local repository?](#How do I install the package generated by the 
assembly plugin to be installed in the local repository?]
+[Is it possible to use HashMap as configurable parameter in a plugin? How do I 
configure that in pom.xml?](#Is it possible to use HashMap as configurable 
parameter in a plugin? How do I configure that in pom.xml?]
+[Which plugins have StarTeam (SCM) support? How do they differ?](#Which 
plugins have StarTeam (SCM) support? How do they differ?]
+[How should I point a path for Maven to use a certain version of JDK when I 
have different versions of JDK installed on my PC and my JAVA_HOME already 
set?](#How should I point a path for Maven to use a certain version of JDK when 
I have different versions of JDK installed on my PC and my JAVA_HOME already 
set?]
+[Why does release prepare goal requires the project to be released be a 
snapshot? Is it possible to do a release prepare from a parent project? What 
about from a sub-project?](#Why does release prepare goal requires the project 
to be released be a snapshot? Is it possible to do a release prepare from a 
parent project? What about from a sub-project?]
+[How can I create an archetype with resources mapped to the class files 
directory?](#How can I create an archetype with resources mapped to the class 
files directory?]
+[What does (f) and (s) debug output mean?](#What does (f) and (s) debug output 
mean?]
+[How to resolve problems with jtaxxx.jar?](#How to resolve problems with 
jtaxxx.jar?]
+[How to make Continuum work in service mode when an Error 1067 is 
reported?](#How to make Continuum work in service mode when an Error 1067 is 
reported?]
+[Using xdoclet, how come &#x201c;&#x201d; does not work?](#Using xdoclet, how 
come &#x201c;&#x201d; does not work?]
+[I don't have a domain name and I don't want use my employer's domain name. 
What should I name my plugin package?](#I don't have a domain name and I don't 
want use my employer's domain name. What should I name my plugin package?]
+[pom.xml or settings.xml? What is the best practice configuration usage for 
these files?](#pom.xml or settings.xml? What is the best practice configuration 
usage for these files?]
+[What is reactorProjects? executedProject?](#What is reactorProjects? 
executedProject?]
+[What is a Snapshot?](#What is a Snapshot?]
+[Whenever a file is modified in a maven project how is the SNAPSHOT jar 
updated in the remote repository?](#Whenever a file is modified in a maven 
project how is the SNAPSHOT jar updated in the remote repository?]
+[Does maven support automated build and test from non-Java 
applications?](#Does maven support automated build and test from non-Java 
applications?]
+[What would be the appropriate way to enable inheritance of classes in the 
test hierarchy across modules during the test-compile phase of a multi-pom 
project?](#What would be the appropriate way to enable inheritance of classes 
in the test hierarchy across modules during the test-compile phase of a 
multi-pom project?]
+[Is Julia Antonova/Tumlare out of the office?](#Is Julia Antonova/Tumlare out 
of the office?]
+[How to encrypt a secure password that includes an Ampersand](#How to encrypt 
a secure password that includes an 
Ampersand]</p></section></section></section><section>
+<h1>Answered Questions</h1><section><section>
+<h3>How do I merge a list of configuration items in a parent POM with those in 
a child POM?</h3>
+<p>Since plugin configurations are handled as XML DOM instances by the core, 
there is an ever-present struggle between when to merge child elements' values 
with one another (when the child's <code>&lt;source&gt;</code> overrides the 
parent's, for example), and when you want to append new child elements to the 
existing list (as in the example above, or any time you have a list of items to 
aggregate during inheritance).</p>
+<p>We've solved this problem using an attribute, 
<code>combine.children</code>. You simply specify this attribute, with the 
value of <code>append</code> at the parent element where such aggregation 
should occur, and Maven will switch its merge behavior for that element's 
children.</p>
+<p>NOTE: I fixed this behavior in Maven's trunk; previously, it had been 
putting the parent POM's sub-elements AFTER those of the child. This is 
inconsistent with other inheritance functions, so I've reversed the ordering to 
truly append the child's elements.</p>
+<p>So, to recap:</p>
+<p>parent:</p>
+
+<div class="verbatim">
+<pre><code>&lt;configuration&gt;
+  &lt;items&gt;
+      &lt;item&gt;one&lt;/item&gt;
+      &lt;item&gt;two&lt;/item&gt;
+  &lt;/items&gt;
+&lt;/configuration&gt;
+</code></pre></div>
+<p>child:</p>
+
+<div class="verbatim">
+<pre><code>&lt;configuration&gt;
+  &lt;items combine.children=&quot;append&quot;&gt;
+    &lt;item&gt;three&lt;/item&gt;
+  &lt;/items&gt;
+&lt;/configuration&gt;
+</code></pre></div>
+<p>result:</p>
+
+<div class="verbatim">
+<pre><code>&lt;configuration&gt;
+  &lt;items&gt;
+    &lt;item&gt;one&lt;/item&gt;
+    &lt;item&gt;two&lt;/item&gt;
+    &lt;item&gt;three&lt;/item&gt;
+  &lt;/items&gt;
+&lt;/configuration&gt;
+</code></pre></div>
+<p>(If you're using an earlier version of Maven than trunk (revId 545315), the 
order above will be three, one, two.)</p></section><section>
+<h3>Why do I not get an index.html page generated for my project website?</h3>
+<p>The usual cause of this is configuring maven-project-info-reports plugin 
and leaving out the &#x2018;index&#x2019; report.</p>
+
+<div class="verbatim">
+<pre><code>      &lt;plugin&gt;
+        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+        &lt;artifactId&gt;maven-project-info-reports-plugin&lt;/artifactId&gt;
+        &lt;reportSets&gt;
+           &lt;reportSet&gt;
+              &lt;reports&gt;
+                 &lt;report&gt;index&lt;/report&gt;                
&lt;--------- here!
+                 &lt;report&gt;dependencies&lt;/report&gt;
+                 &lt;report&gt;cim&lt;/report&gt;
+                 &lt;report&gt;scm-list&lt;/report&gt;
+                 &lt;report&gt;issue-tracking&lt;/report&gt;
+              &lt;/reports&gt;
+           &lt;/reportSet&gt;
+        &lt;/reportSets&gt;
+      &lt;/plugin&gt;
+</code></pre></div></section><section>
+<h3>How do I resolve the &#x201c;&lt; plugin name &gt; does not exist or no 
valid version&#x201d; error?</h3>
+<p>This error indicates that Maven is either unable to access the required 
plug-in from your local repository, or unable to access the official or 
<code>central</code> Maven plug-in repository.</p>
+<p>To resolve this error:</p>
+<ul>
+
+<li>If you are behind a http proxy, please check the Maven2 <a 
href="http://maven.apache.org/guides/mini/guide-proxies.html"; 
class="externalLink">proxy settings guide</a>.</li>
+<li>If you are upgrading Maven from an older version, try running with -U. 
This will force an update check on all plug-ins.</li>
+</ul>
+<p>If the error persists, browse <a 
href="http://www.mail-archive.com/users@maven.apache.org/"; 
class="externalLink">archived discussions</a>, post to the Maven user list, or 
log a <a href="http://jira.codehaus.org/browse/MNG"; 
class="externalLink">ticket</a> describing your problem, if you think it is a 
bug. Tickets may also be issued for feature enhancement requests, and other 
tasks.</p>
+<p><em>Errors, Dependencies, Plugins</em></p></section><section>
+<h3>How do I install a file in my local repository along with a generic 
POM?</h3>
+<p>You may do this by typing this command (please take note that this is a 
single line only).</p>
+
+<div class="verbatim">
+<pre><code>mvn install:install-file
+      -DgroupId=&lt;group-id&gt;
+      -DartifactId=&lt;artifact-id&gt;
+      -Dversion=&lt;version&gt;
+      -Dfile=&lt;path-to-file&gt;
+      -Dpackaging=&lt;packaging&gt; (i.e. jar)
+      -DgeneratePom=true
+</code></pre></div>
+<p>This command installs the jar in your local repository with the generated 
generic pom.
+{{Well, this doesn't work in Maven 2.0.2. It just gives the message 
&#x201c;Cannot execute mojo: install-file. It requires a project with an 
existing pom.xml, but the build is not using one.&#x201d; -<a 
href="mailto:-krei...@imcode.com"; 
class="externalLink">-krei...@imcode.com</a>}}</p>
+<p><em>Repositories</em></p></section><section>
+<h3>How do I install a file in my local repository along with my customized 
POM?</h3>
+<p>The solution requires the <code>-DpomFile=&lt;path-to-pom&gt;</code> 
parameter just like the sample below.</p>
+
+<div class="verbatim">
+<pre><code>mvn install:install-file
+      -DgroupId=&lt;group-id&gt;
+      -DartifactId=&lt;artifact-id&gt;
+      -Dversion=&lt;version&gt;
+      -Dfile=&lt;path-to-file&gt;
+      -Dpackaging=&lt;packaging&gt; (i.e. jar)
+      -DpomFile=&lt;path-to-pom&gt;
+</code></pre></div>
+<p>This command will install the file in your local repository along with your 
customed pom.
+<em>Repositories</em></p></section><section>
+<h3>How do I include/exclude the other modules in the navigation menu in the 
parent site?</h3>
+<p><a href="http://jira.codehaus.org/browse/MNG-661"; 
class="externalLink">MNG-661</a>, provides a simple patch which provides parent 
and module links using the project URLs which as you
+correctly point out only work when the site is deployed.</p>
+<p><em>Plugins &amp; Lifecycle</em></p>
+<p><em>General</em></p></section><section>
+<h3>What is the difference between Maven and Ivy?</h3>
+<p>For a comparison of Maven's features vs Ivy's you can refer to our <a 
href="http://docs.codehaus.org/display/MAVEN/Feature+Comparisons"; 
class="externalLink">feature comparison</a></p>
+<p><em>General</em></p></section><section>
+<h3>How do I get a plug-in's dependencies from a Mojo?</h3>
+
+<div class="verbatim">
+<pre><code>public class MyMojo
+    extends AbstractMojo
+{
+    /**
+     * @parameter expression=&quot;${plugin.artifacts}&quot;
+     * @required
+     */
+    private List pluginArtifacts;
+
+    public void execute()
+        throws MojoExecutionException
+    {
+        ...
+        for ( Iterator i = pluginArtifacts.iterator(); i.hasNext(); )
+        {
+            Artifact pluginArtifact = (Artifact) i.next();
+        }
+        ...
+    }
+}
+</code></pre></div></section><section>
+<h3>How do I get the project's sources from a Mojo?</h3>
+
+<div class="verbatim">
+<pre><code>public class MyMojo
+    extends AbstractMojo
+{
+    /**
+     * @parameter expression=&quot;${project.compileSourceRoots}&quot;
+     * @required
+     */
+    private List sourceRoots;
+
+    public void execute()
+        throws MojoExecutionException
+    {
+        ...
+        for ( Iterator i = sourceRoots.iterator(); i.hasNext(); )
+        {
+            String sourceRoot = (String) i.next();
+
+           // Do what you want with these directories
+        }
+    }
+}
+</code></pre></div></section><section>
+<h3>Does the v4.0.0 POM include a &lt; versions/ &gt; element?</h3>
+<p>The POM does not inlcude a <code>&lt;versions/&gt;</code> element. The POM 
reflects the current state of a project's build only, not a historical build 
log. The POM is not designed to track historical information, as it would be 
difficult for developers to always add this information manually, i.e., to 
always remember to add it or to ensure that the correct information is added 
when multiple branches are involved.</p>
+<p>However, if the SCM tag of the <code>&lt;scm&gt;</code> section of the POM 
is populated, the repository records build versions, enabling developers to 
reconstruct the information for each released build.</p>
+<p><em>POM, General</em></p></section><section>
+<h3>How do I create a report that does not require Doxia's Sink interface?</h3>
+<p>Make it a report and override the <code>isExternalReport()</code> method to 
return true.</p>
+<p><em>Sites &amp; Reporting</em></p></section><section>
+<h3>How do I prevent verification warnings with custom repositories?</h3>
+<p>Warnings from custom repositories (usually located within the 
organization's network, or even on the same workstation) are triggered when 
Maven tries to verify the integrity of the files in the repository. This 
verification is done via the SHA1 or MD5 sum of the file. If these sum files do 
not exist, then a warning appears.</p>
+<p>Support for downloading the security sum files is not yet included in the 
Maven2 distribution. There are free command-line utilities on the Internet that 
generate these sums. Below is an example of a bash script (use <a 
href="http://cygwin.com"; class="externalLink">Cygwin</a> if you are using a 
windows machine) that generates sha1sum for all jar, xml and pom files 
contained in the directory where it is executed:</p>
+
+<div class="verbatim">
+<pre><code>#!/usr/bin/bash
+
+gensum(){
+   shaname=$1.sha1
+
+   sum=`sha1sum $1 ]( cut -f1 -d&quot; &quot;`
+   echo $sum &gt; $shaname
+}
+
+processFile(){
+   while read oneline
+   do
+      gensum $oneline
+
+
+   done &lt; &quot;$1&quot;
+}
+
+tmpFile=$TMP/shagen.list
+
+echo &quot;Generating sha1 sums for XML files&quot;
+find . -name &quot;*.xml&quot; &gt; &quot;$tmpFile&quot;
+
+processFile &quot;$tmpFile&quot;
+
+echo &quot;Generating sha1 sums for POM files&quot;
+find . -name &quot;*.pom&quot; &gt; &quot;$tmpFile&quot;
+
+processFile &quot;$tmpFile&quot;
+
+echo &quot;Generating sha1 sums for JAR files&quot;
+find . -name &quot;*.jar&quot; &gt; &quot;$tmpFile&quot;
+
+processFile &quot;$tmpFile&quot;
+
+rm &quot;$tmpFile&quot;
+</code></pre></div>
+<p>The script above has been tested on <a href="http://cygwin.com"; 
class="externalLink">Cygwin</a> and is provided &#x201c;as-is&#x201d; and with 
no guarantee.
+<em>Errors, Repositories</em></p></section><section>
+<h3>What does the &quot;ERROR: Cannot override read-only parameter: 
<code>&lt;parameter_name&gt;</code> &quot; message, when running 
&lt;plugin_name&gt;: mean?</h3>
+<p>This means that the parameter being overriden in the pom.xml is read-only. 
Hence, it is not possible to override this parameter.</p>
+<p><em>Errors, POM</em></p></section><section>
+<h3>How do I generate Maven plug-in sites, with pages that include an overview 
of the goals and parameters for each plug-in?</h3>
+<p>Include maven-plugin-plugin as a report.</p>
+<p><em>Plugin Requests, Sites &amp; Reporting</em></p></section><section>
+<h3>Can I define the antrun plugin to be executed on demand like &#x201c;mvn 
antrun:run&#x201d;?</h3>
+<p>The antrun plugin can be executed on demand only if:</p>
+<ul>
+
+<li>the top level configuration of the plugin contains all the information</li>
+<li>a variable is passed from the command line, eg <code>-Dtarget=foo 
antrun:run</code></li>
+<li>the appropriate target in the script is executed based on the variable</li>
+</ul>
+<p>However, it is recommended that developers write plugins for their goals 
(Ant support for
+plugins will be available soon, currently you must write them in java or 
beanshell).</p>
+<p><em>Plugins and Lifecycle, Ant-related</em></p></section><section>
+<h3>How do I properly populate variables, when extending a mojo from another 
plugin?</h3>
+<p>When creating plugins, the field metadata is read from source files, so it 
is not available when the original source is not available. While the metadata 
is available in the plugin in <code>META-INF/maven/plugin.xml</code>, 
currently, there is no way to incorporate it when building a new plugin.</p>
+<p>It is currently recommended that plug-ins be built using composition, 
instead of inheritence.</p>
+<p><em>Plugin Requests, Design, Patterns &amp; Best 
Practices</em></p></section><section>
+<h3>How do I access artifacts if Ibiblio is down?</h3>
+<p>To access artifacts if Ibiblio is down, use any of its mirror sites.</p>
+<p><a href="http://maven.apache.org/guides/mini/guide-mirror-settings.html"; 
class="externalLink">Guide mirror settings</a></p>
+<p><em>Repositories, General</em></p></section><section>
+<h3>How do I get a list of archetypes?</h3>
+<p>To get a list of archetypes, refer to the following page [<a 
href="http://svn.apache.org/viewcvs.cgi/maven/archetype/trunk/maven-archetypes"; 
class="externalLink">http://svn.apache.org/viewcvs.cgi/maven/archetype/trunk/maven-archetypes</a>)</p></section><section>
+<h3>How do I specify my remote repo in Maven?</h3>
+<p>To specify a remote repo in Maven, add the 
<code>&lt;repositories&gt;</code> element to the POM:</p>
+
+<div class="verbatim">
+<pre><code>&lt;repositories&gt;
+  &lt;repository&gt;
+    &lt;id&gt;my-repo2&lt;/id&gt;
+    &lt;name&gt;your custom repo&lt;/name&gt;
+    &lt;url&gt;http://jarsm2.dyndns.dk&lt;/url&gt;
+  &lt;/repository&gt;
+&lt;/repositories&gt;
+</code></pre></div>
+<p>Or, refer to the following page [<a 
href="http://maven.apache.org/guides/mini/guide-multiple-repositories.html"; 
class="externalLink">http://maven.apache.org/guides/mini/guide-multiple-repositories.html</a>)
+<em>Repositories</em></p></section><section>
+<h3>How do I specify which output directories the Eclipse plugin puts into the 
.classpath file?</h3>
+
+<div class="verbatim">
+<pre><code>&lt;build&gt;
+...
+  &lt;pluginManagement&gt;
+    &lt;plugins&gt;
+      &lt;plugin&gt;
+        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+        &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
+        &lt;configuration&gt;
+          &lt;outputDirectory&gt;target-eclipse&lt;/outputDirectory&gt;
+        &lt;/configuration&gt;
+      &lt;/plugin&gt;
+    &lt;/plugins&gt;
+  &lt;/pluginManagement&gt;
+...
+&lt;/build&gt;
+</code></pre></div>
+<p><em>Plugins and Lifecycle, IDEs</em></p>
+<p><em>General, Plugins and Lifecycle</em></p></section><section>
+<h3>Can a profile inherit the configuration of a &#x201c;sibling&#x201d; 
profile?</h3>
+<p>No. Profiles merge when their ID's match - so you can inherit them from a 
parent POM (but you can't inherit profiles from the same POM).</p>
+<p><em>Inheritence and Interpolation, Plugins and Lifecycle, 
POM</em></p></section><section>
+<h3>How do I run an ant task twice, against two different phases?</h3>
+<p>You can specify multiple execution elements under the executions tag, 
giving each a different id and binding them at different phases.</p>
+
+<div class="verbatim">
+<pre><code>&lt;plugin&gt;
+       &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
+       &lt;executions&gt;
+         &lt;execution&gt;
+            &lt;id&gt;one&lt;/id&gt;
+           &lt;phase&gt;generate-sources&lt;/phase&gt;
+           &lt;configuration&gt;
+             &lt;tasks&gt;
+               &lt;echo 
message=&quot;generate-sources!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&quot;/&gt;
+             &lt;/tasks&gt;
+           &lt;/configuration&gt;
+           &lt;goals&gt;
+             &lt;goal&gt;run&lt;/goal&gt;
+           &lt;/goals&gt;
+         &lt;/execution&gt;
+
+         &lt;execution&gt;
+           &lt;id&gt;two&lt;/id&gt;
+           &lt;phase&gt;package&lt;/phase&gt;
+           &lt;configuration&gt;
+             &lt;tasks&gt;
+                &lt;echo 
message=&quot;package!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&quot;/&gt;
+             &lt;/tasks&gt;
+           &lt;/configuration&gt;
+           &lt;goals&gt;
+             &lt;goal&gt;run&lt;/goal&gt;
+           &lt;/goals&gt;
+         &lt;/execution&gt;
+      &lt;/executions&gt;
+     &lt;/plugin&gt;
+</code></pre></div>
+<p><em>Ant-related</em></p></section><section>
+<h3>How do I prevent tests from running twice, after adding a configuration 
for the surefire plugin?</h3>
+<p>Declare the configuration outside of the executions tag of the plugin.</p>
+
+<div class="verbatim">
+<pre><code>&lt;plugin&gt;
+    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+    &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
+    &lt;version&gt;2.0&lt;/version&gt;
+    &lt;configuration&gt;
+        &lt;systemProperties&gt;
+            &lt;property&gt;
+                &lt;name&gt;net.sourceforge.cobertura.datafile&lt;/name&gt;
+                    &lt;value&gt;C:\cobertura.ser&lt;/value&gt;
+            &lt;/property&gt;
+        &lt;/systemProperties&gt;
+    &lt;/configuration&gt;
+&lt;/plugin&gt;
+</code></pre></div>
+<p><em>Plugins and Lifecycle, Sites &amp; Reporting</em></p></section><section>
+<h3>How do I integrate static (x)html into my Maven site?</h3>
+<p>You can integrate your static pages in this several steps,</p>
+<ul>
+
+<li>Put your static pages in the resources directory, 
${basedir}/src/site/resources.</li>
+<li>Create your site.xml and put it in ${basedir}/src/site. An example 
below:</li>
+</ul>
+
+<div class="verbatim">
+<pre><code>&lt;project name=&quot;Maven War Plugin&quot;&gt;
+  &lt;bannerLeft&gt;
+    &lt;name&gt;Maven War Plugin&lt;/name&gt;
+    
&lt;src&gt;http://maven.apache.org/images/apache-maven-project.png&lt;/src&gt;
+    &lt;href&gt;http://maven.apache.org/&lt;/href&gt;
+  &lt;/bannerLeft&gt;
+  &lt;bannerRight&gt;
+    &lt;src&gt;http://maven.apache.org/images/maven-small.gif&lt;/src&gt;
+  &lt;/bannerRight&gt;
+  &lt;body&gt;
+    &lt;links&gt;
+      &lt;item name=&quot;Maven 2&quot; 
xhref=&quot;http://maven.apache.org/maven2/&quot;/&gt;
+    &lt;/links&gt;
+
+    &lt;menu name=&quot;Overview&quot;&gt;
+      &lt;item name=&quot;Introduction&quot; 
xhref=&quot;introduction.html&quot;/&gt;
+      &lt;item name=&quot;How to Use&quot; xhref=&quot;howto.html&quot;/&gt;
+    &lt;/menu&gt;
+    ${reports}
+  &lt;/body&gt;
+&lt;/project&gt;
+</code></pre></div>
+<ul>
+
+<li>Link the static pages by modifying the <code>&lt;menu&gt;</code> section, 
create items and map it with the filename of the static pages.</li>
+</ul>
+
+<div class="verbatim">
+<pre><code>&lt;menu name=&quot;Overview&quot;&gt;
+  &lt;item name=&quot;Introduction&quot; 
xhref=&quot;introduction.html&quot;/&gt;
+  &lt;item name=&quot;How to Use&quot; xhref=&quot;howto.html&quot;/&gt;
+  &lt;item name=&quot;&lt;put-name-here&gt;&quot; 
xhref=&quot;&lt;filename-of-the-static-page&gt;&quot;/&gt;
+&lt;/menu&gt;
+</code></pre></div>
+<p>&#xa0;<em>Sites &amp; Reporting</em></p></section><section>
+<h3>How do I specify that all web modules will inherit the group's common 
files from a parent web module?</h3>
+<p>maven-war-plugin 2.0-beta-3 and later supports merging of wars. Just 
reference the common WAR project from another WAR project as a dependency of 
<code>&lt;type&gt;war&lt;/type&gt;</code> and it will automatically be 
merged.</p>
+<p>See [<a href="http://jira.codehaus.org/browse/MWAR-8"; 
class="externalLink">http://jira.codehaus.org/browse/MWAR-8</a>)</p>
+<p><em>Inheritence and Interpolation</em></p></section><section>
+<h3>How do I determine which POM contains missing transitive dependency?</h3>
+<p>run <code>mvn -X</code></p>
+<p><em>POM, Dependencies</em></p>
+<p><em>General, POM, Plugins and Lifecycle, Command 
Line</em></p></section><section>
+<h3>How do I determine the stale resources in a Mojo to avoid reprocessing 
them?</h3>
+<p>This can be done using the following piece of code:</p>
+
+<div class="verbatim">
+<pre><code>// Imports needed
+import org.codehaus.plexus.compiler.util.scan.InclusionScanException;
+import org.codehaus.plexus.compiler.util.scan.StaleSourceScanner;
+import org.codehaus.plexus.compiler.util.scan.mapping.SuffixMapping;
+
+// At some point of your code
+    StaleSourceScanner scanner = new StaleSourceScanner( 0, 
Collections.singleton( &quot;**/*.xml&quot; ), Collections.EMPTY_SET );
+    scanner.addSourceMapping( new SuffixMapping( &quot;.xml&quot;, 
&quot;.html&quot; ) );
+    Set&lt;File&gt; staleFiles = (Set&lt;File&gt;) scanner.getIncludedSources( 
this.sourceDirectory, this.targetDirectory );
+</code></pre></div>
+<p>The second parameter to the StaleSourceScanner is the set of includes, 
while the third parameter is the set of excludes. You must add a source mapping 
to the scanner (second line). In this case we're telling the scanner what is 
the extension of the result file (.html) for each source file extension (.xml). 
Finally we get the stale files as a <code>Set&lt;File&gt;</code> calling the 
<code>getIncludedSources</code> method, passing as parameters the source and 
target directories (of type File). The Maven API doesn't support generics, but 
you may cast it that way if you're using them.
+In order to use this API you must include the following dependency in your 
pom:</p>
+
+<div class="verbatim">
+<pre><code>&lt;dependencies&gt;
+  &lt;dependency&gt;
+    &lt;groupId&gt;org.codehaus.plexus&lt;/groupId&gt;
+    &lt;artifactId&gt;plexus-compiler-api&lt;/artifactId&gt;
+    &lt;version&gt;1.5.1&lt;/version&gt;
+  &lt;/dependency&gt;
+&lt;/dependencies&gt;
+</code></pre></div>
+<p><em>POM, Plugin API</em></p></section><section>
+<h3>What does the FATAL ERROR with the message <em>&#x201c;Class 
org.apache.commons.logging.impl.Jdk14Logger does not implement Log&#x201d;</em> 
when using the maven-checkstyle-plugin mean?</h3>
+<p>Checkstyle uses commons-logging, which has classloader problems when 
initialized within a Maven plugin's container. This results in the above 
message - if you run with &#x2018;-e&#x2019;, you'll see something like the 
following:</p><hr /></section></section><section>
+<h2>Caused by: org.apache.commons.logging.LogConfigurationException: 
org.apache.commons.logging.LogConfigurationException: Class 
org.apache.commons.logging.impl.Jdk14Logger does not implement Log</h2>
+<p>buried deep in the stacktrace.</p>
+<p>The only workaround we currently have for this problem is to include 
another commons-logging Log implementation in the plugin itself. So, you can 
solve the problem by adding the following to your plugin declaration in your 
POM:</p>
+
+<div class="verbatim">
+<pre><code>&lt;project&gt;
+  ...
+  &lt;build&gt;
+    ...
+    &lt;plugins&gt;
+      ...
+      &lt;plugin&gt;
+        &lt;artifactId&gt;maven-checkstyle-plugin&lt;/artifactId&gt;
+        &lt;dependencies&gt;
+          &lt;dependency&gt;
+            &lt;groupId&gt;log4j&lt;/groupId&gt;
+            &lt;artifactId&gt;log4j&lt;/artifactId&gt;
+            &lt;version&gt;1.2.12&lt;/version&gt;
+          &lt;/dependency&gt;
+        &lt;/dependencies&gt;
+      &lt;/plugin&gt;
+    &lt;/plugins&gt;
+  &lt;/build&gt;
+  ...
+  &lt;reporting&gt;
+    ...
+    &lt;plugins&gt;
+      &lt;!-- your checkstyle report is registered here, according to Maven 
documentation --&gt;
+    &lt;/plugins&gt;
+  &lt;/reporting&gt;
+&lt;/project&gt;
+</code></pre></div>
+<p>While this may seem a counter-intuitive way of configuring a report, it's 
important to remember that Maven plugins can have a mix of reports and normal 
mojos. When a POM has to configure extra dependencies for a plugin, it should 
do so in the normal plugins section.
+We will probably try to fix this problem before the next release of the 
checkstyle plugin.</p>
+<p><em>UPDATE:</em> This problem has been fixed in the SVN trunk version of 
the checkstyle plugin, which should be released very soon.
+<em>Plugins and Lifecycle, Sites &amp; Reporting, Errors</em></p><section>
+<h3>Where do I configure report plug-ins, like javadoc?</h3>
+<p>Generally, you should configure reporting in the 
<code>&lt;reporting&gt;</code> (vs. <code>&lt;build&gt;</code>) section of the 
POM. Configuration there applies to both the site, and when run on the command 
line, and adding the plugin there adds the report to the generated site.</p>
+<p>Configuration in the build section is only used during the normal lifecycle 
or the command line invocation (eg <code>javadoc:javadoc</code>).</p>
+<p>Configuration should go there if you do not want the report on the site, or 
the configuration differs from what is on the site (eg, some plugins have a 
fail build option).</p>
+<p><em>Sites &amp; Reporting, Plugins and Lifecycle, Command 
Line</em></p></section><section>
+<h3>How do I deploy my binary during the deploy phase?</h3>
+
+<div class="verbatim">
+<pre><code>&lt;plugin&gt;
+  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+  &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
+  &lt;executions&gt;
+    &lt;execution&gt;
+      &lt;phase&gt;install&lt;/phase&gt;
+      &lt;goals&gt;
+        &lt;goal&gt;assembly&lt;/goal&gt;
+      &lt;/goals&gt;
+      &lt;configuration&gt;
+        &lt;!-- put your config here --&gt;
+      &lt;/configuration&gt;
+    &lt;/execution&gt;
+  &lt;/executions&gt;
+&lt;/plugin&gt;
+</code></pre></div>
+<p>Then run <code>mvn deploy</code>.
+<em>Deployment</em></p></section><section>
+<h3>How do I add main class in a generated jar's manifest?</h3>
+<p>Configure the maven-jar-plugin and add your main class.</p>
+
+<div class="verbatim">
+<pre><code>&lt;plugin&gt;
+  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+  &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
+  &lt;configuration&gt;
+    &lt;archive&gt;
+      &lt;manifest&gt;
+   &lt;mainClass&gt;com.mycompany.app.App&lt;/mainClass&gt;
+      &lt;/manifest&gt;
+    &lt;/archive&gt;
+  &lt;/configuration&gt;
+&lt;/plugin&gt;
+</code></pre></div></section><section>
+<h3>How do I install artifacts to a remote repository?</h3>
+<p>You need at least 2.1-SNAPSHOT version of maven-deploy-plugin to make this 
work, current workaround to use this is to copy the wagon provider jar (ie. 
wagon-ftp-1.0-alpha-3.jar) in your <code>%M2_HOME%/lib</code> and execute the 
command:</p>
+
+<div class="verbatim">
+<pre><code>mvn deploy:deploy-file
+    -DgroupId=&lt;groupId&gt;
+    -DartifactId=&lt;artifactId&gt;
+    -Dversion=&lt;version&gt;
+    -Dpackaging=&lt;packaging&gt;
+    -Dfile=&lt;path-to-file&gt;
+    -DrepositoryId=&lt;id-to-map-on-server&gt;
+    -Durl=&lt;url-of-remote-repo&gt;
+</code></pre></div>
+<p><em>Repositories, Command Line</em></p></section><section>
+<h3>Does a POM inherit its resources?</h3>
+<p>Yes, resources are inherited, but only if the child pom does not define any 
resources. If it does, then the project just uses those resources defined in 
its pom and the parents resources are overridden.</p>
+<p><em>POM, Inheritence and Interpolation</em></p></section><section>
+<h3>How do I use SNAPSHOT versions of plug-ins?</h3>
+<p>[http://maven.apache.org/guides/development/guide-testing-development-plugins.html]</p></section><section>
+<h3>How do I run a build/package/deploy process without waiting for reports or 
unit tests, in order to quickly deploy to an integration box?</h3>
+<p>You could create a specific profile that skips the reporting and test 
phases.</p>
+<p>Also refer to [How do I skip unit tests when building a project?](How do I 
skip unit tests when building a project?)</p></section><section>
+<h3>How do I execute the assembly plugin with different configurations?</h3>
+<p>Add this to your pom,</p>
+
+<div class="verbatim">
+<pre><code>&lt;build&gt;
+  ...
+  &lt;plugins&gt;
+    &lt;plugin&gt;
+      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+      &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
+      &lt;executions&gt;
+        &lt;execution&gt;
+          &lt;id&gt;1&lt;/id&gt;
+          &lt;phase&gt;install&lt;/phase&gt;
+          &lt;goals&gt;
+            &lt;goal&gt;assembly&lt;/goal&gt;
+          &lt;/goals&gt;
+          &lt;configuration&gt;
+            &lt;descriptor&gt;src/main/descriptors/bin.xml&lt;/descriptor&gt;
+            &lt;finalName&gt;${project.build.finalName}-bin&lt;/finalName&gt;
+          &lt;/configuration&gt;
+        &lt;/execution&gt;
+
+        &lt;execution&gt;
+          &lt;id&gt;2&lt;/id&gt;
+          &lt;phase&gt;install&lt;/phase&gt;
+          &lt;goals&gt;
+            &lt;goal&gt;assembly&lt;/goal&gt;
+          &lt;/goals&gt;
+          &lt;configuration&gt;
+            &lt;descriptor&gt;src/main/descriptors/src.xml&lt;/descriptor&gt;
+            &lt;finalName&gt;${project.build.finalName}-src&lt;/finalName&gt;
+          &lt;/configuration&gt;
+        &lt;/execution&gt;
+      &lt;/executions&gt;
+    &lt;/plugin&gt;
+  &lt;/plugins&gt;
+  ...
+
+&lt;/build&gt;
+</code></pre></div>
+<p>and run <code>mvn install</code>, this will execute the assembly plugin 
twice with different config.</p></section><section>
+<h3>What is Maven's order of inheritance?</h3>
+<ul>
+
+<li>parent pom</li>
+<li>project pom</li>
+<li>settings</li>
+<li>CLI parameters</li>
+</ul>
+<p>where the last overrides the previous.</p>
+<p><em>General, Inheritence and Interpolation, Design, Patterns &amp; Best 
Practices</em></p></section><section>
+<h3>How do I add my generated sources to the compile path of Maven, when using 
modello?</h3>
+<p>Modello generate the sources in the generate-sources phase and 
automatically adds the source directory for compilation in maven. So you don't 
have to copy the generated sources.</p>
+<p>You have to declare the modello-plugin in the build of your plugin for 
source generation (in that way the sources are generated each time).</p>
+<p><em>Plugins and Lifecycle</em></p></section><section>
+<h3>Can I add a java source to my war package?</h3>
+<p>You can't, but you can use the assembly plugin to create a source 
distribution and a binary distribution for your project</p>
+<p>Please refer to these sites for more info
+[http://maven.apache.org/guides/mini/guide-assemblies.html]
+[http://maven.apache.org/plugins/maven-assembly-plugin/howto.html]</p>
+<p><em>Deployments, Plugins and Lifecycle</em></p></section><section>
+<h3>What does the &#x201c;You cannot have two plugin executions with the same 
(or missing) <code>&lt;id/&gt;</code> elements&#x201d; message mean?</h3>
+<p>It means that you have executed a plugin multiple times with the same 
<code>&lt;id&gt;</code>. Provide each <code>&lt;execution&gt;</code> with a 
unique <code>&lt;id&gt;</code> then it would be ok.</p>
+<p><em>Errors, Plugins and Lifecycle</em></p></section><section>
+<h3>Can I disable transitive dependencies?</h3>
+<p>No you can't, but you may exclude the dependencies you dont want to include 
in your project.</p>
+<p>Following is a sample on how to exclude transitive dependencies.</p>
+
+<div class="verbatim">
+<pre><code>&lt;project&gt;
+  ...
+  &lt;dependency&gt;
+    &lt;groupId&gt;&lt;!-- group id --&gt;&lt;/groupId&gt;
+    &lt;artifactId&gt;&lt;!-- artifact id --&gt;&lt;/artifactId&gt;
+    &lt;version&gt;&lt;!-- version --&gt;&lt;/version&gt;
+    &lt;scope&gt;&lt;!-- scope --&gt;&lt;/scope&gt;
+    &lt;exclusions&gt;
+      &lt;exclusion&gt;
+        &lt;groupId&gt;&lt;!-- groupId-of-the-artifact --&gt;&lt;/groupId&gt;
+        &lt;artifactId&gt;&lt;!-- artifactId-of-the-artifact 
--&gt;&lt;/artifactId&gt;
+      &lt;/exclusion&gt;
+    &lt;/exclusions&gt;
+  &lt;/dependency&gt;
+&lt;/project&gt;
+</code></pre></div>
+<p><em>Dependencies, Design, Patterns &amp; Best 
Practices</em></p></section><section>
+<h3>Where can I get offline documentation for Maven?</h3>
+<p>Check it out from [http://svn.apache.org/repos/asf/maven/site/trunk] and 
run mvn site:site</p>
+<p><em>General, Sites &amp; Reporting</em></p></section><section>
+<h3>How do I skip unit tests when building a project?</h3>
+<p>Run the mvn command with <code>-Dmaven.test.skip=true</code> argument.</p>
+<p>Also see [How do I run a build/package/deploy process without waiting for 
reports or unit tests, so that I can quickly deploy to an integration box?]</p>
+<p><em>Sites &amp; Reporting, General</em></p></section><section>
+<h3>How do I create a command line parameter (i.e., -Dname=value ) in my 
mojo?</h3>
+<p>In your mojo, put <code>expression=$\{&lt;exp&gt;\}</code> in your 
parameter field</p>
+
+<div class="verbatim">
+<pre><code>/**
+ * @parameter expression=&quot;${expression.name}&quot;
+ */
+private String exp;
+</code></pre></div>
+<p>You may now able to pass parameter values to the command line.
+<code>mvn \-Dexpression.name=value install</code></p>
+<p><em>Command Line</em></p></section><section>
+<h3>What is the purpose of displaying read-only, plug-in fields in user 
documentation, if they are not configurable in the project descriptor?</h3>
+<p>Often, parameters are specified as read-only to indicate that its value 
should be changed indirectly, rather than in the plugins 
<code>&lt;configuration/&gt;</code> section. For instance, I may have a plugin 
that declares a parameter as such:</p>
+
+<div class="verbatim">
+<pre><code>/**
+   * @parameter default-value=&quot;${project.build.directory}&quot;
+   * @required
+   * @readonly
+   */
+  private File buildDir;
+</code></pre></div>
+<p>In this case, my plugin wants to output something to the project's build 
directory. If this were configured directly on the plugin, it might not be 
cleaned up when the user issued <em>&#x2018;mvn clean&#x2019;</em>, so instead 
I mark it as <code>@readonly</code>. This tells the user that she should modify 
the structure referenced by <em>default-value</em>(i.e. 
<code>&lt;project&gt;&lt;build&gt;&lt;directory/&gt;</code> in the POM) 
instead, which will allow this plugin to be a good citizen in the build 
process.</p></section><section>
+<h3>I've just created a maven plugin. Is there a sample plugin integration 
test I can use?</h3>
+<p>Each integration test is a separate project. For a plugin, you may want to 
create a project that will use your plugin and probably put it inside 
src/test/projects like maven-antrun-plugin, maven-eclipse-plugin, 
maven-javadoc-plugin and several others. These plugins can be found here: 
[https://svn.apache.org/repos/asf/maven/plugins/trunk]</p>
+<p><em>Plugins and Lifecycle, Sites &amp; Reporting, Integration 
tests</em></p></section><section>
+<h3>The snapshot version of the plugin is not updated in the snapshot repo, 
What should I do to update my copy of the plugin?</h3>
+<p>If the plugin in the snapshot repo 
([http://snapshots.maven.codehaus.org/maven2]) is not yet updated. The only way 
to update it is to check out the source from SVN and build 
it.</p></section><section>
+<h3>Is there a way to get Maven to report the number of compile errors 
found?</h3>
+<p>Currently, this type of summary information is not built into the compiler 
plugin, but it would be possible to add. If this feature is important to you, 
add your vote to <a href="http://jira.codehaus.org/browse/MNG-1854"; 
class="externalLink">MNG-1854</a>.</p>
+<p><em>Sites &amp; Reporting</em></p></section><section>
+<h3>In a multi-module project, is there any way for Maven to build only those 
modules that have changed from the previous build and leave the unchanged 
modules alone (i.e. not build them)?</h3>
+<p>Currently, this is not possible. The main reason is that it's non-trivial 
to determine whether an entire project's build is stale (the project here being 
one of the modules). It will be dependent on the phase being called, and the 
packaging of the particular module.</p>
+<p><em>Design, Patterns &amp; Best Practices</em></p></section><section>
+<h3>Where can I get the Maven plugin for Eclipse?</h3>
+<p>[http://maven.apache.org/eclipse-plugin.html]</p>
+<p>There are some flash demos to show the user how to use the plugin.</p>
+<p><em>IDEs</em></p></section><section>
+<h3>Handle special characters in site</h3>
+<p>A solution with eclipse and solaris</p>
+<p>In eclipse.ini :
+Adding -Dfile.encoding=ISO-8859-1</p>
+<p>If using xmlbuddy with eclipse to edit xdoc files set the encoding
+Honor encoding
+Default to ISO-8859-1</p>
+<p>Configuration in pom</p>
+
+<div class="verbatim">
+<pre><code>&lt;plugin&gt;
+        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+        &lt;artifactId&gt;maven-site-plugin&lt;/artifactId&gt;
+        &lt;configuration&gt;
+          &lt;outputEncoding&gt;UTF-8&lt;/outputEncoding&gt;
+        &lt;/configuration&gt;
+      &lt;/plugin&gt;
+</code></pre></div>
+<p>On the solaris machine
+In <code>$HOME/.profile</code>
+<code>MAVEN_OPTS=&quot;-Xmx512m -Xms512m -Dfile.encoding=ISO-8859-1</code> 
(mx/ms not mandatory for m2 but for m1).
+<code>LANG=en_US.ISO8859-15</code>
+<em>Sites &amp; Reporting, IDEs</em></p></section><section>
+<h3>How do I generate sources with the antrun plug-in?</h3>
+<p>For instance to generate sources add the following to your plugins section
+NOTE: this may only work in the latest plugin version in SVN</p>
+
+<div class="verbatim">
+<pre><code>&lt;plugin&gt;
+    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+    &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
+    &lt;dependencies&gt;
+      &lt;!-- add dependencies needed in your ant script --&gt;
+    &lt;/dependencies&gt;
+    &lt;executions&gt;
+        &lt;execution&gt;
+            &lt;id&gt;generate-sources&lt;/id&gt;
+            &lt;phase&gt;generate-sources&lt;/phase&gt;
+            &lt;configuration&gt;
+                &lt;tasks&gt;
+                    &lt;!-- this will delegate to an ant build.xml, you could 
embed here your ant tasks --&gt;
+                    &lt;path id=&quot;classpath&quot;&gt;
+                        &lt;path refid=&quot;maven.compile.classpath&quot;/&gt;
+                        &lt;path refid=&quot;maven.plugin.classpath&quot;/&gt;
+                    &lt;/path&gt;
+                    &lt;ant antfile=&quot;${project.basedir}/build.xml&quot; 
dir=&quot;${project.basedir}&quot; inheritRefs=&quot;true&quot;&gt;
+                        &lt;target name=&quot;generate-sources&quot;/&gt;
+                    &lt;/ant&gt;
+                &lt;/tasks&gt;
+            &lt;/configuration&gt;
+            &lt;goals&gt;
+                &lt;goal&gt;run&lt;/goal&gt;
+            &lt;/goals&gt;
+        &lt;/execution&gt;
+    &lt;/executions&gt;
+&lt;/plugin&gt;
+</code></pre></div>
+<p><em>Ant-related</em>&#xa0;</p></section><section>
+<h3>Where is the plugin-registry.xml?</h3>
+<p>From the settings.xml, you may enable it by setting 
<code>&lt;usePluginRegistry/&gt;</code> to true and the file will be in 
<code>~/.m2/plugin-registry.xml</code></p>
+<p><em>General, Plugins and Lifecycle</em></p></section><section>
+<h3>Is there a way to specify a different output directory without having to 
edit the pom or configuration file each time I do a build?</h3>
+<p>Yes. You can make use of the pom's <code>&lt;properties&gt;</code> element 
to accomplish this.</p>
+<p>To do so, simply add the following fragment to your pom:</p>
+
+<div class="verbatim">
+<pre><code>&lt;project&gt;
+...
+  &lt;build&gt;
+    &lt;directory&gt;${directory}&lt;/directory&gt;
+    &lt;outputDirectory&gt;${directory}/classes&lt;/outputDirectory&gt;
+    
&lt;testOutputDirectory&gt;${directory}/test-classes&lt;/testOutputDirectory&gt;
+  &lt;/build&gt;
+  &lt;properties&gt;
+    &lt;directory&gt;target&lt;/directory&gt;     &lt;!-- will serve as the 
default --&gt;
+  &lt;/properties&gt;
+...
+&lt;/project&gt;
+</code></pre></div>
+<p>Now, to specify a different output directory at runtime simply use the 
directory property as a mvn command line parameter;
+{code}mvn -Ddirectory=tmp package</p>
+
+<div class="verbatim">
+<pre><code>This will send the build's output files to the $\{basedir}/tmp 
directory.
+
+_POM, Command Line_
+
+### How do I compile 1.3 java sources with a 1.4.x or 1.5.x JDK?
+
+You need to specify the &lt;compilerVersion&gt; element to 1.3
+
+i.e.
+```&lt;project&gt;
+  ...
+  &lt;build&gt;
+    &lt;plugins&gt;
+      &lt;plugin&gt;
+        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+        &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
+        &lt;configuration&gt;
+          &lt;verbose&gt;true&lt;/verbose&gt;
+          &lt;fork&gt;true&lt;/fork&gt;
+          &lt;executable&gt;&lt;!-- path-to-javac --&gt;&lt;/executable&gt;
+          &lt;compilerVersion&gt;1.3&lt;/compilerVersion&gt;
+        &lt;/configuration&gt;
+      &lt;/plugin&gt;
+    &lt;/plugins&gt;
+  &lt;/build&gt;
+  ...
+&lt;/project&gt;
+</code></pre></div></section><section>
+<h3>How do I change the default remote repository?</h3>
+<p>Define in your POM a repository with &#x201c;central&#x201d; as the 
repository id.</p>
+
+<div class="verbatim">
+<pre><code>&lt;repositories&gt;
+    &lt;repository&gt;
+      :
+      &lt;id&gt;central&lt;/id&gt;
+      &lt;name&gt;any name&lt;/name&gt;
+      &lt;url&gt;http://your.remote.repo.url.org&lt;/url&gt;
+      :
+    &lt;/repository&gt;
+  &lt;/repositories&gt;
+</code></pre></div>
+<p><em>Repositories</em></p></section><section>
+<h3>I have my web.xml in my customed directory layout for my webapp, but why 
am I getting the error &#x201c;Deployment descriptor 
<code>&lt;Path&gt;\WEB-INF\web.xml</code> does not exist&#x201d;?</h3>
+<p>You may specify the path of your web.xml in your webapp by configuring 
maven-war-plugin.</p>
+
+<div class="verbatim">
+<pre><code>&lt;build&gt;
+   ...
+    &lt;plugins&gt;
+      &lt;plugin&gt;
+        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+        &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
+        &lt;configuration&gt;
+          &lt;webXml&gt;&lt;!-- path-to-your-webxml --&gt;&lt;/webXml&gt;
+        &lt;/configuration&gt;
+      &lt;/plugin&gt;
+    &lt;/plugins&gt;
+&lt;/build&gt;
+</code></pre></div>
+<p><em>Errors, Deployment</em>&#xa0;</p></section><section>
+<h3>Is it possible to specify multiple <code>&lt;module&gt;</code>(s) in a POM 
at a greater depth than 1 level?</h3>
+<p>Yes. This can be done in two ways: 1. add the extra path in the top level 
POM, or 2. add extra parent poms at different levels, if approriate.</p>
+<p>For example, you have the following structure:
+/A/pom.xml (multi-module POM)
+/A/B/C/pom.xml
+/A/B/C/D/pom.xml</p>
+<p>And you want the modules at level C and D built when the multi-module POM 
is built.</p>
+<p>For the first solution:
+Add the following at the top level POM:</p>
+
+<div class="verbatim">
+<pre><code>&lt;modules&gt;
+  &lt;module&gt;A/B&lt;/module&gt;
+  ...
+&lt;modules&gt;
+</code></pre></div>
+<p>For the second solution:
+Add the following at the top level POM:</p>
+
+<div class="verbatim">
+<pre><code>&lt;modules&gt;
+  &lt;module&gt;B&lt;/module&gt;
+&lt;modules&gt;
+</code></pre></div>
+<p>And in directory A/B/, add an extra parent POM and add the following:</p>
+
+<div class="verbatim">
+<pre><code>&lt;modules&gt;
+  &lt;module&gt;C&lt;/module&gt;
+&lt;modules&gt;
+</code></pre></div>
+<p>Both ways are effectively the same, but if you have that inheritance 
structure, the second gives a more natural grouping (eg, you can cd
+into &#x201c;B&#x201d; and build all its subprojects only).
+If you do the first solution, the children poms should have the following hint 
in the parent element:</p>
+
+<div class="verbatim">
+<pre><code class="language-<parent>">  ...
+  &lt;artifactId&gt;A&lt;/artifactId&gt;
+  &lt;relativePath&gt;../../pom.xml&lt;/relativePath&gt;
+&lt;/parent&gt;
+</code></pre></div>
+<p>The repository is still used if ../../pom.xml is not found or the versions 
don't match, but the hint makes it easier to use local modifications without 
installing the parent.&#xa0;
+<em>POM</em></p></section><section>
+<h3>How to list all goals available for a certain plugin?</h3>
+<p>We can use the describe goal of maven-projecthelp-plugin to list the goals 
available, see sample syntax below.</p>
+
+<div class="verbatim">
+<pre><code>mvn projecthelp:describe 
-Dplugin=org.apache.maven.plugins:maven-eclipse-plugin -Dfull=true
+</code></pre></div>
+<p>This would display all the goals and descriptions of the parameters used by 
maven-eclipse-plugin.
+\
+To get a quick overview about available mojos you can use the 
&#x2018;help&#x2019; mojo which automatically gets generated in newer 
plugins.</p>
+
+<div class="verbatim">
+<pre><code>mvn [pluginname]:help
+e.g. mvn eclipse:help
+</code></pre></div>
+<p><em>Plugins and Lifecycle, IDEs</em></p></section><section>
+<h3>What does aggregator mean in mojo?</h3>
+<p>When a Mojo has a <code>@aggregator</code> expression, it means that It can 
only build the parent project of your multi-module-project, the one who has the 
packaging of pom. It can also give you values for the expression 
${reactorProjects} where reactorProjects are the MavenProject references to the 
parent pom modules.</p></section><section>
+<h3>Why there are no dependency properties in Maven?</h3>
+<p>They were removed because they aren't reliable in a transitive environment. 
It implies that the dependency knows something about the
+environment of the dependee, which is back to front. In most cases, granted, 
the value for war bundle will be the same for a particular
+dependency - but that relies on the dependency specifying it.</p>
+<p>In the end, we give control to the actual POM doing the building, trying to 
use sensible defaults that minimise what needs to be
+specified, and allowing the use of artifact filters in the configuration of 
plugins.</p></section><section>
+<h3>How do I prevent including JARs in WEB-INF/lib? I need a &#x201c;compile 
only&#x201d; scope</h3>
+<p>The scope you should use for this is provided. This indicates to Maven that 
the dependency will be provided at run time by its container or the JDK, for 
example.</p>
+<p>Dependencies with this scope will not be passed on transitively, nor will 
they be bundled in an package such as a WAR, or included in the runtime 
classpath.</p></section><section>
+<h3>How do I list available plugins?</h3>
+<p>The &#x201c;Available Plugins&#x201d; page lists them, and provides 
additional information to browse the Maven repository. See 
[http://maven.apache.org/plugins]</p></section><section>
+<h3>How do I determine what version of a plugin I am using?</h3>
+<p>You can use the Maven Help Plugin's describe goal. For example, to find out 
the version of the install plugin:
+{noformat}mvn -Dplugin=install help:describe
+{noformat}Note that you must give the plugin prefix as the argument to plugin, 
not it's artifact ID.</p></section><section>
+<h3>How can I use Ant tasks in Maven?</h3>
+<p>There are currently 2 alternatives:</p>
+<ul>
+
+<li>For use in a plugin written in Java, Beanshell or other Java-like 
scripting language, you can construct the Ant tasks <a 
href="http://ant.apache.org/manual/antexternal.html"; class="externalLink">using 
the instructions given in the Ant documentation</a></li>
+<li>If you have very small amounts of Ant script specific to your project, you 
can use the <a 
href="http://maven.apache.org/plugins/maven-antrun-plugin/index.html"; 
class="externalLink">AntRun plugin</a>.</li>
+</ul></section><section>
+<h3>Is it possible to create my own directory structure?</h3>
+<p>Absolutely yes!</p>
+<p>By configuring <code>&lt;sourceDirectory&gt;</code>, 
<code>&lt;resources&gt;</code> and other elements of the 
<code>&lt;build&gt;</code> section.</p>
+<p>In addition, you may need to change the plugin configuration if you are not 
using plugin defaults for their files/directories.</p></section><section>
+<h3>Where is the source code? I couldn't seem to find a link anywhere on the 
Maven site.</h3>
+<p>The source code can be found in subversion: 
[http://svn.apache.org/repos/asf/maven/components/trunk].</p>
+<p>For more information, see <a 
href="http://maven.apache.org/guides/development/guide-building-m2.html"; 
class="externalLink">Building Maven</a></p></section><section>
+<h3>Why does Maven compile my test classes but doesn't run them?</h3>
+<p>Tests are run by the surefire plugin. The surefire plugin can be configured 
to run certain test classes and you may have unintentionally done so by 
specifying a value to $
+{test}. Check your settings.xml and pom.xml for a property named 
&#x201c;test&#x201d; which would like this:</p>
+
+<div class="verbatim">
+<pre><code>...
+  &lt;properties&gt;
+    &lt;property&gt;
+      &lt;name&gt;test&lt;/name&gt;
+      &lt;value&gt;some-value&lt;/value&gt;
+    &lt;/property&gt;
+ &lt;/properties&gt;
+  ...
+</code></pre></div>
+<p>or</p>
+
+<div class="verbatim">
+<pre><code>...
+  &lt;properties&gt;
+    &lt;test&gt;some-value&lt;/test&gt;
+ &lt;/properties&gt;
+  ...
+</code></pre></div></section><section>
+<h3>Where are the Maven XSD schemas?</h3>
+<p>The Maven XSD is located here and the Maven Settings XSD is located here.
+Your favorite IDE probably supports XSD schema's for pom.xml and settings.xml 
editing. You need to specify the following:</p>
+
+<div class="verbatim">
+<pre><code>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; 
xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+  xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 
https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
+  ...
+&lt;/project&gt;
+</code></pre></div>
+
+<div class="verbatim">
+<pre><code>&lt;settings xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; 
xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+  xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 
https://maven.apache.org/xsd/settings-1.0.0.xsd&quot;&gt;
+  ...
+&lt;/settings&gt;
+</code></pre></div></section><section>
+<h3>Maven doesn't work, how do I get help?</h3>
+<p>We have compiled a list of available resources on the <a 
href="http://maven.apache.org/users/getting-help.html"; 
class="externalLink">getting help page</a></p>
+<p>(#Dependencies, Design, Patterns &amp; Best 
Practices)</p></section><section>
+<h3>Where to find the source code for org.apache.maven.model package?</h3>
+<p>The source for the model package is generated by modello. From your 
maven-model source, build it and you should able to see tha java files inside 
/target/generated-sources directory.</p></section><section>
+<h3>List of available Maven mirrors.</h3>
+<p>Here is the list of available mirrors you can use, just use one of the 
following mirror entries in your settings.xml</p>
+
+<div class="verbatim">
+<pre><code>&lt;settings&gt;
+
+  &lt;mirrors&gt;
+    &lt;mirror&gt;
+      &lt;id&gt;dotsrc.org&lt;/id&gt;
+      &lt;url&gt;http://mirrors.dotsrc.org/maven2&lt;/url&gt;
+      &lt;mirrorOf&gt;central&lt;/mirrorOf&gt;
+    &lt;/mirror&gt;
+    &lt;mirror&gt;
+      &lt;id&gt;ggi-project.org&lt;/id&gt;
+      &lt;url&gt;http://ftp.ggi-project.org/pub/packages/maven2&lt;/url&gt;
+      &lt;mirrorOf&gt;central&lt;/mirrorOf&gt;
+    &lt;/mirror&gt;
+    &lt;mirror&gt;
+      &lt;id&gt;sunsite.dk&lt;/id&gt;
+      &lt;url&gt;http://mirrors.sunsite.dk/maven2&lt;/url&gt;
+      &lt;mirrorOf&gt;central&lt;/mirrorOf&gt;
+    &lt;/mirror&gt;
+    &lt;mirror&gt;
+      &lt;id&gt;planetmirror.com&lt;/id&gt;
+      &lt;url&gt;http://public.planetmirror.com/pub/maven2&lt;/url&gt;
+      &lt;mirrorOf&gt;central&lt;/mirrorOf&gt;
+    &lt;/mirror&gt;
+    &lt;mirror&gt;
+      &lt;id&gt;lsu.edu&lt;/id&gt;
+      &lt;url&gt;http://ibiblio.lsu.edu/main/pub/packages/maven2&lt;/url&gt;
+      &lt;mirrorOf&gt;central&lt;/mirrorOf&gt;
+    &lt;/mirror&gt;
+    &lt;mirror&gt;
+      &lt;id&gt;ibiblio.net&lt;/id&gt;
+      &lt;url&gt;http://www.ibiblio.net/pub/packages/maven2&lt;/url&gt;
+      &lt;mirrorOf&gt;central&lt;/mirrorOf&gt;
+    &lt;/mirror&gt;
+  &lt;/mirrors&gt;
+
+&lt;/settings&gt;
+</code></pre></div></section><section>
+<h3>Unsupported Protocol Error when deploying a 3rd party jar. What should I 
do?</h3>
+<p>When using deploy-deploy-file goal and encountered this error</p>
+<p>&#x201c;Error deploying artifact: Unsupported Protocol: 
&#x2018;ftp&#x2019;: Cannot find wagon which supports the requested protocol: 
ftp&#x201d;</p>
+<p>You only have to place the appropriate wagon provider to your 
<code>%M2_HOME%/lib</code>
+In this case the provider needed is ftp, so we have to place the wagon-ftp jar 
to the lib of your m2 installation.</p>
+<p>If the error description is something like</p>
+<p>&#x201c;Error deploying artifact: Unsupported Protocol: 
&#x2018;ftp&#x2019;: Cannot find wagon which supports the requested protocol: 
ftp org/apache/commons/net/ftp/FTP&#x201d;</p>
+<p>Place also the commons-net jar to %M2_HOME%/lib.</p></section><section>
+<h3>How can I have a child project not inherit a goal (like install) from the 
parent?</h3>
+<p>Use the <code>inherited</code> property. Set it to <code>false</code> in 
the plugin configuration. So for example, if you want your parent project to be 
installed but not your child, configure the install plugin like so:</p>
+
+<div class="verbatim">
+<pre><code>&lt;plugin&gt;
+   &lt;artifactId&gt;maven-install-plugin&lt;/artifactId&gt;
+   &lt;configuration&gt;
+      &lt;inherited&gt;false&lt;/inherited&gt;
+   &lt;/configuration&gt;
+&lt;/plugin&gt;
+</code></pre></div></section><section>
+<h3>How can I reference windows or unix environment variables in my POM?</h3>
+<p>Starting in maven <em>2.0.1</em>, you can reference windows and unix 
environment variables inside your pom.xml or settings.xml using an expression 
of the form:
+<code>$\{env.VARNAME\}</code>
+So, if you wanted to reference your home directory environment variable, you 
might use: <code>$\{env.HOME\}</code></p></section><section>
+<h3>How do I know which phase a plug-in is associated with?</h3>
+<p>Open the plugin's Mojo class source code and look for @phase. This tells 
which phase the plugin is associated.</p></section><section>
+<h3>Where to get sun.jdk-tools-jar-1.4.0 on MacOSX?</h3>
+<p>There are no tools.jar on a mac. The classes are included in the normal 
java runtime
+( /System/Library/Frameworks/ JavaVM.framework/Classes/classes.jar.
+Refer to this link 
[http://lists.apple.com/archives/java-dev/2002/Jun/msg00901.html] )</p>
+<p>You only have to modify the <code>&lt;systemPath&gt;</code> pointing to 
your classes.jar on MacOSX.</p>
+
+<div class="verbatim">
+<pre><code>&lt;dependency&gt;
+            &lt;groupId&gt;sun.jdk&lt;/groupId&gt;
+            &lt;artifactId&gt;tools&lt;/artifactId&gt;
+            &lt;version&gt;1.5.0&lt;/version&gt;
+            
&lt;systemPath&gt;/System/Library/Frameworks/JavaVM.framework/Versions/ 
1.5/Classes/classes.jar&lt;/systemPath&gt;
+            &lt;scope&gt;system&lt;/scope&gt;
+        &lt;/dependency&gt;
+</code></pre></div></section><section>
+<h3>How do I include tools.jar in my dependencies?</h3>
+<p>The following code includes tools.jar on Sun JDKs (it is already included 
in the runtime for Mac OS X and some free JDKs).</p>
+
+<div class="verbatim">
+<pre><code>...
+  &lt;profiles&gt;
+    &lt;profile&gt;
+      &lt;id&gt;default-tools.jar&lt;/id&gt;
+      &lt;activation&gt;
+        &lt;property&gt;
+          &lt;name&gt;java.vendor&lt;/name&gt;
+          &lt;value&gt;Sun Microsystems Inc.&lt;/value&gt;
+       &lt;/property&gt;
+     &lt;/activation&gt;
+      &lt;dependencies&gt;
+        &lt;dependency&gt;
+          &lt;groupId&gt;com.sun&lt;/groupId&gt;
+          &lt;artifactId&gt;tools&lt;/artifactId&gt;
+          &lt;version&gt;1.4.2&lt;/version&gt;
+          &lt;scope&gt;system&lt;/scope&gt;
+          &lt;systemPath&gt;${java.home}/../lib/tools.jar&lt;/systemPath&gt;
+       &lt;/dependency&gt;
+     &lt;/dependencies&gt;
+   &lt;/profile&gt;
+ &lt;/profiles&gt;
+  ...
+</code></pre></div></section><section>
+<h3>How to remove the artifact in the local repository?</h3>
+<p>As of now, There is no tool for it. You have to manually delete them in 
your local repository. However,
+there is already some discussion about this, Please refer to this links for 
more info.</p>
+<p>[http://jira.codehaus.org/browse/MNG-233]
+[http://jira.codehaus.org/browse/MRELEASE-68]</p></section><section>
+<h3>How to make a war artifact as a dependency?</h3>
+<p>When specifying a war as dependency, make sure that you have set the 
<code>&lt;type&gt;</code> to war.</p>
+
+<div class="verbatim">
+<pre><code>&lt;dependency&gt;
+        &lt;groupId&gt;&lt;!-- groupId of the war --&gt;&lt;/groupId&gt;
+        &lt;artifactId&gt;&lt;!-- artifactId of the war 
--&gt;&lt;/artifactId&gt;
+       &lt;version&gt;&lt;! -- version of the war --&gt;&lt;/version&gt;
+         &lt;type&gt;war&lt;/type&gt;
+        &lt;/dependency&gt;
+</code></pre></div></section><section>
+<h3>How can I change the default location of the generated jar when I command 
&#x201c;mvn package&#x201d;?</h3>
+<p>By default, the location of the generated jar is in 
${project.build.directory} or in your target directory.
+We can change this by configuring the outputDirectory of maven-jar-plugin.</p>
+
+<div class="verbatim">
+<pre><code>&lt;plugin&gt;
+            &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+            &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
+            &lt;configuration&gt;
+                &lt;outputDirectory&gt;${project.build.directory}/&lt;!-- 
directory --&gt;&lt;/outputDirectory&gt;
+            &lt;/configuration&gt;
+        &lt;/plugin&gt;
+</code></pre></div></section><section>
+<h3>How can I disable the timestamp appended in my deployed artifact?</h3>
+<p>When your deployed artifact is appended by timestamps it means that the 
artifact version is still in SNAPSHOT,
+meaning it is still in the state of development. There are some ways the 
append process of the timestamp,</p>
+<ol style="list-style-type: decimal">
+
+<li>
+<p>Change the version of your artifact.
+For example, From 1.0-SNAPSHOT to 1.0</p></li>
+<li>
+<p>Use the maven-release-plugin to prepare and create the official RELEASE 
version of your project artifact.
+Please see [http://maven.apache.org/guides/mini/guide-releasing.html] for more 
reference.</p></li>
+</ol></section><section>
+<h3>How to run a java program from Maven?</h3>
+<p>You may use the exec-maven-plugin for this. 
[http://mojo.codehaus.org/exec-maven-plugin/usage.html]</p></section><section>
+<h3>How can I make the war plugin produces an exploded war instead of .war 
file?</h3>
+<p>You may use war:exploded goal for this.</p></section><section>
+<h3>Is there any variable to determine what version of an artifact was 
deployed after the deploy step runs?</h3>
+<p>Use <code>$project.artifact.resolvedVersion</code>.</p></section><section>
+<h3>How do I get the top line of a table to be &#x201c;headers&#x201d; for 
that column in APT?</h3>
+<p>With the snapshot you can do:</p>
+
+<div class="verbatim">
+<pre><code>](]( header 1 ](]( header 2 ](]( header 3 ](](
+</code></pre></div>
+<p>Example:</p>
+
+<div class="verbatim">
+<pre><code>*----------------+----------------*--------------------------+
+](]( header 1 ](](   ]( ](]( header 2 ](]( ]( ](]( header 2 ](](
+*----------------+----------------*--------------------------+
+cell1            ]( cell1          ](  cell3
+*----------------+----------------*--------------------------+
+</code></pre></div></section><section>
+<h3>What is the suggested way to download a remote file?</h3>
+<p>Wagon is really for repository interaction, though it could be used for 
this.</p>
+<p>To get the wagon:</p>
+
+<div class="verbatim">
+<pre><code>/* @component roleHint=&quot;http&quot; */
+Wagon wagon;
+</code></pre></div></section><section>
+<h3>How do I set the base directory for creating the packages created by 
assembly?</h3>
+<p>The assembly plugin, by default, saves the packages to your 
project.build.directory directory from your pom or</p>
+
+<div class="verbatim">
+<pre><code>&lt;project&gt;
+...
+&lt;build&gt;
+  &lt;directory&gt;path-here&lt;/directory
+  ...
+&lt;/build&gt;
+...
+&lt;/project
+</code></pre></div>
+<p>Also, you can have assembly plugin use a different directory by setting the 
plugin parameter <code>outputDirectory</code> to your desired directory.
+More info about the assembly plugin can be found here: 
[http://maven.apache.org/plugins/maven-assembly-plugin/introduction.html]</p></section><section>
+<h3>How do I filter which classes should be put inside the packaged jar?</h3>
+<p>All compiled classes are always put into the packaged jar. However, you can 
configure the compiler plugin to exclude compiling some of the java sources 
using the compiler parameter <code>excludes</code> as follows:</p>
+
+<div class="verbatim">
+<pre><code>&lt;project&gt;
+ ...
+ &lt;build&gt;
+   ...
+   &lt;plugins&gt;
+     &lt;plugin&gt;
+       &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+       &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
+       &lt;configuration&gt;
+         &lt;excludes&gt;
+           &lt;exclude&gt;**/NotNeeded*.java&lt;/exclude&gt;
+         &lt;/excludes&gt;
+       &lt;/configuration&gt;
+     &lt;/plugin&gt;
+   &lt;/plugins&gt;
+   ...
+ &lt;/build&gt;
+&lt;/project&gt;
+</code></pre></div></section><section>
+<h3>How do I install the package generated by the assembly plugin to be 
installed in the local repository?</h3>
+<p>Use the assembly plugin goal {{assembly:attach}} to install the generated 
package into the local repository. However, this feature is still in SVN. 
Please see <a 
href="http://maven.apache.org/guides/development/guide-testing-development-plugins.html";
 class="externalLink">Guide to Testing Development Plugins</a> for more info on 
how to use it.</p></section><section>
+<h3>Is it possible to use HashMap as configurable parameter in a plugin? How 
do I configure that in pom.xml?</h3>
+<p>Yes. Its possible to use a HashMap field as a parameter in your plugin. To 
use it, your pom configuration should look like this:</p>
+
+<div class="verbatim">
+<pre><code>&lt;myMap&gt;
+    &lt;yourkey&gt;yourvalue&lt;/yourkey&gt;
+    .....
+ &lt;/myMap&gt;
+</code></pre></div></section><section>
+<h3>How do I setup the classpath of my antrun plugin to use the classpath from 
maven?</h3>
+<p>The maven classpaths are available as ant references when running your ant 
script. The ant reference names and some examples can be found here: <a 
href="http://maven.apache.org/plugins/maven-antrun-plugin/classpaths.html"; 
class="externalLink">maven-antrun-plugin</a></p></section><section>
+<h3>Is there a way to read and examine the contents of a pom.xml file from 
inside an application?</h3>
+<p>Yes. You can use the org/apache/maven/model/io/xpp3/MavenXpp3Reader class 
from maven model to read a pom.</p></section><section>
+<h3>Which plugins have StarTeam (SCM) support? How do they differ?</h3>
+<p>maven-scm-plugin and maven-release-plugin support via maven-scm's API and 
maven-scm-provider-starteam. Release plugin is used to cut a new release of 
your project (label, build, assembly, deploy, etc.). SCM plugin, on the other 
hand, is for scm tasks.</p></section><section>
+<h3>Is there a way to use the deploy phase to perform some tasks without maven 
trying to install the artifact to a maven repository?</h3>
+<p>If you run &#x2018;mvn deploy&#x2019;, the 
&#x2018;maven-deploy-plugin&#x2019; kicks in. There's no flag that tells it not 
to upload the file. So you'd have to make a new lifecycle mapping/packaging for 
each <code>&lt;type&gt;</code> of artifact in your project. There's no way to 
&#x2018;delete&#x2019; mojo's from the default lifecycle. What you could do is 
specify the remote repo as [file:///tmp]or something. Usually people want to 
&#x2018;upload&#x2019; a war to the tomcat webapps dir, also known as 
deploying. That kind of deploying is not something m2 has a phase for.</p>
+<p>What you can do is create a profile in the pom (or super pom), and add a 
task/mojo to the &#x2018;install&#x2019; phase. For instance, you can have the 
antrun plugin copy the artifact to the tomcat directory (its location specified 
in settings.xml). The profile is named &#x2018;dev&#x2019;, so whenever you 
want to deploy a war, you just type &#x2018;mvn install -Pdev&#x2019;. Don't 
bind to the deploy phase, but to the install or package 
phase.</p></section><section>
+<h3>Repository precedence</h3>
+<p>The repositories are searched through based in the order they are defined 
in your pom. The inherited repositories are always searched last.
+Note: You don't have to define the central repo (i.e. 
ibiblio).</p></section><section>
+<h3>Is it possible to exclude a package from the generated jar file?</h3>

[... 296 lines stripped ...]


Reply via email to