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 sv...@apache.org on 2019/06/09 13:59:37 UTC

svn commit: r1860906 [10/22] - 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 Sun Jun  9 13:59:34 2019
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from content/apt/guides/introduction/introduction-to-profiles.apt at 2019-06-09
+ | Generated by Apache Maven Doxia Site Renderer 1.9 from content/apt/guides/introduction/introduction-to-profiles.apt at 2019-06-09
  | Rendered using Apache Maven Fluido Skin 1.7
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@@ -143,23 +143,21 @@
           </div>
         </div>
         <div id="bodyColumn"  class="span10" >
-<div class="section">
+<section>
 <h2><a name="Introduction_to_Build_Profiles"></a>Introduction to Build Profiles</h2>
 <p>Apache Maven 2.0 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 2.0 introduces the concept of a build profile. 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 <tt>-f</tt> 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 runnning with one POM only.</p>
-<div class="section">
+<p>To address these circumstances, Maven 2.0 introduces the concept of a build profile. 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 runnning with one POM only.</p><section>
 <h3><a name="What_are_the_different_types_of_profile.3F_Where_is_each_defined.3F"></a>What are the different types of profile? Where is each defined?</h3>
 <ul>
 <li>Per Project
-<p>- Defined in the POM itself <tt>(pom.xml)</tt>.</p></li>
+<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> <tt>(%USER_HOME%/.m2/settings.xml)</tt>.</p></li>
+<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> <tt>(${maven.home}/conf/settings.xml)</tt>.</p></li>
+<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 <tt>(profiles.xml)</tt></a> (unsupported in Maven 3.0: see <a class="externalLink" href="https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html#Maven3.xCompatibilityNotes-profiles.xml"> Maven 3 compatibility notes</a>)</p></li></ul></div>
-<div class="section">
+<p>- a descriptor located in <a href="/ref/2.2.1/maven-profile/profiles.html">project basedir <code>(profiles.xml)</code></a> (unsupported in Maven 3.0: see <a class="externalLink" href="https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html#Maven3.xCompatibilityNotes-profiles.xml"> Maven 3 compatibility notes</a>)</p></li></ul></section><section>
 <h3><a name="How_can_a_profile_be_triggered.3F_How_does_this_vary_according_to_the_type_of_profile_being_used.3F"></a>How can a profile be triggered? How does this vary according to the type of profile being used?</h3>
 <p>A profile can be triggered/activated in several ways:</p>
 <ul>
@@ -167,13 +165,12 @@
 <li>Through Maven settings</li>
 <li>Based on environment variables</li>
 <li>OS settings</li>
-<li>Present or missing files</li></ul>
-<div class="section">
+<li>Present or missing files</li></ul><section>
 <h4><a name="Details_on_profile_activation"></a>Details on profile activation</h4>
-<p>Profiles can be explicitly specified using the <tt>-P</tt> CLI option.</p>
-<p>This option takes an argument that is a comma-delimited list of profile-ids to use. When this option is specified, the profile(s) specified in the option argument will be activated in addition to any profiles which are activated by their activation configuration or the <tt>&lt;activeProfiles&gt;</tt> section in <tt>settings.xml</tt>.</p>
+<p>Profiles can be explicitly specified using the <code>-P</code> CLI option.</p>
+<p>This option takes an argument that is a comma-delimited list of profile-ids to use. When this option is specified, the profile(s) specified in the option argument will be 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>.</p>
 <div class="source"><pre class="prettyprint linenums">mvn groupId:artifactId:goal -P profile-1,profile-2</pre></div>
-<p>Profiles can be activated in the Maven settings, via the <tt>&lt;activeProfiles&gt;</tt> section. This section takes a list of <tt>&lt;activeProfile&gt;</tt> elements, each containing a profile-id inside.</p>
+<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;
   ...
   &lt;activeProfiles&gt;
@@ -181,8 +178,8 @@
   &lt;/activeProfiles&gt;
   ...
 &lt;/settings&gt;</pre></div>
