You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-commits@maven.apache.org by sl...@apache.org on 2023/02/09 00:34:07 UTC

svn commit: r1907531 [11/25] - in /maven/website/content: ./ apache-resource-bundles/ archives/maven-2.x/ background/ developers/ developers/conventions/ developers/release/ developers/website/ docs/ docs/2.0.1/ docs/2.0.10/ docs/2.0.11/ docs/2.0.2/ do...

Modified: maven/website/content/guides/introduction/introduction-to-profiles.html
==============================================================================
--- maven/website/content/guides/introduction/introduction-to-profiles.html (original)
+++ maven/website/content/guides/introduction/introduction-to-profiles.html Thu Feb  9 00:34:05 2023
@@ -2,7 +2,7 @@
 
 
 <!--
- | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from content/apt/guides/introduction/introduction-to-profiles.apt at 2023-02-08
+ | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from content/markdown/guides/introduction/introduction-to-profiles.md at 2023-02-09
  | Rendered using Apache Maven Fluido Skin 1.11.1
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" lang="">
@@ -48,8 +48,8 @@
           <ul class="breadcrumb">
       <li class=""><a href="https://www.apache.org/" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li>
       <li class=""><a href="../../index.html" title="Maven">Maven</a><span class="divider">/</span></li>
-    <li class="active ">Introduction to build profiles <a href="https://github.com/apache/maven-site/tree/master/content/apt/guides/introduction/introduction-to-profiles.apt"><img src="../../images/accessories-text-editor.png" title="Edit" /></a></li>
-        <li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 2023-02-08</li>
+    <li class="active ">Introduction to build profiles <a href="https://github.com/apache/maven-site/tree/master/content/markdown/guides/introduction/introduction-to-profiles.md"><img src="../../images/accessories-text-editor.png" title="Edit" /></a></li>
+        <li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 2023-02-09</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>
@@ -145,96 +145,162 @@
           </div>
         </header>
         <main id="bodyColumn"  class="span10" >
-<section>
-<h1>Introduction to Build Profiles</h1>
-<ul>
-<li><a href="#What_are_the_different_types_of_profile.3F_Where_is_each_defined.3F">What are the different types of profile? Where is each defined?</a></li>
-<li><a href="#How_can_a_profile_be_triggered.3F_How_does_this_vary_according_to_the_type_of_profile_being_used.3F">How can a profile be triggered? How does this vary according to the type of profile being used?</a>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<section><section>
+<h2>Introduction to Build Profiles</h2>
 <ul>
-<li><a href="#Details_on_profile_activation">Details on profile activation</a>
+
+<li>
+<p><a href="What_are_the_different_types_of_profile.3F_Where_is_each_defined.3F">What are the different types of profile? Where is each defined?</a></p></li>
+<li>
+<p><a href="How_can_a_profile_be_triggered.3F_How_does_this_vary_according_to_the_type_of_profile_being_used.3F">How can a profile be triggered? How does this vary according to the type of profile being used?</a></p></li>
+<li>
+<p><a href="Details_on_profile_activation">Details on profile activation</a></p></li>
+<li>
+<p><a href="Explicit_profile_activation">Explicit profile activation</a></p></li>
+<li>
+<p><a href="Implicit_profile_activation">Implicit profile activation</a></p></li>
+<li>
+<p><a href="JDK">JDK</a></p></li>
+<li>
+<p><a href="OS">OS</a></p></li>
+<li>
+<p><a href="Property">Property</a></p></li>
+<li>
+<p><a href="Files">Files</a></p></li>
+<li>
+<p><a href="Deactivating_a_profile">Deactivating a profile</a></p></li>
+<li>
+<p><a href="Which_areas_of_a_POM_can_be_customized_by_each_type_of_profile.3F_Why.3F">Which areas of a POM can be customized by each type of profile? Why?</a></p></li>
+<li>
+<p><a href="Profiles_in_external_files">Profiles in external files</a></p></li>
+<li>
+<p><a href="Profiles_in_POMs">Profiles in POMs</a></p></li>
+<li>
+<p><a href="POM_elements_outside_.3Cprofiles.3E">POM elements outside &lt;profiles&gt;</a></p></li>
+<li>
+<p><a href="Profile_Order">Profile Order</a></p></li>
+<li>
+<p><a href="Profile_Pitfalls">Profile Pitfalls</a></p></li>
+<li>
+<p><a href="External_Properties">External Properties</a></p></li>
+<li>
+<p><a href="Incomplete_Specification_of_a_Natural_Profile_Set">Incomplete Specification of a Natural Profile Set</a></p></li>
+<li>
+<p><a href="How_can_I_tell_which_profiles_are_in_effect_during_a_build.3F">How can I tell which profiles are in effect during a build?</a></p></li>
+<li>
+<p><a href="Naming_Conventions">Naming Conventions</a></p></li>
+</ul>
+<p>Apache Maven goes to great lengths to ensure that builds are portable. Among other things, this means allowing build configuration inside the POM, avoiding <strong>all</strong> filesystem references (in inheritance, dependencies, and other places), and leaning much more heavily on the local repository to store the metadata needed to make this possible.</p>
+<p>However, sometimes portability is not entirely possible. Under certain conditions, plugins may need to be configured with local filesystem paths. Under other circumstances, a slightly different dependency set will be required, and the project's artifact name may need to be adjusted slightly. And at still other times, you may even need to include a whole plugin in the build lifecycle depending on the detected build environment.</p>
+<p>To address these circumstances, Maven supports build profiles. Profiles are specified using a subset of the elements available in the POM itself (plus one extra section), and are triggered in any of a variety of ways. They modify the POM at build time, and are meant to be used in complementary sets to give equivalent-but-different parameters for a set of target environments (providing, for example, the path of the appserver root in the development, testing, and production environments). As such, profiles can easily lead to differing build results from different members of your team. However, used properly, profiles can be used while still preserving project portability. This will also minimize the use of <code>-f</code> option of maven which allows user to create another POM with different parameters or configuration to build which makes it more maintainable since it is running with one POM only.</p><section>
+<h3>What are the different types of profile? Where is each defined?</h3>
 <ul>
-<li><a href="#Explicit_profile_activation">Explicit profile activation</a></li>
-<li><a href="#Implicit_profile_activation">Implicit profile activation</a>
+
+<li>
+<p>Per Project</p>
 <ul>
-<li><a href="#JDK">JDK</a></li>
-<li><a href="#OS">OS</a></li>
-<li><a href="#Property">Property</a></li>
-<li><a href="#Files">Files</a></li></ul></li></ul></li>
-<li><a href="#Deactivating_a_profile">Deactivating a profile</a></li></ul></li>
-<li><a href="#Which_areas_of_a_POM_can_be_customized_by_each_type_of_profile.3F_Why.3F">Which areas of a POM can be customized by each type of profile? Why?</a>
+
+<li>Defined in the POM itself <code>(pom.xml)</code>.</li>
+</ul></li>
+<li>
+<p>Per User</p>
 <ul>
-<li><a href="#Profiles_in_external_files">Profiles in external files</a></li>
-<li><a href="#Profiles_in_POMs">Profiles in POMs</a></li>
-<li><a href="#POM_elements_outside_.3Cprofiles.3E">POM elements outside &lt;profiles&gt;</a></li></ul></li>
-<li><a href="#Profile_Order">Profile Order</a></li>
-<li><a href="#Profile_Pitfalls">Profile Pitfalls</a>
+
+<li>Defined in the <a href="/ref/current/maven-settings/settings.html">Maven-settings</a> <code>(%USER_HOME%/.m2/settings.xml)</code>.</li>
+</ul></li>
+<li>
+<p>Global</p>
 <ul>
