Hi,

I looked into fixing the Hudson build of maven-site-plugin

https://builds.apache.org/job/maven-box/job/maven-site-plugin/job/master/ 
<https://builds.apache.org/job/maven-box/job/maven-site-plugin/job/master/>

There are two "it" failing, one of them is the fullreporting. This 
fullreporting test seems to run something like

mvn -Preporting site 


[ERROR] ProjectBuildingException for 
commons-logging:commons-logging:jar:1.1:compile: Some problems were encountered 
while processing the POMs:
...
[ERROR] 'distributionManagement.status' must not be specified. @ line 189, 
column 13

In fact commons-logging pom includes an <status> tag within 
<distributionManagement> which seems to be not so valid. And there are a couple 
of other poms with the same "problem".

I do know nothing about the history of this tag and do find a commit in 
spring-gradle-plugins to work around exactly the same problem
https://github.com/spring-gradle-plugins/dependency-management-plugin/commit/a7fec47ea03bf43bdde5707f43743e225ccae319
 
<https://github.com/spring-gradle-plugins/dependency-management-plugin/commit/a7fec47ea03bf43bdde5707f43743e225ccae319>

and a discussion that this tag may be obsolete:
https://issues.apache.org/jira/browse/MNG-3178 
<https://issues.apache.org/jira/browse/MNG-3178>

I am asking myself if maven should relax the DefaultModelValidator. At least 
from the Maven Model 
https://maven.apache.org/ref/3.6.0/maven-model/maven.html 
<https://maven.apache.org/ref/3.6.0/maven-model/maven.html> it looks like to be 
valid.

diff --git 
a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
 
b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
index 1c8477678..b50b0f2e7 100644
--- 
a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
+++ 
b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
@@ -444,12 +444,6 @@ public void validateEffectiveModel( Model m, 
ModelBuildingRequest request, Model
             DistributionManagement distMgmt = m.getDistributionManagement();
             if ( distMgmt != null )
             {
-                if ( distMgmt.getStatus() != null )
-                {
-                    addViolation( problems, Severity.ERROR, Version.V20, 
"distributionManagement.status", null,
-                                  "must not be specified.", distMgmt );
-                }
-
                 validate20EffectiveRepository( problems, 
distMgmt.getRepository(), "distributionManagement.repository",
                                                request );
                 validate20EffectiveRepository( problems, 
distMgmt.getSnapshotRepository(),


Greetings
   Olaf 

Reply via email to