-<p>Profiles listed in the <tt>&lt;activeProfiles&gt;</tt> tag would be activated by default every time a project use it.</p>
-<p>Profiles can be automatically triggered based on the detected state of the build environment. These triggers are specified via an <tt>&lt;activation&gt;</tt> section in the profile itself. Currently, this detection is limited to prefix-matching of the JDK version, the presence of a system property or the value of a system property. Here are some examples.</p>
+<p>Profiles listed in the <code>&lt;activeProfiles&gt;</code> tag would be activated by default every time a project use it.</p>
+<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 prefix-matching of the JDK version, the presence of a system property or the value of a system property. Here are some examples.</p>
 <p>The following configuration will trigger the profile when the JDK's version starts with &quot;1.4&quot; (eg. &quot;1.4.0_08&quot;, &quot;1.4.2_07&quot;, &quot;1.4&quot;):</p>
 <div class="source"><pre class="prettyprint linenums">&lt;profiles&gt;
   &lt;profile&gt;
@@ -201,7 +198,7 @@
     ...
   &lt;/profile&gt;
 &lt;/profiles&gt;</pre></div>
-<p><i>Note:</i> an upper bound such as <tt>,1.5]</tt> is likely not to include most releases of 1.5, since they will have an additional &quot;patch&quot; release such as <tt>_05</tt> that is not taken into consideration in the above range.</p>
+<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>
 <p>This next one will activate based on OS settings. 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;
   &lt;profile&gt;
@@ -267,9 +264,9 @@ mvn groupId:artifactId:goal -Ddebug=fals
 &lt;/profiles&gt;</pre></div>
 <p>To activate this you would type this on the command line:</p>
 <div class="source"><pre class="prettyprint linenums">mvn groupId:artifactId:goal -Denvironment=test</pre></div>
-<p>As of Maven 3.0, profiles in the POM can also be activated based on properties from active profiles from the <tt>settings.xml</tt>.</p>
-<p><b>Note</b>: Environment variables like <tt>FOO</tt> are available as properties of the form <tt>env.FOO</tt>. Further note that environment variable names are normalized to all upper-case on Windows.</p>
-<p>This example will trigger the profile when the generated file <tt>target/generated-sources/axistools/wsdl2java/org/apache/maven</tt> is missing.</p>
+<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>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;
   &lt;profile&gt;
     &lt;activation&gt;
@@ -280,7 +277,7 @@ mvn groupId:artifactId:goal -Ddebug=fals
     ...
   &lt;/profile&gt;
 &lt;/profiles&gt;</pre></div>
-<p>As of Maven 2.0.9, the tags <tt>&lt;exists&gt;</tt> and <tt>&lt;missing&gt;</tt> could be interpolated. Supported variables are system properties like <tt>${user.home}</tt> and environment variables like <tt>${env.HOME}</tt>. 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 <tt>${project.build.directory}</tt> but needs to hard-code the path <tt>target</tt>.</p>
+<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;
   &lt;profile&gt;
@@ -291,51 +288,44 @@ mvn groupId:artifactId:goal -Ddebug=fals
     ...
   &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></div>
-<div class="section">
+<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>
 <h4><a name="Deactivating_a_profile"></a>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 '!' or '-' as shown below:</p>
 <div class="source"><pre class="prettyprint linenums">mvn groupId:artifactId:goal -P !profile-1,!profile-2</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></div></div>
-<div class="section">
+<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>
 <h3><a name="Which_areas_of_a_POM_can_be_customized_by_each_type_of_profile.3F_Why.3F"></a>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 <i>what</i> 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>
-<div class="section">
+<p>Depending on where you choose to configure your profile, you will have access to varying POM configuration options.</p><section>
 <h4><a name="Profiles_in_external_files"></a>Profiles in external files</h4>