-<li><a href="#External_Properties">External Properties</a></li>
-<li><a href="#Incomplete_Specification_of_a_Natural_Profile_Set">Incomplete Specification of a Natural Profile Set</a></li></ul></li>
-<li><a href="#How_can_I_tell_which_profiles_are_in_effect_during_a_build.3F">How can I tell which profiles are in effect during a build?</a></li>
-<li><a href="#Naming_Conventions">Naming Conventions</a></li></ul>
-<p>Apache Maven goes to great lengths to ensure that builds are portable. Among other things, this means allowing build configuration inside the POM, avoiding <b>all</b> filesystem references (in inheritance, dependencies, and other places), and leaning much more heavily on the local repository to store the metadata needed to make this possible.</p>
-<p>However, sometimes portability is not entirely possible. Under certain conditions, plugins may need to be configured with local filesystem paths. Under other circumstances, a slightly different dependency set will be required, and the project's artifact name may need to be adjusted slightly. And at still other times, you may even need to include a whole plugin in the build lifecycle depending on the detected build environment.</p>
-<p>To address these circumstances, Maven supports build profiles. Profiles are specified using a subset of the elements available in the POM itself (plus one extra section), and are triggered in any of a variety of ways. They modify the POM at build time, and are meant to be used in complementary sets to give equivalent-but-different parameters for a set of target environments (providing, for example, the path of the appserver root in the development, testing, and production environments). As such, profiles can easily lead to differing build results from different members of your team. However, used properly, profiles can be used while still preserving project portability. This will also minimize the use of <code>-f</code> option of maven which allows user to create another POM with different parameters or configuration to build which makes it more maintainable since it is running with one POM only.</p><section>
-<h2>What are the different types of profile? Where is each defined?</h2>
+
+<li>Defined in the <a href="/ref/current/maven-settings/settings.html">global Maven-settings</a> <code>($\{maven.home\}/conf/settings.xml)</code>.</li>
+</ul></li>
+<li>
+<p>Profile descriptor</p>
 <ul>
-<li>Per Project
-<p>- Defined in the POM itself <code>(pom.xml)</code>.</p></li>
-<li>Per User
-<p>- Defined in the <a href="/ref/current/maven-settings/settings.html"> Maven-settings</a> <code>(%USER_HOME%/.m2/settings.xml)</code>.</p></li>
-<li>Global
-<p>- Defined in the <a href="/ref/current/maven-settings/settings.html"> global Maven-settings</a> <code>(${maven.home}/conf/settings.xml)</code>.</p></li>
-<li>Profile descriptor
-<p>- a descriptor located in <a href="/ref/2.2.1/maven-profile/profiles.html">project basedir <code>(profiles.xml)</code></a> (no longer supported in Maven 3.0 and above; see <a class="externalLink" href="https://cwiki.apache.org/confluence/display/MAVEN/Maven+3.x+Compatibility+Notes#Maven3.xCompatibilityNotes-profiles.xml"> Maven 3 compatibility notes</a>)</p></li></ul></section><section>
-<h2>How can a profile be triggered? How does this vary according to the type of profile being used?</h2>
+
+<li>a descriptor located in <a href="/ref/2.2.1/maven-profile/profiles.html">project basedir <code>(profiles.xml)</code></a> (no longer supported in Maven 3.0 and above; see <a href="https://cwiki.apache.org/confluence/display/MAVEN/Maven+3.x+Compatibility+Notes#Maven3.xCompatibilityNotes-profiles.xml" class="externalLink">Maven 3 compatibility notes</a>)</li>
+</ul></li>
+</ul></section><section>
+<h3>How can a profile be triggered? How does this vary according to the type of profile being used?</h3>
 <p>A profile can be activated in several ways:</p>
 <ul>
-<li>Explicitly</li>
-<li>Implicitly</li>
-<li>Based on OS</li>
-<li>Based on system properties</li>
-<li>Based on presence of files</li></ul>
+
+<li>
+<p>Explicitly</p></li>
+<li>
+<p>Implicitly</p></li>
+<li>
+<p>Based on OS</p></li>
+<li>
+<p>Based on system properties</p></li>
+<li>
+<p>Based on presence of files</p></li>
+</ul>
 <p>Refer to the sections below for details.</p><section>
-<h3>Details on profile activation</h3><section>
-<h4>Explicit profile activation</h4>
+<h4>Details on profile activation</h4><section>
+<h5>Explicit profile activation</h5>
 <p>Profiles can be explicitly specified using the <code>-P</code> command line flag.</p>
-<p>This flag is followed by a comma-delimited list of profile IDs to use. The profile(s) specified in the option are activated in addition to any profiles which are activated by their activation configuration or the <code>&lt;activeProfiles&gt;</code> section in <code>settings.xml</code>. From Maven 4 onward, Maven will refuse to activate or deactivate a profile that cannot be resolved. To prevent this, prefix the profile identifier with an <code>?</code>, marking it as optional:</p>
-<div>
-<pre>mvn groupId:artifactId:goal -P profile-1,profile-2,?profile-3</pre></div>
-<p>Profiles can be activated in the Maven settings, via the <code>&lt;activeProfiles&gt;</code> section. This section takes a list of <code>&lt;activeProfile&gt;</code> elements, each containing a profile-id inside.</p>
-<div class="source"><pre class="prettyprint linenums">&lt;settings&gt;
+<p>This flag is followed by a comma-delimited list of profile IDs to use. The profile(s) specified in the option are activated in addition to any profiles which are activated by their activation configuration or the <code>\&lt;activeProfiles\&gt;</code> section in <code>settings.xml</code>. From Maven 4 onward, Maven will refuse to activate or deactivate a profile that cannot be resolved. To prevent this, prefix the profile identifier with an <code>?</code>, marking it as optional:</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>mvn groupId:artifactId:goal -P profile-1,profile-2,?profile-3
+</code></pre></div>
+<p>Profiles can be activated in the Maven settings, via the <code>\&lt;activeProfiles\&gt;</code> section. This section takes a list of <code>\&lt;activeProfile\&gt;</code> elements, each containing a profile-id inside.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>&lt;settings&gt;
   ...
   &lt;activeProfiles&gt;
     &lt;activeProfile&gt;profile-1&lt;/activeProfile&gt;
   &lt;/activeProfiles&gt;
   ...
-&lt;/settings&gt;</pre></div>
-<p>Profiles listed in the <code>&lt;activeProfiles&gt;</code> tag would be activated by default every time a project use it.</p></section><section>
-<h4>Implicit profile activation</h4>
-<p>Profiles can be automatically triggered based on the detected state of the build environment. These triggers are specified via an <code>&lt;activation&gt;</code> section in the profile itself. Currently, this detection is limited to JDK version matching, operating system matching or the presence/the value of a system property. Here are some examples.</p><section>
-<h5>JDK</h5>
-<p>The following configuration will trigger the profile when the JDK's version <i>starts with</i> &quot;1.4&quot; (eg. &quot;1.4.0_08&quot;, &quot;1.4.2_07&quot;, &quot;1.4&quot;), in particular it <i>won't be active</i> for <b>newer</b> versions like &quot;1.8&quot; or &quot;11&quot;:</p>
-<div class="source"><pre class="prettyprint linenums">&lt;profiles&gt;
+&lt;/settings&gt;
+</code></pre></div>
+<p>Profiles listed in the <code>\&lt;activeProfiles\&gt;</code> tag would be activated by default every time a project use it.</p></section><section>
+<h5>Implicit profile activation</h5>
+<p>Profiles can be automatically triggered based on the detected state of the build environment. These triggers are specified via an <code>\&lt;activation\&gt;</code> section in the profile itself. Currently, this detection is limited to JDK version matching, operating system matching or the presence/the value of a system property. Here are some examples.</p>JDK
+<p>The following configuration will trigger the profile when the JDK's version <em>starts with</em> &#x201c;1.4&#x201d; (eg. &#x201c;1.4.0_08&#x201d;, &#x201c;1.4.2_07&#x201d;, &#x201c;1.4&#x201d;), in particular it <em>won't be active</em> for <strong>newer</strong> versions like &#x201c;1.8&#x201d; or &#x201c;11&#x201d;:</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>&lt;profiles&gt;
   &lt;profile&gt;
     &lt;activation&gt;
       &lt;jdk&gt;1.4&lt;/jdk&gt;
     &lt;/activation&gt;
     ...
   &lt;/profile&gt;
