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-dist-tool.git
The following commit(s) were added to refs/heads/master by this push:
new f8dbc33 mvnd has no Central maven-metadata.xml
f8dbc33 is described below
commit f8dbc3333690d8164fc9d159c61aac4261f85a3d
Author: Hervé Boutemy <[email protected]>
AuthorDate: Sat Oct 31 01:29:24 2026 +0100
mvnd has no Central maven-metadata.xml
---
.../org/apache/maven/dist/tools/AbstractDistCheckReport.java | 10 ++++++++++
.../maven/dist/tools/source/DistCheckSourceReleaseReport.java | 7 +++++--
src/main/resources/dist-tool.conf | 2 +-
3 files changed, 16 insertions(+), 3 deletions(-)
diff --git
a/src/main/java/org/apache/maven/dist/tools/AbstractDistCheckReport.java
b/src/main/java/org/apache/maven/dist/tools/AbstractDistCheckReport.java
index d0d5a7d..e0358ee 100644
--- a/src/main/java/org/apache/maven/dist/tools/AbstractDistCheckReport.java
+++ b/src/main/java/org/apache/maven/dist/tools/AbstractDistCheckReport.java
@@ -258,6 +258,16 @@ public abstract class AbstractDistCheckReport extends
AbstractMavenReport {
}
private String getVersion(ConfigurationLineInfo aLine) throws
MavenReportException {
+ if ("mvnd".equals(aLine.getArtifactId())) {
+ // not available in Maven Central, cannot use maven-metadata.xml
+ // use
https://github.com/apache/maven-site/blob/master/pom.xml#L64 instead
+ // short term: hard code
+ if (aLine.getVersionRange().containsVersion(new
DefaultArtifactVersion("1.0"))) {
+ return "1.0.6";
+ } else {
+ return "2.0.0-rc-3";
+ }
+ }
String metadataUrl = aLine.getMetadataFileURL(repoBaseUrl);
try (InputStream input = new BufferedInputStream(new
URL(metadataUrl).openStream())) {
MetadataXpp3Reader metadataReader = new MetadataXpp3Reader();
diff --git
a/src/main/java/org/apache/maven/dist/tools/source/DistCheckSourceReleaseReport.java
b/src/main/java/org/apache/maven/dist/tools/source/DistCheckSourceReleaseReport.java
index 8c2b85b..7fcf165 100644
---
a/src/main/java/org/apache/maven/dist/tools/source/DistCheckSourceReleaseReport.java
+++
b/src/main/java/org/apache/maven/dist/tools/source/DistCheckSourceReleaseReport.java
@@ -574,8 +574,11 @@ public class DistCheckSourceReleaseReport extends
AbstractDistCheckReport {
results.add(result);
// central
- String centralUrl = configLine.getVersionnedFolderURL(repoBaseUrl,
version);
-
result.setMissingCentralSourceRelease(checkDirectoryIndex(centralUrl,
configLine, version, false));
+ if (!"mvnd".equals(configLine.getArtifactId())) {
+ // only mvnd is not in Maven Central
+ String centralUrl =
configLine.getVersionnedFolderURL(repoBaseUrl, version);
+
result.setMissingCentralSourceRelease(checkDirectoryIndex(centralUrl,
configLine, version, false));
+ }
if (NOT_IN_DISTRIBUTION_AREA.equals(configLine.getDirectory())) {
// no distribution check
diff --git a/src/main/resources/dist-tool.conf
b/src/main/resources/dist-tool.conf
index 706fdc2..73bfbb6 100644
--- a/src/main/resources/dist-tool.conf
+++ b/src/main/resources/dist-tool.conf
@@ -84,7 +84,7 @@
/mvnd: org.apache.maven.daemon src
> mvnd site = https://maven.apache.org/tools/mvnd.html
mvnd [1,1.99)
- mvnd [2,2.99)
+ mvnd [1.99,2.99)
/plugin-testing: org.apache.maven.plugin-testing
maven-plugin-testing [3,3.99]