-<p>Profiles specified in external files (i.e in <tt>settings.xml</tt> or <tt>profiles.xml</tt>) 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 <tt>&lt;repositories&gt;</tt> and <tt>&lt;pluginRepositories&gt;</tt> sections, plus an extra <tt>&lt;properties&gt;</tt> section.</p>
-<p>The <tt>&lt;properties&gt;</tt> 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 <tt>${profile.provided.path}</tt>.</p></div>
-<div class="section">
+<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><a name="Profiles_in_POMs"></a>Profiles in POMs</h4>
 <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 it's 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 the following POM elements:</p>
 <ul>
-<li><tt>&lt;repositories&gt;</tt></li>
-<li><tt>&lt;pluginRepositories&gt;</tt></li>
-<li><tt>&lt;dependencies&gt;</tt></li>
-<li><tt>&lt;plugins&gt;</tt></li>
-<li><tt>&lt;properties&gt;</tt> (not actually available in the main POM, but used behind the scenes)</li>
-<li><tt>&lt;modules&gt;</tt></li>
-<li><tt>&lt;reporting&gt;</tt></li>
-<li><tt>&lt;dependencyManagement&gt;</tt></li>
-<li><tt>&lt;distributionManagement&gt;</tt></li>
-<li>a subset of the <tt>&lt;build&gt;</tt> element, which consists of:
+<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;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><tt>&lt;defaultGoal&gt;</tt></li>
-<li><tt>&lt;resources&gt;</tt></li>
-<li><tt>&lt;testResources&gt;</tt></li>
-<li><tt>&lt;finalName&gt;</tt></li></ul></li></ul></div>
-<div class="section">
+<li><code>&lt;defaultGoal&gt;</code></li>
+<li><code>&lt;resources&gt;</code></li>
+<li><code>&lt;testResources&gt;</code></li>
+<li><code>&lt;finalName&gt;</code></li></ul></li></ul></section><section>
 <h4><a name="POM_elements_outside_.3Cprofiles.3E"></a>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 <tt>settings.xml</tt> and <tt>profiles.xml</tt> 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 <tt>settings.xml</tt> 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 <tt>settings.xml</tt> 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></di
 v></div>
-<div class="section">
+<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>
 <h3><a name="Profile_Pitfalls"></a>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>
-<div class="section">
+<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>
 <h4><a name="External_Properties"></a>External Properties</h4>
-<p>External property definition concerns any property value defined outside the <tt>pom.xml</tt> 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 <tt>settings.xml</tt> may cause your integration test plugin to fail when another user on the team attempts to build without a similar <tt>settings.xml</tt>. Consider the following <tt>pom.xml</tt> snippet for a web application project:</p>
+<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;
   ...
   &lt;build&gt;
@@ -353,7 +343,7 @@ mvn groupId:artifactId:goal -Ddebug=fals
   &lt;/build&gt;
   ...
 &lt;/project&gt;</pre></div>
-<p>Now, in your local <tt>${user.home}/.m2/settings.xml</tt>, you have:</p>
+<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;profiles&gt;
@@ -371,12 +361,11 @@ mvn groupId:artifactId:goal -Ddebug=fals
   ...
 &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 <tt>&lt;appserverHome&gt;</tt>, or worse, that the value of that parameter - literally <tt>${appserver.home}</tt> - is invalid (if it warns you at all).</p>
-<p>Congratulations, your project is now non-portable. Inlining this profile in your <tt>pom.xml</tt> 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 <tt>&lt;pluginManagement&gt;</tt> 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></div>
-<div class="section">
+<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>
+<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>
 <h4><a name="Incomplete_Specification_of_a_Natural_Profile_Set"></a>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 <tt>pom.xml</tt> snippet from above one more time:</p>
+<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;
   ...
   &lt;build&gt;
@@ -394,7 +383,7 @@ mvn groupId:artifactId:goal -Ddebug=fals
   &lt;/build&gt;
   ...
 &lt;/project&gt;</pre></div>
-<p>Now, consider the following profile, which would be specified inline in the <tt>pom.xml</tt>:</p>
+<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;
   ...
   &lt;profiles&gt;
