This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-site.git


The following commit(s) were added to refs/heads/master by this push:
     new b02316de disambiguate repositories.repository vs 
distributionManagement.reposi… (#1466)
b02316de is described below

commit b02316de50f23e12d132de1287ca84501b43646e
Author: Hervé Boutemy <[email protected]>
AuthorDate: Fri Nov 21 01:04:05 2025 +0100

    disambiguate repositories.repository vs distributionManagement.reposi… 
(#1466)
    
    * disambiguate repositories.repository vs distributionManagement.repository
    
    as part of #1440
    
    * accept kwin improvements
---
 content/markdown/pom.md | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/content/markdown/pom.md b/content/markdown/pom.md
index 9fcc248e..59011899 100644
--- a/content/markdown/pom.md
+++ b/content/markdown/pom.md
@@ -1781,7 +1781,7 @@ remote location of where Maven can find new plugins.
 
 ### Distribution Management
 
-Distribution management acts precisely as it sounds: it manages the 
distribution of the artifact
+Distribution management acts precisely as it sounds: it manages the 
distribution (aka. remote publication) of the artifact
 and supporting files generated throughout the build process.
 
 ```xml
@@ -1802,10 +1802,11 @@ and supporting files generated throughout the build 
process.
 
 #### Repository
 
-Whereas the repositories element specifies in the POM the location and manner 
in which Maven may
-download remote artifacts for use by the current project, 
distributionManagement specifies where
-(and how) this project will get to a remote repository when it is deployed.
-The repository elements will be used for snapshot distribution if the 
snapshotRepository is not defined.
+Whereas the `<project><repositories><repository>` elements specify the 
location and manner in which Maven may
+download remote artifacts for use by the current project, 
`<project><distributionManagement><repository>` specifies where
+(and how) the artifacts generated through this project will get uploaded to a 
remote repository when it is deployed (aka. published to remote).
+
+The repository elements will be used for snapshot distribution if the 
snapshotRepository is not defined. <!-- I don't know what this sentence means 
-->
 
 ```xml
 <project xmlns="http://maven.apache.org/POM/4.0.0";>
@@ -1840,8 +1841,11 @@ The repository elements will be used for snapshot 
distribution if the snapshotRe
   the address.
 
 * `<url>`:
-  This is the core of the repository element. It specifies both the location 
and the transport protocol
+  This is the core of the distributionManagement repository element. It 
specifies both the location and the transport protocol
   used to transfer a built artifact (and POM file, and checksum data) to the 
repository.
+  Notice that the url to download from the repository is often different: 
publishing (using distributionManagement repository url) can be done by a 
variety of protocols (with SCP, HTTP POST, HTTP PUT, FTP, ...)
+  while download is in most cases HTTP GET. Distribution management repository 
url and (download) repository url are the same only
+  when you can do upload and download based on the same URL and with the same 
protocol (for example HTTP PUT for upload and HTTP GET for download).
 
 * `<layout>`:
   These are the same types and purpose as the layout element defined in the 
repository element.

Reply via email to