hboutemy commented on issue #1440:
URL: https://github.com/apache/maven-site/issues/1440#issuecomment-3550461918

   in parallel to #1466 PR
   
   looking at corresponding reference POM doc: 
https://maven.apache.org/ref/3.9.11/maven-model/maven.html#class_distributionManagement
   
   there is a bug here? `repository` linked from distributionManagement element 
is the one from `<project><repositories><repository>` (that releases and 
snapshots RepositoryPolicy)
   
   XML element ambiguity in the model creates issue in the generated 
documentation:
   I don't know yet precisely how to fix, but will be near the use of 
`DeploymentRepository` class 
https://github.com/apache/maven/blob/maven-3.9.11/maven-model/src/main/mdo/maven.mdo#L1342
   vs the use of `Repository` 
https://github.com/apache/maven/blob/maven-3.9.11/maven-model/src/main/mdo/maven.mdo#L520
   
   `DeploymentRepository` (for distributionManagement) is 
https://github.com/apache/maven/blob/maven-3.9.11/maven-model/src/main/mdo/maven.mdo#L520
   => extends `Repository` with one attribute
   
   `Repository` 
https://github.com/apache/maven/blob/maven-3.9.11/maven-model/src/main/mdo/maven.mdo#L2090
 
   
   `RepositoryBase` 
https://github.com/apache/maven/blob/maven-3.9.11/maven-model/src/main/mdo/maven.mdo#L2037
   
   re-reading again 
https://maven.apache.org/ref/3.9.11/maven-model/maven.html#class_deployment_repository
   
   > 
[releases](https://maven.apache.org/ref/3.9.11/maven-model/maven.html#class_releases)
      RepositoryPolicy        How to handle downloading of releases from this 
repository.
   
   talking about "downloading" only is where the ambiguity happens: it's both 
for download and upload
   
   and finally there is the uniqueVersion field: 
https://maven.apache.org/ref/3.9.11/maven-model/maven.html#class_deployment_repository
   which is not present in `repositories.repository` 
https://maven.apache.org/ref/3.9.11/maven-model/maven.html#class_repository
   
   
   I keep all the analysis as i think it is useful to keep in mind
   but short term is to widen RepositoryPolicy to not only download but also 
upload: 
   
   and longer term is perhaps as @kwin suggested add another field to 
DeploymentRepository: in addition to `uniqueVersion`, we could perhaps add 
`downloadUrl` (even if purely informational: not really used by Maven, but very 
useful for end users trying to guess from an upload url what will be the 
associated download url)


-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to