You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2025/11/19 02:34:09 UTC

(maven-site) branch distributionManagement-disambiguate created (now a0885b11)

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

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


      at a0885b11 disambiguate repositories.repository vs distributionManagement.repository

This branch includes the following new commits:

     new a0885b11 disambiguate repositories.repository vs distributionManagement.repository

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(maven-site) 01/01: disambiguate repositories.repository vs distributionManagement.repository

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a0885b110e6223b90aee5e65dbd1b6380631279e
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Wed Nov 19 03:33:58 2025 +0100

    disambiguate repositories.repository vs distributionManagement.repository
    
    as part of #1440
---
 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..c8ebeb6e 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 specifie in the POM the location and manner in which Maven may
+download remote artifacts for use by the current project, `<project><distributionManagement><repository>` specifies where
+(and how) this project will get 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 with scp protocol or a REST API,
+  while download is often basic https (GET). Distribution management repository url and (download) repository url are the same only
+  when you can do for example HTTPS PUT for upload and HTTPS GET for download from the same web server.
 
 * `<layout>`:
   These are the same types and purpose as the layout element defined in the repository element.