Skip to content

Commit

Permalink
[MGPG-110] SignAndDeployFileMojo validation is off (#78)
Browse files Browse the repository at this point in the history
It was validating POMs as "Maven2". These POMs should be handled as "new projects" and they must have strict validation in effect instead. Still, given "strict" validation is a moving target (it depends on currently running Maven version), we need to factor in Maven4 as well. Once beta, Maven4 should be added to build matrix. Currently was running locally the build with latest alpha-13 SNAPSHOT (it went OK) that showed one IT that was sensitive to it, fixed in this PR as well.

---

https://issues.apache.org/jira/browse/MGPG-110
  • Loading branch information
cstamas committed Mar 5, 2024
1 parent 23b64f2 commit 0771b61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/it/sign-release-with-excludes/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ var expectedFiles = [

for (File file : artifactDir.listFiles()) {
var fileName = file.getName()

//maven4: skip consumer POM
if (fileName.endsWith("consumer.pom") || fileName.endsWith("consumer.pom.asc")) {
continue
}

println "Checking if file is expected: $file"

var expected = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ private void validateArtifactInformation() throws MojoFailureException {
Model model = generateModel();

ModelBuildingRequest request =
new DefaultModelBuildingRequest().setValidationLevel(ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_2_0);
new DefaultModelBuildingRequest().setValidationLevel(ModelBuildingRequest.VALIDATION_LEVEL_STRICT);

List<String> result = new ArrayList<>();

Expand Down

0 comments on commit 0771b61

Please sign in to comment.