@@ -426,33 +415,32 @@ mvn groupId:artifactId:goal -Ddebug=fals
   &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 <tt>appserverConfig-dev-2</tt> 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 <tt>appserverConfig-dev</tt> and &quot;env=dev-2&quot; for a profile named <tt>appserverConfig-dev-2</tt>. So, executing:</p>
+<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 class="source"><pre class="prettyprint linenums">mvn -Denv=dev-2 integration-test</pre></div>
-<p>will result in a successful build, applying the properties given by profile named <tt>appserverConfig-dev-2</tt>. And when we execute</p>
+<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 class="source"><pre class="prettyprint linenums">mvn -Denv=dev integration-test</pre></div>
-<p>it will result in a successful build applying the properties given by the profile named <tt>appserverConfig-dev</tt>. However, executing:</p>
+<p>it will result in a successful build applying the properties given by the profile named <code>appserverConfig-dev</code>. However, executing:</p>
 <div class="source"><pre class="prettyprint linenums">mvn -Denv=production integration-test</pre></div>
-<p>will not do a successful build. Why? Because, the resulting non-interpolated literal value of <tt>${appserver.home}</tt> 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></div></div>
-<div class="section">
+<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>
 <h3><a name="How_can_I_tell_which_profiles_are_in_effect_during_a_build.3F"></a>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 class="source"><pre class="prettyprint linenums">  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>
-<p>From the last example of profiles in the <tt>pom.xml</tt>, you'll notice that there are two profiles named <tt>appserverConfig-dev</tt> and <tt>appserverConfig-dev-2</tt> which has been given different values for properties. If we go ahead and execute:</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 class="source"><pre class="prettyprint linenums">  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 class="source"><pre class="prettyprint linenums">The following profiles are active:
 
  - appserverConfig-dev (source: pom)</pre></div>
-<p>Now if we have a profile declared in <tt>settings.xml</tt> (refer to the sample of profile in <tt>settings.xml</tt>) and that have been set to be an active profile and execute:</p>
+<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 class="source"><pre class="prettyprint linenums">  mvn help:active-profiles</pre></div>
 <p>The result should be something like this</p>
 <div class="source"><pre class="prettyprint linenums">The following profiles are active:
 
  - appserverConfig (source: settings.xml)</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 <tt>settings.xml</tt> is automatically activated.</p>
-<p>Now if we have something like a profile in the <tt>settings.xml</tt> 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>
+<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 class="source"><pre class="prettyprint linenums">  mvn help:active-profiles -P appserverConfig-dev</pre></div>
 <p>This will list the activated profiles:</p>
 <div class="source"><pre class="prettyprint linenums">The following profiles are active:
@@ -461,14 +449,13 @@ mvn groupId:artifactId:goal -Ddebug=fals
  - appserverConfig (source: settings.xml)</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 class="source"><pre class="prettyprint linenums">  mvn help:effective-pom -P appserverConfig-dev</pre></div>
-<p>This will print the effective POM for this build configuration out to the console. Take note that profiles in the <tt>settings.xml</tt> takes higher priority than profiles in the POM. So the profile that has been applied here is <tt>appserverConfig</tt> not <tt>appserverConfig-dev</tt>.</p>
-<p>If you want to redirect the output from the plugin to a file called <tt>effective-pom.xml</tt>, use the command-line option <tt>-Doutput=effective-pom.xml</tt>.</p></div>
-<div class="section">
+<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>
 <h3><a name="Naming_Conventions"></a>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 &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 class="source"><pre class="prettyprint linenums">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></div></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>
         </div>
       </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 Sun Jun  9 13:59:34 2019
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from content/apt/guides/introduction/introduction-to-repositories.apt at 2019-06-09
+ | Generated by Apache Maven Doxia Site Renderer 1.9 from content/apt/guides/introduction/introduction-to-repositories.apt at 2019-06-09
  | Rendered using Apache Maven Fluido Skin 1.7
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@@ -144,52 +144,43 @@ Brian Fox" />
           </div>
         </div>
         <div id="bodyColumn"  class="span10" >
