diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8301ProjectWithoutModelVersion.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8301ProjectWithoutModelVersion.java new file mode 100644 index 000000000..36b4c4a44 --- /dev/null +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8301ProjectWithoutModelVersion.java @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.maven.it; + +import java.io.File; + +import org.apache.maven.shared.verifier.Verifier; +import org.apache.maven.shared.verifier.util.ResourceExtractor; +import org.junit.jupiter.api.Test; + +/** + * This is a test set for MNG-8301. + */ +class MavenITmng8301ProjectWithoutModelVersion extends AbstractMavenIntegrationTestCase { + MavenITmng8301ProjectWithoutModelVersion() { + super("[4.0.0-beta-5,)"); + } + + @Test + void projectWithoutModelVersionCanBeBuilt() throws Exception { + File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-8301-project-without-modelversion"); + + Verifier verifier = new Verifier(testDir.getAbsolutePath()); + verifier.executeGoal("validate"); + + verifier.verifyErrorFreeLog(); + } +} diff --git a/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java b/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java index 021521519..435b6585d 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java @@ -120,6 +120,7 @@ public TestSuiteOrdering() { * the tests are to finishing. Newer tests are also more likely to fail, so this is * a fail fast technique as well. */ + suite.addTestSuite(MavenITmng8301ProjectWithoutModelVersion.class, -9); suite.addTestSuite(MavenITmng8294ParentChecksTest.class); suite.addTestSuite(MavenITmng8293BomImportFromReactor.class); suite.addTestSuite(MavenITmng8288NoRootPomTest.class); diff --git a/core-it-suite/src/test/resources/mng-8301-project-without-modelversion/module-a/pom.xml b/core-it-suite/src/test/resources/mng-8301-project-without-modelversion/module-a/pom.xml new file mode 100644 index 000000000..6057d29ef --- /dev/null +++ b/core-it-suite/src/test/resources/mng-8301-project-without-modelversion/module-a/pom.xml @@ -0,0 +1,10 @@ + + + + + org.apache.maven.its.mng8301 + m4womv + + + module-a + diff --git a/core-it-suite/src/test/resources/mng-8301-project-without-modelversion/module-b/pom.xml b/core-it-suite/src/test/resources/mng-8301-project-without-modelversion/module-b/pom.xml new file mode 100644 index 000000000..aba8c9ad3 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-8301-project-without-modelversion/module-b/pom.xml @@ -0,0 +1,17 @@ + + + + + org.apache.maven.its.mng8301 + m4womv + + + module-b + + + + org.apache.maven.repro + module-a + + + diff --git a/core-it-suite/src/test/resources/mng-8301-project-without-modelversion/pom.xml b/core-it-suite/src/test/resources/mng-8301-project-without-modelversion/pom.xml new file mode 100644 index 000000000..d69745392 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-8301-project-without-modelversion/pom.xml @@ -0,0 +1,46 @@ + + + + org.apache.maven.its.mng8301 + m4womv + + 1-SNAPSHOT + pom + + + module-a + module-b + + + + UTF-8 + 17 + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.13.0 + + + org.apache.maven.plugins + maven-jar-plugin + 3.4.2 + + + org.apache.maven.plugins + maven-resources-plugin + 3.3.1 + + + org.apache.maven.plugins + maven-surefire-plugin + 3.5.0 + + + + +