-&lt;/profiles&gt;</pre></div>
-<p>Ranges can also be used as of Maven 2.1 (refer to the <a href="/enforcer/enforcer-rules/versionRanges.html"> Enforcer Version Range Syntax</a> for more information). Range values must start with either <code>[</code> or <code>(</code> otherwise the value is interpreted as prefix. The following honours versions 1.3, 1.4 and 1.5.</p>
-<div class="source"><pre class="prettyprint linenums">&lt;profiles&gt;
+&lt;/profiles&gt;
+</code></pre></div>
+<p>Ranges can also be used as of Maven 2.1 (refer to the <a href="/enforcer/enforcer-rules/versionRanges.html">Enforcer Version Range Syntax</a> for more information). Range values must start with either <code>\[</code> or <code>(</code> otherwise the value is interpreted as prefix. The following honours versions 1.3, 1.4 and 1.5.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>&lt;profiles&gt;
   &lt;profile&gt;
     &lt;activation&gt;
       &lt;jdk&gt;[1.3,1.6)&lt;/jdk&gt;
     &lt;/activation&gt;
     ...
   &lt;/profile&gt;
-&lt;/profiles&gt;</pre></div>
-<p><i>Note:</i> an upper bound such as <code>,1.5]</code> is likely not to include most releases of 1.5, since they will have an additional &quot;patch&quot; release such as <code>_05</code> that is not taken into consideration in the above range.</p></section><section>
-<h5>OS</h5>
+&lt;/profiles&gt;
+</code></pre></div>
+<p><em>Note:</em> an upper bound such as <code>,1.5\]</code> is likely not to include most releases of 1.5, since they will have an additional &#x201c;patch&#x201d; release such as <code>_05</code> that is not taken into consideration in the above range.</p>OS
 <p>This next one will activate based on the detected operating system. See the <a href="/enforcer/enforcer-rules/requireOS.html">Maven Enforcer Plugin</a> for more details about OS values.</p>
-<div class="source"><pre class="prettyprint linenums">&lt;profiles&gt;
+
+<div class="source"><pre class="prettyprint linenums"><code>&lt;profiles&gt;
   &lt;profile&gt;
     &lt;activation&gt;
       &lt;os&gt;
@@ -246,10 +312,11 @@
     &lt;/activation&gt;
     ...
   &lt;/profile&gt;
-&lt;/profiles&gt;</pre></div></section><section>
-<h5>Property</h5>
-<p>The profile below will be activated when the system property &quot;debug&quot; is specified with any value:</p>
-<div class="source"><pre class="prettyprint linenums">&lt;profiles&gt;
+&lt;/profiles&gt;
+</code></pre></div>Property
+<p>The profile below will be activated when the system property &#x201c;debug&#x201d; is specified with any value:</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>&lt;profiles&gt;
   &lt;profile&gt;
     &lt;activation&gt;
       &lt;property&gt;
@@ -258,9 +325,11 @@
     &lt;/activation&gt;
     ...
   &lt;/profile&gt;
-&lt;/profiles&gt;</pre></div>
-<p>The following profile will be activated when the system property &quot;debug&quot; is not defined at all:</p>
-<div class="source"><pre class="prettyprint linenums">&lt;profiles&gt;
+&lt;/profiles&gt;
+</code></pre></div>
+<p>The following profile will be activated when the system property &#x201c;debug&#x201d; is not defined at all:</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>&lt;profiles&gt;
   &lt;profile&gt;
     &lt;activation&gt;
       &lt;property&gt;
@@ -269,9 +338,11 @@
     &lt;/activation&gt;
     ...
   &lt;/profile&gt;
-&lt;/profiles&gt;</pre></div>
-<p>The following profile will be activated when the system property &quot;debug&quot; is not defined, or is defined with a value which is not &quot;true&quot;.</p>
-<div class="source"><pre class="prettyprint linenums">&lt;profiles&gt;
+&lt;/profiles&gt;
+</code></pre></div>
+<p>The following profile will be activated when the system property &#x201c;debug&#x201d; is not defined, or is defined with a value which is not &#x201c;true&#x201d;.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>&lt;profiles&gt;
   &lt;profile&gt;
     &lt;activation&gt;
       &lt;property&gt;
@@ -281,13 +352,16 @@
     &lt;/activation&gt;
     ...
   &lt;/profile&gt;
-&lt;/profiles&gt;</pre></div>
+&lt;/profiles&gt;
+</code></pre></div>
 <p>To activate this you would type one of those on the command line:</p>
-<div>
-<pre>mvn groupId:artifactId:goal
-mvn groupId:artifactId:goal -Ddebug=false</pre></div>
-<p>The next example will trigger the profile when the system property &quot;environment&quot; is specified with the value &quot;test&quot;:</p>
-<div class="source"><pre class="prettyprint linenums">&lt;profiles&gt;
+
+<div class="source"><pre class="prettyprint linenums"><code>mvn groupId:artifactId:goal
+mvn groupId:artifactId:goal -Ddebug=false
+</code></pre></div>
+<p>The next example will trigger the profile when the system property &#x201c;environment&#x201d; is specified with the value &#x201c;test&#x201d;:</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>&lt;profiles&gt;
   &lt;profile&gt;
     &lt;activation&gt;
       &lt;property&gt;
@@ -297,14 +371,17 @@ mvn groupId:artifactId:goal -Ddebug=fals
     &lt;/activation&gt;
     ...
   &lt;/profile&gt;
-&lt;/profiles&gt;</pre></div>
+&lt;/profiles&gt;
+</code></pre></div>
 <p>To activate this you would type this on the command line:</p>
-<div>
-<pre>mvn groupId:artifactId:goal -Denvironment=test</pre></div>
+
+<div class="source"><pre class="prettyprint linenums"><code>mvn groupId:artifactId:goal -Denvironment=test
+</code></pre></div>
 <p>As of Maven 3.0, profiles in the POM can also be activated based on properties from active profiles from the <code>settings.xml</code>.</p>
-<p><b>Note</b>: Environment variables like <code>FOO</code> are available as properties of the form <code>env.FOO</code>. Further note that environment variable names are normalized to all upper-case on Windows.</p>
+<p><strong>Note</strong>: Environment variables like <code>FOO</code> are available as properties of the form <code>env.FOO</code>. Further note that environment variable names are normalized to all upper-case on Windows.</p>
 <p>Since Maven 3.9.0 one can also evaluate the POM's packaging value by referencing property <code>packaging</code>. This is only useful where the profile activation is defined in a common parent POM which is reused among multiple Maven projects. The next example will trigger the profile when a project with packaging <code>war</code> is built:</p>
-<div class="source"><pre class="prettyprint linenums">&lt;profiles&gt;
+
+<div class="source"><pre class="prettyprint linenums"><code>&lt;profiles&gt;
   &lt;profile&gt;
     &lt;activation&gt;
       &lt;property&gt;
@@ -314,10 +391,11 @@ mvn groupId:artifactId:goal -Ddebug=fals
     &lt;/activation&gt;
     ...
   &lt;/profile&gt;
-&lt;/profiles&gt;</pre></div></section><section>
-<h5>Files</h5>
+&lt;/profiles&gt;
+</code></pre></div>Files
 <p>This example will trigger the profile when the generated file <code>target/generated-sources/axistools/wsdl2java/org/apache/maven</code> is missing.</p>
-<div class="source"><pre class="prettyprint linenums">&lt;profiles&gt;
+
+<div class="source"><pre class="prettyprint linenums"><code>&lt;profiles&gt;
   &lt;profile&gt;
     &lt;activation&gt;
       &lt;file&gt;
@@ -326,10 +404,12 @@ mvn groupId:artifactId:goal -Ddebug=fals
     &lt;/activation&gt;
     ...
   &lt;/profile&gt;
-&lt;/profiles&gt;</pre></div>
-<p>As of Maven 2.0.9, the tags <code>&lt;exists&gt;</code> and <code>&lt;missing&gt;</code> could be interpolated. Supported variables are system properties like <code>${user.home}</code> and environment variables like <code>${env.HOME}</code>. Please note that properties and values defined in the POM itself are not available for interpolation here, e.g. the above example activator cannot use <code>${project.build.directory}</code> but needs to hard-code the path <code>target</code>.</p>
+&lt;/profiles&gt;
+</code></pre></div>
+<p>As of Maven 2.0.9, the tags <code>\&lt;exists\&gt;</code> and <code>\&lt;missing\&gt;</code> could be interpolated. Supported variables are system properties like <code>$\{user.home\}</code> and environment variables like <code>$\{env.HOME\}</code>. Please note that properties and values defined in the POM itself are not available for interpolation here, e.g. the above example activator cannot use <code>$\{project.build.directory\}</code> but needs to hard-code the path <code>target</code>.</p>
 <p>Profiles can also be active by default using a configuration like the following:</p>
-<div class="source"><pre class="prettyprint linenums">&lt;profiles&gt;
+
+<div class="source"><pre class="prettyprint linenums"><code>&lt;profiles&gt;
   &lt;profile&gt;
     &lt;id&gt;profile-1&lt;/id&gt;
     &lt;activation&gt;
@@ -337,53 +417,77 @@ mvn groupId:artifactId:goal -Ddebug=fals
     &lt;/activation&gt;
     ...
   &lt;/profile&gt;
-&lt;/profiles&gt;</pre></div>
-<p>This profile will automatically be active for all builds unless another profile in the same POM is activated using one of the previously described methods. All profiles that are active by default are automatically deactivated when a profile in the POM is activated on the command line or through its activation config.</p></section></section></section><section>
-<h3>Deactivating a profile</h3>
-<p>Starting with Maven 2.0.10, one or more profiles can be deactivated using the command line by prefixing their identifier with either the character '!' or '-' as shown below:</p>
-<div>
-<pre>mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3</pre></div>
+&lt;/profiles&gt;
+</code></pre></div>
+<p>This profile will automatically be active for all builds unless another profile in the same POM is activated using one of the previously described methods. All profiles that are active by default are automatically deactivated when a profile in the POM is activated on the command line or through its activation config.</p></section></section><section>
+<h4>Deactivating a profile</h4>
+<p>Starting with Maven 2.0.10, one or more profiles can be deactivated using the command line by prefixing their identifier with either the character &#x2018;!&#x2019; or &#x2018;-&#x2019; as shown below:</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3
+</code></pre></div>
 <p>or</p>
-<div>
-<pre>mvn groupId:artifactId:goal -P -profile-1,-profile-2,-?profile-3</pre></div>
+
+<div class="source"><pre class="prettyprint linenums"><code>mvn groupId:artifactId:goal -P -profile-1,-profile-2,-?profile-3
+</code></pre></div>
 <p>This can be used to deactivate profiles marked as activeByDefault or profiles that would otherwise be activated through their activation config.</p></section></section><section>
-<h2>Which areas of a POM can be customized by each type of profile? Why?</h2>
-<p>Now that we've talked about where to specify profiles, and how to activate them, it will be useful to talk about <i>what</i> you can specify in a profile. As with the other aspects of profile configuration, this answer is not straightforward.</p>
+<h3>Which areas of a POM can be customized by each type of profile? Why?</h3>
+<p>Now that we've talked about where to specify profiles, and how to activate them, it will be useful to talk about <em>what</em> you can specify in a profile. As with the other aspects of profile configuration, this answer is not straightforward.</p>
 <p>Depending on where you choose to configure your profile, you will have access to varying POM configuration options.</p><section>
-<h3>Profiles in external files</h3>
-<p>Profiles specified in external files (i.e in <code>settings.xml</code> or <code>profiles.xml</code>) are not portable in the strictest sense. Anything that seems to stand a high chance of changing the result of the build is restricted to the inline profiles in the POM. Things like repository lists could simply be a proprietary repository of approved artifacts, and won't change the outcome of the build. Therefore, you will only be able to modify the <code>&lt;repositories&gt;</code> and <code>&lt;pluginRepositories&gt;</code> sections, plus an extra <code>&lt;properties&gt;</code> section.</p>
-<p>The <code>&lt;properties&gt;</code> section allows you to specify free-form key-value pairs which will be included in the interpolation process for the POM. This allows you to specify a plugin configuration in the form of <code>${profile.provided.path}</code>.</p></section><section>
-<h3>Profiles in POMs</h3>
-<p>On the other hand, if your profiles can be reasonably specified <i>inside</i> the POM, you have many more options. The trade-off, of course, is that you can only modify <i>that</i> project and its sub-modules. Since these profiles are specified inline, and therefore have a better chance of preserving portability, it's reasonable to say you can add more information to them without the risk of that information being unavailable to other users.</p>
+<h4>Profiles in external files</h4>
+<p>Profiles specified in external files (i.e in <code>settings.xml</code> or <code>profiles.xml</code>) are not portable in the strictest sense. Anything that seems to stand a high chance of changing the result of the build is restricted to the inline profiles in the POM. Things like repository lists could simply be a proprietary repository of approved artifacts, and won't change the outcome of the build. Therefore, you will only be able to modify the <code>\&lt;repositories\&gt;</code> and <code>\&lt;pluginRepositories\&gt;</code> sections, plus an extra <code>\&lt;properties\&gt;</code> section.</p>
+<p>The <code>\&lt;properties\&gt;</code> section allows you to specify free-form key-value pairs which will be included in the interpolation process for the POM. This allows you to specify a plugin configuration in the form of <code>$\{profile.provided.path\}</code>.</p></section><section>
+<h4>Profiles in POMs</h4>
+<p>On the other hand, if your profiles can be reasonably specified <em>inside</em> the POM, you have many more options. The trade-off, of course, is that you can only modify <em>that</em> project and its sub-modules. Since these profiles are specified inline, and therefore have a better chance of preserving portability, it's reasonable to say you can add more information to them without the risk of that information being unavailable to other users.</p>
 <p>Profiles specified in the POM can modify <a href="/ref/current/maven-model/maven.html">the following POM elements</a>:</p>
 <ul>
-<li><code>&lt;repositories&gt;</code></li>
-<li><code>&lt;pluginRepositories&gt;</code></li>
-<li><code>&lt;dependencies&gt;</code></li>
-<li><code>&lt;plugins&gt;</code></li>
-<li><code>&lt;properties&gt;</code> (not actually available in the main POM, but used behind the scenes)</li>
-<li><code>&lt;modules&gt;</code></li>
-<li><code>&lt;reports&gt;</code></li>
-<li><code>&lt;reporting&gt;</code></li>
-<li><code>&lt;dependencyManagement&gt;</code></li>
-<li><code>&lt;distributionManagement&gt;</code></li>
-<li>a subset of the <code>&lt;build&gt;</code> element, which consists of:
-<ul>
-<li><code>&lt;defaultGoal&gt;</code></li>
-<li><code>&lt;resources&gt;</code></li>
-<li><code>&lt;testResources&gt;</code></li>
-<li><code>&lt;directory&gt;</code></li>
-<li><code>&lt;finalName&gt;</code></li>
-<li><code>&lt;filters&gt;</code></li>
-<li><code>&lt;pluginManagement&gt;</code></li>
-<li><code>&lt;plugins&gt;</code></li></ul></li></ul></section><section>
-<h3>POM elements outside &lt;profiles&gt;</h3>
+
+<li>
+<p><code>\&lt;repositories\&gt;</code></p></li>
+<li>
+<p><code>\&lt;pluginRepositories\&gt;</code></p></li>
+<li>
+<p><code>\&lt;dependencies\&gt;</code></p></li>
+<li>
+<p><code>\&lt;plugins\&gt;</code></p></li>
+<li>
+<p><code>\&lt;properties\&gt;</code> (not actually available in the main POM, but used behind the scenes)</p></li>
+<li>
+<p><code>\&lt;modules\&gt;</code></p></li>
+<li>
+<p><code>\&lt;reports\&gt;</code></p></li>
+<li>
+<p><code>\&lt;reporting\&gt;</code></p></li>
+<li>
+<p><code>\&lt;dependencyManagement\&gt;</code></p></li>
+<li>
+<p><code>\&lt;distributionManagement\&gt;</code></p></li>
+<li>
+<p>a subset of the <code>\&lt;build\&gt;</code> element, which consists of:</p></li>
+<li>
+<p><code>\&lt;defaultGoal\&gt;</code></p></li>
+<li>
+<p><code>\&lt;resources\&gt;</code></p></li>
+<li>
+<p><code>\&lt;testResources\&gt;</code></p></li>
+<li>
+<p><code>\&lt;directory\&gt;</code></p></li>
+<li>
+<p><code>\&lt;finalName\&gt;</code></p></li>
+<li>
+<p><code>\&lt;filters\&gt;</code></p></li>
+<li>
+<p><code>\&lt;pluginManagement\&gt;</code></p></li>
+<li>
+<p><code>\&lt;plugins\&gt;</code></p></li>
+</ul></section><section>
+<h4>POM elements outside &lt;profiles&gt;</h4>
 <p>We don't allow modification of some POM elements outside of POM-profiles because these runtime modifications will not be distributed when the POM is deployed to the repository system, making that person's build of that project completely unique from others. While you can do this to some extent with the options given for external profiles, the danger is limited. Another reason is that this POM info is sometimes being reused from the parent POM.</p>
 <p>External files such as <code>settings.xml</code> and <code>profiles.xml</code> also does not support elements outside the POM-profiles. Let us take this scenario for elaboration. When the effective POM get deployed to a remote repository, any person can pickup its info out of the repository and use it to build a Maven project directly. Now, imagine that if we can set profiles in dependencies, which is very important to a build, or in any other elements outside POM-profiles in <code>settings.xml</code> then most probably we cannot expect someone else to use that POM from the repository and be able to build it. And we have to also think about how to share the <code>settings.xml</code> with others. Note that too many files to configure is very confusing and very hard to maintain. Bottom line is that since this is build data, it should be in the POM. One of the goals in Maven 2 is to consolidate all the information needed to run a build into a single file, or file hierarchy which is 
 the POM.</p></section></section><section>
-<h2>Profile Order</h2>
-<p>All profile elements in a POM from active profiles overwrite the global elements with the same name of the POM or extend those in case of collections. In case multiple profiles are active in the same POM or external file, the ones which are defined <b>later</b> take precedence over the ones defined <b>earlier</b> (independent of their profile id and activation order).</p>
+<h3>Profile Order</h3>
+<p>All profile elements in a POM from active profiles overwrite the global elements with the same name of the POM or extend those in case of collections. In case multiple profiles are active in the same POM or external file, the ones which are defined <strong>later</strong> take precedence over the ones defined <strong>earlier</strong> (independent of their profile id and activation order).</p>
 <p>Example:</p>
-<div class="source"><pre class="prettyprint linenums">&lt;project&gt;
+
+<div class="source"><pre class="prettyprint linenums"><code>&lt;project&gt;
   ...
   &lt;repositories&gt;
     &lt;repository&gt;
@@ -420,14 +524,16 @@ mvn groupId:artifactId:goal -Ddebug=fals
     ...
   &lt;/profiles&gt;
   ...
-&lt;/project&gt;</pre></div>
+&lt;/project&gt;
+</code></pre></div>
 <p>This leads to the repository list: <code>profile-2-repo, profile-1-repo, global-repo</code>.</p></section><section>
-<h2>Profile Pitfalls</h2>
+<h3>Profile Pitfalls</h3>
 <p>We've already mentioned the fact that adding profiles to your build has the potential to break portability for your project. We've even gone so far as to highlight circumstances where profiles are likely to break project portability. However, it's worth reiterating those points as part of a more coherent discussion about some pitfalls to avoid when using profiles.</p>
 <p>There are two main problem areas to keep in mind when using profiles. First are external properties, usually used in plugin configurations. These pose the risk of breaking portability in your project. The other, more subtle area is the incomplete specification of a natural set of profiles.</p><section>
-<h3>External Properties</h3>
+<h4>External Properties</h4>
 <p>External property definition concerns any property value defined outside the <code>pom.xml</code> but not defined in a corresponding profile inside it. The most obvious usage of properties in the POM is in plugin configuration. While it is certainly possible to break project portability without properties, these critters can have subtle effects that cause builds to fail. For example, specifying appserver paths in a profile that is specified in the <code>settings.xml</code> may cause your integration test plugin to fail when another user on the team attempts to build without a similar <code>settings.xml</code>. Consider the following <code>pom.xml</code> snippet for a web application project:</p>
-<div class="source"><pre class="prettyprint linenums">&lt;project&gt;
+
+<div class="source"><pre class="prettyprint linenums"><code>&lt;project&gt;
   ...
   &lt;build&gt;
     &lt;plugins&gt;
@@ -443,9 +549,11 @@ mvn groupId:artifactId:goal -Ddebug=fals
     &lt;/plugins&gt;
   &lt;/build&gt;
   ...
-&lt;/project&gt;</pre></div>
-<p>Now, in your local <code>${user.home}/.m2/settings.xml</code>, you have:</p>
-<div class="source"><pre class="prettyprint linenums">&lt;settings&gt;
+&lt;/project&gt;
+</code></pre></div>
+<p>Now, in your local <code>$\{user.home\}/.m2/settings.xml</code>, you have:</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>&lt;settings&gt;
   ...
   &lt;profiles&gt;
     &lt;profile&gt;
@@ -460,14 +568,16 @@ mvn groupId:artifactId:goal -Ddebug=fals
     &lt;activeProfile&gt;appserverConfig&lt;/activeProfile&gt;
   &lt;/activeProfiles&gt;
   ...
-&lt;/settings&gt;</pre></div>
-<p>When you build the <b>integration-test</b> lifecycle phase, your integration tests pass, since the path you've provided allows the test plugin to install and test this web application.</p>
-<p><i>However</i>, when your colleague attempts to build to <b>integration-test</b>, his build fails spectacularly, complaining that it cannot resolve the plugin configuration parameter <code>&lt;appserverHome&gt;</code>, or worse, that the value of that parameter - literally <code>${appserver.home}</code> - is invalid (if it warns you at all).</p>
-<p>Congratulations, your project is now non-portable. Inlining this profile in your <code>pom.xml</code> can help alleviate this, with the obvious drawback that each project hierarchy (allowing for the effects of inheritance) now have to specify this information. Since Maven provides good support for project inheritance, it's possible to stick this sort of configuration in the <code>&lt;pluginManagement&gt;</code> section of a team-level POM or similar, and simply inherit the paths.</p>
+&lt;/settings&gt;
+</code></pre></div>
+<p>When you build the <strong>integration-test</strong> lifecycle phase, your integration tests pass, since the path you've provided allows the test plugin to install and test this web application.</p>
+<p><em>However</em>, when your colleague attempts to build to <strong>integration-test</strong>, his build fails spectacularly, complaining that it cannot resolve the plugin configuration parameter <code>\&lt;appserverHome\&gt;</code>, or worse, that the value of that parameter - literally <code>$\{appserver.home\}</code> - is invalid (if it warns you at all).</p>
+<p>Congratulations, your project is now non-portable. Inlining this profile in your <code>pom.xml</code> can help alleviate this, with the obvious drawback that each project hierarchy (allowing for the effects of inheritance) now have to specify this information. Since Maven provides good support for project inheritance, it's possible to stick this sort of configuration in the <code>\&lt;pluginManagement\&gt;</code> section of a team-level POM or similar, and simply inherit the paths.</p>
 <p>Another, less attractive answer might be standardization of development environments. However, this will tend to compromise the productivity gain that Maven is capable of providing.</p></section><section>
-<h3>Incomplete Specification of a Natural Profile Set</h3>
+<h4>Incomplete Specification of a Natural Profile Set</h4>
 <p>In addition to the above portability-breaker, it's easy to fail to cover all cases with your profiles. When you do this, you're usually leaving one of your target environments high and dry. Let's take the example <code>pom.xml</code> snippet from above one more time:</p>
-<div class="source"><pre class="prettyprint linenums">&lt;project&gt;
+
+<div class="source"><pre class="prettyprint linenums"><code>&lt;project&gt;
   ...
   &lt;build&gt;
     &lt;plugins&gt;
@@ -483,9 +593,11 @@ mvn groupId:artifactId:goal -Ddebug=fals
     &lt;/plugins&gt;
   &lt;/build&gt;
   ...
-&lt;/project&gt;</pre></div>
+&lt;/project&gt;
+</code></pre></div>
 <p>Now, consider the following profile, which would be specified inline in the <code>pom.xml</code>:</p>
-<div class="source"><pre class="prettyprint linenums">&lt;project&gt;
+
+<div class="source"><pre class="prettyprint linenums"><code>&lt;project&gt;
   ...
   &lt;profiles&gt;
     &lt;profile&gt;
@@ -515,60 +627,73 @@ mvn groupId:artifactId:goal -Ddebug=fals
     &lt;/profile&gt;
   &lt;/profiles&gt;
   ..
-&lt;/project&gt;</pre></div>
-<p>This profile looks quite similar to the one from the last example, with a few important exceptions: it's plainly geared toward a development environment, a new profile named <code>appserverConfig-dev-2</code> is added and it has an activation section that will trigger its inclusion when the system properties contain &quot;env=dev&quot; for a profile named <code>appserverConfig-dev</code> and &quot;env=dev-2&quot; for a profile named <code>appserverConfig-dev-2</code>. So, executing:</p>
-<div>
-<pre>mvn -Denv=dev-2 integration-test</pre></div>
+&lt;/project&gt;
+</code></pre></div>
+<p>This profile looks quite similar to the one from the last example, with a few important exceptions: it's plainly geared toward a development environment, a new profile named <code>appserverConfig-dev-2</code> is added and it has an activation section that will trigger its inclusion when the system properties contain &#x201c;env=dev&#x201d; for a profile named <code>appserverConfig-dev</code> and &#x201c;env=dev-2&#x201d; for a profile named <code>appserverConfig-dev-2</code>. So, executing:</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>mvn -Denv=dev-2 integration-test
+</code></pre></div>
 <p>will result in a successful build, applying the properties given by profile named <code>appserverConfig-dev-2</code>. And when we execute</p>
-<div>
-<pre>mvn -Denv=dev integration-test</pre></div>
+
+<div class="source"><pre class="prettyprint linenums"><code>mvn -Denv=dev integration-test
+</code></pre></div>
 <p>it will result in a successful build applying the properties given by the profile named <code>appserverConfig-dev</code>. However, executing:</p>
-<div>
-<pre>mvn -Denv=production integration-test</pre></div>
-<p>will not do a successful build. Why? Because, the resulting non-interpolated literal value of <code>${appserver.home}</code> will not be a valid path for deploying and testing your web application. We haven't considered the case for the production environment when writing our profiles. The &quot;production&quot; environment (env=production), along with &quot;test&quot; and possibly even &quot;local&quot; constitute a natural set of target environments for which we may want to build the integration-test lifecycle phase. The incomplete specification of this natural set means we have effectively limited our valid target environments to the development environment. Your teammates - and probably your manager - will not see the humor in this. When you construct profiles to handle cases such as these, be sure to address the entire set of target permutations.</p>
-<p>As a quick aside, it's possible for user-specific profiles to act in a similar way. This means that profiles for handling different environments which are keyed to the user can act up when the team adds a new developer. While I suppose this <i>could</i> act as useful training for the newbie, it just wouldn't be nice to throw them to the wolves in this way. Again, be sure to think of the <i>whole</i> set of profiles.</p></section></section><section>
-<h2>How can I tell which profiles are in effect during a build?</h2>
+
+<div class="source"><pre class="prettyprint linenums"><code>mvn -Denv=production integration-test
+</code></pre></div>
+<p>will not do a successful build. Why? Because, the resulting non-interpolated literal value of <code>$\{appserver.home\}</code> will not be a valid path for deploying and testing your web application. We haven't considered the case for the production environment when writing our profiles. The &#x201c;production&#x201d; environment (env=production), along with &#x201c;test&#x201d; and possibly even &#x201c;local&#x201d; constitute a natural set of target environments for which we may want to build the integration-test lifecycle phase. The incomplete specification of this natural set means we have effectively limited our valid target environments to the development environment. Your teammates - and probably your manager - will not see the humor in this. When you construct profiles to handle cases such as these, be sure to address the entire set of target permutations.</p>
+<p>As a quick aside, it's possible for user-specific profiles to act in a similar way. This means that profiles for handling different environments which are keyed to the user can act up when the team adds a new developer. While I suppose this <em>could</em> act as useful training for the newbie, it just wouldn't be nice to throw them to the wolves in this way. Again, be sure to think of the <em>whole</em> set of profiles.</p></section></section><section>
+<h3>How can I tell which profiles are in effect during a build?</h3>
 <p>Determining active profiles will help the user to know what particular profiles has been executed during a build. We can use the <a href="/plugins/maven-help-plugin/">Maven Help Plugin</a> to tell what profiles are in effect during a build.</p>
-<div>
-<pre>  mvn help:active-profiles</pre></div>
-<p>Let us have some small samples that will help us to understand more on the <i>active-profiles</i> goal of that plugin.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>  mvn help:active-profiles
+</code></pre></div>
+<p>Let us have some small samples that will help us to understand more on the <em>active-profiles</em> goal of that plugin.</p>
 <p>From the last example of profiles in the <code>pom.xml</code>, you'll notice that there are two profiles named <code>appserverConfig-dev</code> and <code>appserverConfig-dev-2</code> which has been given different values for properties. If we go ahead and execute:</p>
-<div>
-<pre>  mvn help:active-profiles -Denv=dev</pre></div>
-<p>The result will be a bulleted list of the id of the profile with an activation property of &quot;env=dev&quot; together with the source where it was declared. See sample below.</p>
-<div>
-<pre>The following profiles are active:
 
- - appserverConfig-dev (source: pom)</pre></div>
+<div class="source"><pre class="prettyprint linenums"><code>  mvn help:active-profiles -Denv=dev
+</code></pre></div>
+<p>The result will be a bulleted list of the id of the profile with an activation property of &#x201c;env=dev&#x201d; together with the source where it was declared. See sample below.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>The following profiles are active:
+
+ - appserverConfig-dev (source: pom)
+</code></pre></div>
 <p>Now if we have a profile declared in <code>settings.xml</code> (refer to the sample of profile in <code>settings.xml</code>) and that have been set to be an active profile and execute:</p>
-<div>
-<pre>  mvn help:active-profiles</pre></div>
+
+<div class="source"><pre class="prettyprint linenums"><code>  mvn help:active-profiles
+</code></pre></div>
 <p>The result should be something like this</p>
-<div>
-<pre>The following profiles are active:
 
- - appserverConfig (source: settings.xml)</pre></div>
+<div class="source"><pre class="prettyprint linenums"><code>The following profiles are active:
+
+ - appserverConfig (source: settings.xml)
+</code></pre></div>
 <p>Even though we don't have an activation property, a profile has been listed as active. Why? Like we mentioned before, a profile that has been set as an active profile in the <code>settings.xml</code> is automatically activated.</p>
 <p>Now if we have something like a profile in the <code>settings.xml</code> that has been set as an active profile and also triggered a profile in the POM. Which profile do you think will have an effect on the build?</p>
-<div>
-<pre>  mvn help:active-profiles -P appserverConfig-dev</pre></div>
+
+<div class="source"><pre class="prettyprint linenums"><code>  mvn help:active-profiles -P appserverConfig-dev
+</code></pre></div>
 <p>This will list the activated profiles:</p>
-<div>
-<pre>The following profiles are active:
+
+<div class="source"><pre class="prettyprint linenums"><code>The following profiles are active:
 
  - appserverConfig-dev (source: pom)
- - appserverConfig (source: settings.xml)</pre></div>
+ - appserverConfig (source: settings.xml)
+</code></pre></div>
 <p>Even though it listed the two active profiles, we are not sure which one of them has been applied. To see the effect on the build execute:</p>
-<div>
-<pre>  mvn help:effective-pom -P appserverConfig-dev</pre></div>
+
+<div class="source"><pre class="prettyprint linenums"><code>  mvn help:effective-pom -P appserverConfig-dev
+</code></pre></div>
 <p>This will print the effective POM for this build configuration out to the console. Take note that profiles in the <code>settings.xml</code> takes higher priority than profiles in the POM. So the profile that has been applied here is <code>appserverConfig</code> not <code>appserverConfig-dev</code>.</p>
-<p>If you want to redirect the output from the plugin to a file called <code>effective-pom.xml</code>, use the command-line option <code>-Doutput=effective-pom.xml</code>.</p></section><section>
-<h2>Naming Conventions</h2>
-<p>By now you've noticed that profiles are a natural way of addressing the problem of different build configuration requirements for different target environments. Above, we discussed the concept of a &quot;natural set&quot; of profiles to address this situation, and the importance of considering the whole set of profiles that will be required.</p>
-<p>However, the question of how to organize and manage the evolution of that set is non-trivial as well. Just as a good developer strives to write self-documenting code, it's important that your profile id's give a hint to their intended use. One good way to do this is to use the common system property trigger as part of the name for the profile. This might result in names like <b>env-dev</b>, <b>env-test</b>, and <b>env-prod</b> for profiles that are triggered by the system property <b>env</b>. Such a system leaves a highly intuitive hint on how to activate a build targeted at a particular environment. Thus, to activate a build for the test environment, you need to activate <b>env-test</b> by issuing:</p>
-<div>
-<pre>mvn -Denv=test &lt;phase&gt;</pre></div>
-<p>The right command-line option can be had by simply substituting &quot;=&quot; for &quot;-&quot; in the profile id.</p></section></section>
+<p>If you want to redirect the output from the plugin to a file called <code>effective-pom.xml</code>, use the command-line option <code>-Doutput\=effective-pom.xml</code>.</p></section><section>
+<h3>Naming Conventions</h3>
+<p>By now you've noticed that profiles are a natural way of addressing the problem of different build configuration requirements for different target environments. Above, we discussed the concept of a &#x201c;natural set&#x201d; of profiles to address this situation, and the importance of considering the whole set of profiles that will be required.</p>
+<p>However, the question of how to organize and manage the evolution of that set is non-trivial as well. Just as a good developer strives to write self-documenting code, it's important that your profile id's give a hint to their intended use. One good way to do this is to use the common system property trigger as part of the name for the profile. This might result in names like <strong>env-dev</strong>, <strong>env-test</strong>, and <strong>env-prod</strong> for profiles that are triggered by the system property <strong>env</strong>. Such a system leaves a highly intuitive hint on how to activate a build targeted at a particular environment. Thus, to activate a build for the test environment, you need to activate <strong>env-test</strong> by issuing:</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>mvn -Denv=test &lt;phase&gt;
+</code></pre></div>
+<p>The right command-line option can be had by simply substituting &#x201c;=&#x201d; for &#x201c;-&#x201d; in the profile id.</p></section></section></section>
         </main>
       </div>
     </div>

Modified: maven/website/content/guides/introduction/introduction-to-repositories.html
==============================================================================
--- maven/website/content/guides/introduction/introduction-to-repositories.html (original)
+++ maven/website/content/guides/introduction/introduction-to-repositories.html Thu Feb  9 00:34:05 2023
@@ -2,7 +2,7 @@
 
 
 <!--
- | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from content/apt/guides/introduction/introduction-to-repositories.apt at 2023-02-08
+ | Generated by Apache Maven Doxia Site Renderer 2.0.0-M4 from content/markdown/guides/introduction/introduction-to-repositories.md at 2023-02-09
  | Rendered using Apache Maven Fluido Skin 1.11.1
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" lang="">
@@ -10,8 +10,7 @@
     <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-M4" />
-    <meta name="author" content="Jason van Zyl
-Brian Fox" />
+    <meta name="author" content="Jason van Zyl, Brian Fox" />
     <meta name="date" content="2008-05-13" />
     <title>Maven &#x2013; Introduction to Repositories</title>
     <link rel="stylesheet" href="../../css/apache-maven-fluido-1.11.1.min.css" />
@@ -49,8 +48,8 @@ Brian Fox" />
           <ul class="breadcrumb">
       <li class=""><a href="https://www.apache.org/" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li>
       <li class=""><a href="../../index.html" title="Maven">Maven</a><span class="divider">/</span></li>
-    <li class="active ">Introduction to Repositories <a href="https://github.com/apache/maven-site/tree/master/content/apt/guides/introduction/introduction-to-repositories.apt"><img src="../../images/accessories-text-editor.png" title="Edit" /></a></li>
-        <li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 2023-02-08</li>
+    <li class="active ">Introduction to Repositories <a href="https://github.com/apache/maven-site/tree/master/content/markdown/guides/introduction/introduction-to-repositories.md"><img src="../../images/accessories-text-editor.png" title="Edit" /></a></li>
+        <li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 2023-02-09</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>
@@ -153,45 +152,64 @@ Brian Fox" />
           </div>
         </header>
         <main id="bodyColumn"  class="span10" >
-<section>
-<h1>Introduction to Repositories</h1><section>
-<h2>Artifact Repositories</h2>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<section><section>
+<h2>Introduction to Repositories</h2><section>
+<h3>Artifact Repositories</h3>
 <p>A repository in Maven holds build artifacts and dependencies of varying types.</p>
-<p>There are exactly two types of repositories: <b>local</b> and <b>remote</b>:</p>
-<ol style="list-style-type: decimal">
-<li>the <b>local</b> repository is a directory on the computer where Maven runs. It caches remote downloads and contains temporary build artifacts that you have not yet released.</li>
-<li><b>remote</b> repositories refer to any other type of repository, accessed by a variety of protocols such as <code>file://</code> and <code>https://</code>. These repositories might be a truly remote repository set up by a third party to provide their artifacts for downloading (for example, <a class="externalLink" href="https://repo.maven.apache.org/maven2/">repo.maven.apache.org</a>). Other &quot;remote&quot; repositories may be internal repositories set up on a file or HTTP server within your company, used to share private artifacts between development teams and for releases.</li></ol>
+<p>There are exactly two types of repositories: <strong>local</strong> and <strong>remote</strong>:</p>
+<p>1 the <strong>local</strong> repository is a directory on the computer where Maven runs. It caches remote downloads and contains temporary build artifacts that you have not yet released.</p>
+<p>1 <strong>remote</strong> repositories refer to any other type of repository, accessed by a variety of protocols such as <code>file://</code> and <code>https://</code>. These repositories might be a truly remote repository set up by a third party to provide their artifacts for downloading (for example, <a href="https://repo.maven.apache.org/maven2/" class="externalLink">repo.maven.apache.org</a>). Other &#x201c;remote&#x201d; repositories may be internal repositories set up on a file or HTTP server within your company, used to share private artifacts between development teams and for releases.</p>
 <p>Local and remote repositories are structured the same way so that scripts can run on either side, or they can be synced for offline use. The layout of the repositories is completely transparent to the Maven user, however.</p></section><section>
-<h2>Using Repositories</h2>
+<h3>Using Repositories</h3>
 <p>In general, you should not need to do anything with the local repository on a regular basis, except clean it out if you are short on disk space (or erase it completely if you are willing to download everything again).</p>
 <p>For the remote repositories, they are used for both downloading and uploading (if you have the permission to do so).</p><section>
-<h3>Downloading from a Remote Repository</h3>
-<p>Downloading in Maven is triggered by a project declaring a dependency that is not present in the local repository (or for a <code>SNAPSHOT</code>, when the remote repository contains one that is newer). By default, Maven will download from the <a class="externalLink" href="https://repo.maven.apache.org/maven2/">central</a> repository.</p>
+<h4>Downloading from a Remote Repository</h4>
+<p>Downloading in Maven is triggered by a project declaring a dependency that is not present in the local repository (or for a <code>SNAPSHOT</code>, when the remote repository contains one that is newer). By default, Maven will download from the <a href="https://repo.maven.apache.org/maven2/" class="externalLink">central</a> repository.</p>
 <p>To override this, you need to specify a <code>mirror</code> as shown in <a href="../mini/guide-mirror-settings.html">Using Mirrors for Repositories</a>.</p>
 <p>You can set this in your <code>settings.xml</code> file to globally use a certain mirror. However, it is common for a project to <a href="../mini/guide-multiple-repositories.html">customise the repository in its <code>pom.xml</code></a> and that your setting will take precedence. If dependencies are not being found, check that you have not overridden the remote repository.</p>
 <p>For more information on dependencies, see <a href="./introduction-to-dependency-mechanism.html">Dependency Mechanism</a>.</p></section><section>
-<h3>Using Mirrors for the Central Repository</h3>
+<h4>Using Mirrors for the Central Repository</h4>
 <p>There are <a href="/repository/">several official Central repositories</a> geographically distributed. You can make changes to your <code>settings.xml</code> file to use one or more mirrors. Instructions for this can be found in the guide <a href="../mini/guide-mirror-settings.html">Using Mirrors for Repositories</a>.</p></section></section><section>
-<h2>Building Offline</h2>
+<h3>Building Offline</h3>
 <p>If you are temporarily disconnected from the internet and you need to build your projects offline, you can use the offline switch on the CLI:</p>
-<div>
-<pre> mvn -o package</pre></div>
+
+<div class="source"><pre class="prettyprint linenums"><code> mvn -o package
+</code></pre></div>
 <p>Many plugins honor the offline setting and do not perform any operations that connect to the internet. Some examples are resolving Javadoc links and link checking the site.</p></section><section>
-<h2>Uploading to a Remote Repository</h2>
+<h3>Uploading to a Remote Repository</h3>
 <p>While this is possible for any type of remote repository, you must have the permission to do so. To have someone upload to the Central Maven repository, see <a href="../../repository/index.html">Repository Center</a>.</p></section><section>
-<h2>Internal Repositories</h2>
+<h3>Internal Repositories</h3>
 <p>When using Maven, particularly in a corporate environment, connecting to the internet to download dependencies is not acceptable for security, speed or bandwidth reasons. For that reason, it is desirable to set up an internal repository to house a copy of artifacts, and to publish private artifacts to.</p>
 <p>Such an internal repository can be downloaded using HTTP or the file system (with a <code>file://</code> URL), and uploaded to using SCP, FTP, or a file copy.</p>
-<p>As far as Maven is concerned, there is nothing special about this repository: it is another <b>remote repository</b> that contains artifacts to download to a user's local cache, and is a publish destination for artifact releases.</p>
+<p>As far as Maven is concerned, there is nothing special about this repository: it is another <strong>remote repository</strong> that contains artifacts to download to a user's local cache, and is a publish destination for artifact releases.</p>
 <p>Additionally, you may want to share the repository server with your generated project sites. For more information on creating and deploying sites, see <a href="../mini/guide-site.html">Creating a Site</a>.</p></section><section>
-<h2>Setting up the Internal Repository</h2>
-<p>To set up an internal repository just requires that you have a place to put it, and then copy required artifacts there using the same layout as in a remote repository such as <a class="externalLink" href="https://repo.maven.apache.org/maven2/">repo.maven.apache.org</a>.</p>
-<p>It is <i>not</i> recommended that you scrape or <code>rsync://</code> a full copy of central as there is a large amount of data there and doing so will get you banned. You can use a program such as those described on the <a href="../../repository-management.html">Repository Management</a> page to run your internal repository's server, download from the internet as required, and then hold the artifacts in your internal repository for faster downloading later.</p>
+<h3>Setting up the Internal Repository</h3>
+<p>To set up an internal repository just requires that you have a place to put it, and then copy required artifacts there using the same layout as in a remote repository such as <a href="https://repo.maven.apache.org/maven2/" class="externalLink">repo.maven.apache.org</a>.</p>
+<p>It is <em>not</em> recommended that you scrape or <code>rsync://</code> a full copy of central as there is a large amount of data there and doing so will get you banned. You can use a program such as those described on the <a href="../../repository-management.html">Repository Management</a> page to run your internal repository's server, download from the internet as required, and then hold the artifacts in your internal repository for faster downloading later.</p>
 <p>The other options available are to manually download and vet releases, then copy them to the internal repository, or to have Maven download them for a user, and manually upload the vetted artifacts to the internal repository which is used for releases. This step is the only one available for artifacts where the license forbids their distribution automatically, such as several J2EE JARs provided by Sun. Refer to the <a href="../mini/guide-coping-with-sun-jars.html">Guide to coping with SUN JARs</a> document for more information.</p>
 <p>It should be noted that Maven intends to include enhanced support for such features in the future, including click through licenses on downloading, and verification of signatures.</p></section><section>
-<h2>Using the Internal Repository</h2>
+<h3>Using the Internal Repository</h3>
 <p>Using the internal repository is quite simple. Simply make a change to add a <code>repositories</code> element:</p>
-<div class="source"><pre class="prettyprint linenums">
+
+<div class="source"><pre class="prettyprint linenums"><code>
 &lt;project&gt;
   ...
   &lt;repositories&gt;
@@ -202,11 +220,14 @@ Brian Fox" />
   &lt;/repositories&gt;
   ...
 &lt;/project&gt;
-</pre></div>
+
+</code></pre></div>
 <p>If your internal repository requires authentication, the <code>id</code> element can be used in your <a href="../../settings.html#Servers">settings</a> file to specify login information.</p></section><section>
-<h2>Deploying to the Internal Repository</h2>
+<h3>Deploying to the Internal Repository</h3>
 <p>One of the most important reasons to have one or more internal repositories is to be able to publish your own private releases.</p>
-<p>To publish to the repository, you will need to have access via one of SCP, SFTP, FTP, WebDAV, or the filesystem. Connectivity is accomplished with the various <a href="/wagon/wagon-providers/index.html">wagons</a>. Some wagons may need to be added as <a href="/ref/current/maven-model/maven.html#class_extension">extension</a> to your build.</p></section></section>
+<p>To publish to the repository, you will need to have access via one of SCP, SFTP, FTP, WebDAV, or the filesystem. Connectivity is accomplished with the various <a href="/wagon/wagon-providers/index.html">wagons</a>. Some wagons may need to be added as <a href="/ref/current/maven-model/maven.html#class_extension">extension</a> to your build.</p><!--  For example, to set up an SCP transfer. -->
+<!--  show the scp example. -->
+</section></section></section>
         </main>
       </div>
     </div>