-<div class="section">
-<h2><a name="Introduction_to_Repositories"></a>Introduction to Repositories</h2>
-<div class="section">
+<section>
+<h2><a name="Introduction_to_Repositories"></a>Introduction to Repositories</h2><section>
 <h3><a name="Artifact_Repositories"></a>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: local and remote. The local 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>Remote repositories refer to any other type of repository, accessed by a variety of protocols such as <tt>file://</tt> and <tt>http://</tt>. 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="http://repo.maven.apache.org/maven2/">repo.maven.apache.org</a> and <a class="externalLink" href="http://uk.maven.org/maven2/">uk.maven.org</a> house Maven's central repository). 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.</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></div>
-<div class="section">
+<p>Remote repositories refer to any other type of repository, accessed by a variety of protocols such as <code>file://</code> and <code>http://</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="http://repo.maven.apache.org/maven2/">repo.maven.apache.org</a> and <a class="externalLink" href="http://uk.maven.org/maven2/">uk.maven.org</a> house Maven's central repository). 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.</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>
 <h3><a name="Using_Repositories"></a>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>
-<div class="section">
+<p>For the remote repositories, they are used for both downloading and uploading (if you have the permission to do so).</p><section>
 <h4><a name="Downloading_from_a_Remote_Repository"></a>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 <tt>SNAPSHOT</tt>, when the remote repository contains one that is newer). By default, Maven will download from the <a class="externalLink" href="http://repo.maven.apache.org/maven2/">central</a> repository.</p>
-<p>To override this, you need to specify a <tt>mirror</tt> as shown in <a href="../mini/guide-mirror-settings.html">Using Mirrors for Repositories</a></p>
-<p>You can set this in your <tt>settings.xml</tt> file to globally use a certain mirror. However, it is common for a project to customise the repository in its <tt>pom.xml</tt> 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></div>
-<div class="section">
+<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="http://repo.maven.apache.org/maven2/">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 customise the repository in its <code>pom.xml</code> 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>
 <h4><a name="Using_Mirrors_for_the_Central_Repository"></a>Using Mirrors for the Central Repository</h4>
-<p>There are several official Central repositories geographically distributed. You can make changes to your <tt>settings.xml</tt> 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></div></div>
-<div class="section">
+<p>There are several official Central repositories 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>
 <h3><a name="Building_Offline"></a>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 class="source"><pre class="prettyprint linenums">
  mvn -o package
 </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></div>
-<div class="section">
+<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>
 <h3><a name="Uploading_to_a_Remote_Repository"></a>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></div>
-<div class="section">
+<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>
 <h3><a name="Internal_Repositories"></a>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 <tt>file://</tt> URL), and uploaded to using SCP, FTP, or a file copy.</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>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></div>
-<div class="section">
+<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>
 <h3><a name="Setting_up_the_Internal_Repository"></a>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 class="externalLink" href="http://repo.maven.apache.org/maven2/">repo.maven.apache.org</a>.</p>
-<p>It is <i>not</i> recommended that you scrape or <tt>rsync://</tt> 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>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>
 <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></div>
-<div class="section">
+<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>
 <h3><a name="Using_the_Internal_Repository"></a>Using the Internal Repository</h3>
-<p>Using the internal repository is quite simple. Simply make a change to add a <tt>repositories</tt> element:</p>
+<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">
 &lt;project&gt;
   ...
@@ -202,11 +193,10 @@ Brian Fox" />
   ...
 &lt;/project&gt;
 </pre></div>
-<p>If your internal repository requires authentication, the <tt>id</tt> element can be used in your <a href="../../settings.html#Servers">settings</a> file to specify login information.</p></div>
-<div class="section">
+<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>
 <h3><a name="Deploying_to_the_Internal_Repository"></a>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></div></div>
+<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>
         </div>
       </div>
     </div>