[GitHub] [maven-site] elharo commented on a change in pull request #205: MNG-6994 clarify repository order

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [maven-site] elharo commented on a change in pull request #205: MNG-6994 clarify repository order

GitBox

elharo commented on a change in pull request #205:
URL: https://github.com/apache/maven-site/pull/205#discussion_r499234532



##########
File path: content/apt/guides/introduction/introduction-to-profiles.apt
##########
@@ -403,6 +403,56 @@ mvn groupId:artifactId:goal -P !profile-1,!profile-2
   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.
 
+* Profile Order
+
+All profile elements in a POM from active profiles overwrite/enrich the global elements with the same name of the POM (i.e. take precedence).

Review comment:
       overwrite or enrich? Which is it? Pick one or explain why both and under what circumstances.

##########
File path: content/apt/guides/introduction/introduction-to-profiles.apt
##########
@@ -403,6 +403,56 @@ mvn groupId:artifactId:goal -P !profile-1,!profile-2
   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.
 
+* Profile Order
+
+All profile elements in a POM from active profiles overwrite/enrich the global elements with the same name of the POM (i.e. take precedence).

Review comment:
       rewrite without parentheses or Latin (i.e.)

##########
File path: content/apt/guides/mini/guide-multiple-repositories.apt
##########
@@ -29,7 +29,7 @@
 Setting up Multiple Repositories
 
  There are two different ways that you can specify the use of multiple repositories. The first
- way is to specify in a POM which repositories you want to use:
+ way is to specify in a POM which repositories you want to use (both inside and outside of build profiles):

Review comment:
       avoid parentheses

##########
File path: content/apt/guides/mini/guide-multiple-repositories.apt
##########
@@ -102,3 +104,15 @@ mvn -Pmyprofile ...
  activate multiple profiles simultaneously.
 
  <<Note>>: The settings descriptor documentation can be found on the {{{../../maven-settings/settings.html}Maven Local Settings Model Website}}.
+
+ ** Repository Order
+
+Remote repository URLs are queried in the following order for artifacts until one returns a valid result:
+
+[[1]] Global <<<settings.xml>>>
+[[1]] User <<<settings.xml>>>
+[[1]] Local POM
+[[1]] Parent POMs, recursively
+[[1]] Super POM
+
+For each of these locations the repositories within the profiles are queried first in the order outlined at {{{../introduction/introduction-to-profiles.html}Introduction to build profiles}}.

Review comment:
       comma after locations

##########
File path: content/apt/guides/introduction/introduction-to-profiles.apt
##########
@@ -403,6 +403,56 @@ mvn groupId:artifactId:goal -P !profile-1,!profile-2
   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.
 
+* Profile Order
+
+All profile elements in a POM from active profiles overwrite/enrich the global elements with the same name of the POM (i.e. take precedence).
+In case multiple profiles are active in the same POM or external file the ones which are being defined <<later>> take precedence over the ones being defined <<earlier>> (independent of their profile id and activation order).
+
+Example:
+
++---+
+<project>
+  ...
+  <repositories>
+    <repository>
+      <id>global-repo</id>
+      ...
+    </repository>
+  </repositories>
+  ...
+  <profiles>
+    <profile>
+      <id>profile-1</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <repositories>
+        <repository>
+          <id>profile-1-repo</id>
+          ...
+        </repository>
+      </repositories>
+    </profile>
+    <profile>
+      <id>profile-2</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <repositories>
+        <repository>
+          <id>profile-2-repo</id>
+          ...
+        </repository>
+      </repositories>
+    </profile>
+    ...
+  </profiles>
+  ...
+</project>
++---+
+
+This leads to the following repository list (only ids listed): <<<profile-2-repo, profile-1-repo, global-repo>>>.

Review comment:
       This leads to the repository list: <<<profile-2-repo, profile-1-repo, global-repo>>>.

##########
File path: content/apt/guides/mini/guide-multiple-repositories.apt
##########
@@ -55,8 +55,10 @@ Setting up Multiple Repositories
  <<NOTE:>> You will also get the standard set of repositories as defined in the
  {{{../introduction/introduction-to-the-pom.html#Super_POM}Super POM}}.
 
+
+
  The other way you can specify the use of multiple repositories by creating a profile in

Review comment:
       delete "the use of"
   by --> is by

##########
File path: content/apt/guides/introduction/introduction-to-profiles.apt
##########
@@ -403,6 +403,56 @@ mvn groupId:artifactId:goal -P !profile-1,!profile-2
   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.
 
+* Profile Order
+
+All profile elements in a POM from active profiles overwrite/enrich the global elements with the same name of the POM (i.e. take precedence).
+In case multiple profiles are active in the same POM or external file the ones which are being defined <<later>> take precedence over the ones being defined <<earlier>> (independent of their profile id and activation order).

Review comment:
       comma after file
   delete being (twice)

##########
File path: content/apt/guides/mini/guide-multiple-repositories.apt
##########
@@ -55,8 +55,10 @@ Setting up Multiple Repositories
  <<NOTE:>> You will also get the standard set of repositories as defined in the
  {{{../introduction/introduction-to-the-pom.html#Super_POM}Super POM}}.
 
+
+
  The other way you can specify the use of multiple repositories by creating a profile in
- your <<<$\{user.home\}/.m2/settings.xml>>> file like the following:
+ your <<<$\{user.home\}/.m2/settings.xml>>> or <<<$\{maven.home\}/conf/settings.xml>>> file like the following:

Review comment:
       delete "your"




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]