[MNG-8404] ModelValidator: add unit tests and simplify a bit (#1948)

This commit is contained in:
Guillaume Nodet 2024-12-05 15:16:47 +01:00 committed by GitHub
parent f7f6281e13
commit 789e2de812
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
75 changed files with 3714 additions and 132 deletions

View File

@ -19,7 +19,6 @@
package org.apache.maven.api.services.model;
import org.apache.maven.api.model.Model;
import org.apache.maven.api.services.ModelBuilderRequest;
import org.apache.maven.api.services.ModelProblemCollector;
/**
@ -60,13 +59,9 @@ public interface ModelValidator {
*
* @param model The model to validate, must not be {@code null}.
* @param validationLevel The validation level.
* @param request The model building request that holds further settings, must not be {@code null}.
* @param problems The container used to collect problems that were encountered, must not be {@code null}.
*/
default void validateFileModel(
Model model, int validationLevel, ModelBuilderRequest request, ModelProblemCollector problems) {
// do nothing
}
void validateFileModel(Model model, int validationLevel, ModelProblemCollector problems);
/**
* Checks the specified (raw) model for missing or invalid values. The raw model is the file model + buildpom filter
@ -74,11 +69,9 @@ public interface ModelValidator {
*
* @param model The model to validate, must not be {@code null}.
* @param validationLevel The validation level.
* @param request The model building request that holds further settings, must not be {@code null}.
* @param problems The container used to collect problems that were encountered, must not be {@code null}.
*/
void validateRawModel(
Model model, int validationLevel, ModelBuilderRequest request, ModelProblemCollector problems);
void validateRawModel(Model model, int validationLevel, ModelProblemCollector problems);
/**
* Checks the specified (effective) model for missing or invalid values. The effective model is fully assembled and
@ -86,9 +79,7 @@ public interface ModelValidator {
*
* @param model The model to validate, must not be {@code null}.
* @param validationLevel The validation level.
* @param request The model building request that holds further settings, must not be {@code null}.
* @param problems The container used to collect problems that were encountered, must not be {@code null}.
*/
void validateEffectiveModel(
Model model, int validationLevel, ModelBuilderRequest request, ModelProblemCollector problems);
void validateEffectiveModel(Model model, int validationLevel, ModelProblemCollector problems);
}

View File

@ -858,7 +858,6 @@ public class DefaultModelBuilder implements ModelBuilder {
modelValidator.validateEffectiveModel(
resultModel,
isBuildRequest() ? ModelValidator.VALIDATION_LEVEL_STRICT : ModelValidator.VALIDATION_LEVEL_MINIMAL,
request,
this);
if (hasErrors()) {
@ -1453,7 +1452,6 @@ public class DefaultModelBuilder implements ModelBuilder {
modelValidator.validateFileModel(
model,
isBuildRequest() ? ModelValidator.VALIDATION_LEVEL_STRICT : ModelValidator.VALIDATION_LEVEL_MINIMAL,
request,
this);
if (hasFatalErrors()) {
throw newModelBuilderException();
@ -1485,7 +1483,6 @@ public class DefaultModelBuilder implements ModelBuilder {
modelValidator.validateRawModel(
rawModel,
isBuildRequest() ? ModelValidator.VALIDATION_LEVEL_STRICT : ModelValidator.VALIDATION_LEVEL_MINIMAL,
request,
this);
if (hasFatalErrors()) {

View File

@ -66,7 +66,6 @@ import org.apache.maven.api.model.Repository;
import org.apache.maven.api.model.Resource;
import org.apache.maven.api.services.BuilderProblem.Severity;
import org.apache.maven.api.services.ModelBuilder;
import org.apache.maven.api.services.ModelBuilderRequest;
import org.apache.maven.api.services.ModelProblem;
import org.apache.maven.api.services.ModelProblem.Version;
import org.apache.maven.api.services.ModelProblemCollector;
@ -304,8 +303,7 @@ public class DefaultModelValidator implements ModelValidator {
@Override
@SuppressWarnings("checkstyle:MethodLength")
public void validateFileModel(
Model m, int validationLevel, ModelBuilderRequest request, ModelProblemCollector problems) {
public void validateFileModel(Model m, int validationLevel, ModelProblemCollector problems) {
Parent parent = m.getParent();
if (parent != null) {
@ -443,12 +441,6 @@ public class DefaultModelValidator implements ModelValidator {
Severity errOn30 = getSeverity(validationLevel, ModelValidator.VALIDATION_LEVEL_MAVEN_3_0);
// The file pom may not contain the modelVersion yet, as it may be set later by the
// ModelVersionXMLFilter.
if (m.getModelVersion() != null && !m.getModelVersion().isEmpty()) {
validateModelVersion(problems, m.getModelVersion(), m, VALID_MODEL_VERSIONS);
}
boolean isModelVersion41OrMore = !Objects.equals(ModelBuilder.MODEL_VERSION_4_0_0, m.getModelVersion());
if (isModelVersion41OrMore) {
validateStringNoExpression("groupId", problems, Severity.FATAL, Version.V41, m.getGroupId(), m);
@ -489,11 +481,9 @@ public class DefaultModelValidator implements ModelValidator {
"dependencies.dependency.",
EMPTY,
isModelVersion41OrMore,
validationLevel,
request);
validationLevel);
validate20RawDependenciesSelfReferencing(
problems, m, m.getDependencies(), "dependencies.dependency", request);
validate20RawDependenciesSelfReferencing(problems, m, m.getDependencies(), "dependencies.dependency");
if (m.getDependencyManagement() != null) {
validate20RawDependencies(
@ -502,25 +492,21 @@ public class DefaultModelValidator implements ModelValidator {
"dependencyManagement.dependencies.dependency.",
EMPTY,
isModelVersion41OrMore,
validationLevel,
request);
validationLevel);
}
validateRawRepositories(
problems, m.getRepositories(), "repositories.repository.", EMPTY, validationLevel, request);
validateRawRepositories(problems, m.getRepositories(), "repositories.repository.", EMPTY, validationLevel);
validateRawRepositories(
problems,
m.getPluginRepositories(),
"pluginRepositories.pluginRepository.",
EMPTY,
validationLevel,
request);
validationLevel);
Build build = m.getBuild();
if (build != null) {
validate20RawPlugins(
problems, build.getPlugins(), "build.plugins.plugin.", EMPTY, validationLevel, request);
validate20RawPlugins(problems, build.getPlugins(), "build.plugins.plugin.", EMPTY, validationLevel);
PluginManagement mgmt = build.getPluginManagement();
if (mgmt != null) {
@ -529,8 +515,7 @@ public class DefaultModelValidator implements ModelValidator {
mgmt.getPlugins(),
"build.pluginManagement.plugins.plugin.",
EMPTY,
validationLevel,
request);
validationLevel);
}
}
@ -560,8 +545,7 @@ public class DefaultModelValidator implements ModelValidator {
prefix,
"dependencies.dependency.",
isModelVersion41OrMore,
validationLevel,
request);
validationLevel);
if (profile.getDependencyManagement() != null) {
validate20RawDependencies(
@ -570,30 +554,22 @@ public class DefaultModelValidator implements ModelValidator {
prefix,
"dependencyManagement.dependencies.dependency.",
isModelVersion41OrMore,
validationLevel,
request);
validationLevel);
}
validateRawRepositories(
problems,
profile.getRepositories(),
prefix,
"repositories.repository.",
validationLevel,
request);
problems, profile.getRepositories(), prefix, "repositories.repository.", validationLevel);
validateRawRepositories(
problems,
profile.getPluginRepositories(),
prefix,
"pluginRepositories.pluginRepository.",
validationLevel,
request);
validationLevel);
BuildBase buildBase = profile.getBuild();
if (buildBase != null) {
validate20RawPlugins(
problems, buildBase.getPlugins(), prefix, "plugins.plugin.", validationLevel, request);
validate20RawPlugins(problems, buildBase.getPlugins(), prefix, "plugins.plugin.", validationLevel);
PluginManagement mgmt = buildBase.getPluginManagement();
if (mgmt != null) {
@ -602,8 +578,7 @@ public class DefaultModelValidator implements ModelValidator {
mgmt.getPlugins(),
prefix,
"pluginManagement.plugins.plugin.",
validationLevel,
request);
validationLevel);
}
}
}
@ -611,8 +586,7 @@ public class DefaultModelValidator implements ModelValidator {
}
@Override
public void validateRawModel(
Model m, int validationLevel, ModelBuilderRequest request, ModelProblemCollector problems) {
public void validateRawModel(Model m, int validationLevel, ModelProblemCollector problems) {
// Check that the model version is correctly set wrt the model definition, i.e., that the
// user does not use an attribute or element that is not available in the modelVersion used.
String minVersion = new MavenModelVersion().getModelVersion(m);
@ -715,12 +689,7 @@ public class DefaultModelValidator implements ModelValidator {
}
private void validate20RawPlugins(
ModelProblemCollector problems,
List<Plugin> plugins,
String prefix,
String prefix2,
int validationLevel,
ModelBuilderRequest request) {
ModelProblemCollector problems, List<Plugin> plugins, String prefix, String prefix2, int validationLevel) {
Severity errOn31 = getSeverity(validationLevel, ModelValidator.VALIDATION_LEVEL_MAVEN_3_1);
Map<String, Plugin> index = new HashMap<>();
@ -800,8 +769,7 @@ public class DefaultModelValidator implements ModelValidator {
@Override
@SuppressWarnings("checkstyle:MethodLength")
public void validateEffectiveModel(
Model m, int validationLevel, ModelBuilderRequest request, ModelProblemCollector problems) {
public void validateEffectiveModel(Model m, int validationLevel, ModelProblemCollector problems) {
validateStringNotEmpty("modelVersion", problems, Severity.ERROR, Version.BASE, m.getModelVersion(), m);
validateCoordinatesId("groupId", problems, m.getGroupId(), m);
@ -852,11 +820,11 @@ public class DefaultModelValidator implements ModelValidator {
Severity errOn30 = getSeverity(validationLevel, ModelValidator.VALIDATION_LEVEL_MAVEN_3_0);
validateEffectiveDependencies(problems, m, m.getDependencies(), false, validationLevel, request);
validateEffectiveDependencies(problems, m, m.getDependencies(), false, validationLevel);
DependencyManagement mgmt = m.getDependencyManagement();
if (mgmt != null) {
validateEffectiveDependencies(problems, m, mgmt.getDependencies(), true, validationLevel, request);
validateEffectiveDependencies(problems, m, mgmt.getDependencies(), true, validationLevel);
}
if (validationLevel >= ModelValidator.VALIDATION_LEVEL_MAVEN_2_0) {
@ -897,13 +865,7 @@ public class DefaultModelValidator implements ModelValidator {
"build.plugins.plugin.groupId", problems, Severity.ERROR, Version.V20, p.getGroupId(), p);
validate20PluginVersion(
"build.plugins.plugin.version",
problems,
p.getVersion(),
p.getKey(),
p,
validationLevel,
request);
"build.plugins.plugin.version", problems, p.getVersion(), p.getKey(), p, validationLevel);
validateBoolean(
"build.plugins.plugin.inherited",
@ -925,18 +887,13 @@ public class DefaultModelValidator implements ModelValidator {
p.getKey(),
p);
validate20EffectivePluginDependencies(problems, p, validationLevel, request);
validate20EffectivePluginDependencies(problems, p, validationLevel);
}
validate20RawResources(
problems, build.getResources(), "build.resources.resource.", validationLevel, request);
validate20RawResources(problems, build.getResources(), "build.resources.resource.", validationLevel);
validate20RawResources(
problems,
build.getTestResources(),
"build.testResources.testResource.",
validationLevel,
request);
problems, build.getTestResources(), "build.testResources.testResource.", validationLevel);
}
Reporting reporting = m.getReporting();
@ -961,13 +918,12 @@ public class DefaultModelValidator implements ModelValidator {
}
for (Repository repository : m.getRepositories()) {
validate20EffectiveRepository(
problems, repository, "repositories.repository.", validationLevel, request);
validate20EffectiveRepository(problems, repository, "repositories.repository.", validationLevel);
}
for (Repository repository : m.getPluginRepositories()) {
validate20EffectiveRepository(
problems, repository, "pluginRepositories.pluginRepository.", validationLevel, request);
problems, repository, "pluginRepositories.pluginRepository.", validationLevel);
}
DistributionManagement distMgmt = m.getDistributionManagement();
@ -984,17 +940,12 @@ public class DefaultModelValidator implements ModelValidator {
}
validate20EffectiveRepository(
problems,
distMgmt.getRepository(),
"distributionManagement.repository.",
validationLevel,
request);
problems, distMgmt.getRepository(), "distributionManagement.repository.", validationLevel);
validate20EffectiveRepository(
problems,
distMgmt.getSnapshotRepository(),
"distributionManagement.snapshotRepository.",
validationLevel,
request);
validationLevel);
}
}
}
@ -1005,8 +956,7 @@ public class DefaultModelValidator implements ModelValidator {
String prefix,
String prefix2,
boolean is41OrBeyond,
int validationLevel,
ModelBuilderRequest request) {
int validationLevel) {
Severity errOn30 = getSeverity(validationLevel, ModelValidator.VALIDATION_LEVEL_MAVEN_3_0);
Severity errOn31 = getSeverity(validationLevel, ModelValidator.VALIDATION_LEVEL_MAVEN_3_1);
@ -1112,11 +1062,7 @@ public class DefaultModelValidator implements ModelValidator {
}
private void validate20RawDependenciesSelfReferencing(
ModelProblemCollector problems,
Model m,
List<Dependency> dependencies,
String prefix,
ModelBuilderRequest request) {
ModelProblemCollector problems, Model m, List<Dependency> dependencies, String prefix) {
// We only check for groupId/artifactId/version/classifier cause if there is another
// module with the same groupId/artifactId/version/classifier this will fail the build
// earlier like "Project '...' is duplicated in the reactor.
@ -1147,14 +1093,13 @@ public class DefaultModelValidator implements ModelValidator {
Model m,
List<Dependency> dependencies,
boolean management,
int validationLevel,
ModelBuilderRequest request) {
int validationLevel) {
Severity errOn30 = getSeverity(validationLevel, ModelValidator.VALIDATION_LEVEL_MAVEN_3_0);
String prefix = management ? "dependencyManagement.dependencies.dependency." : "dependencies.dependency.";
for (Dependency d : dependencies) {
validateEffectiveDependency(problems, d, management, prefix, validationLevel, request);
validateEffectiveDependency(problems, d, management, prefix, validationLevel);
if (validationLevel >= ModelValidator.VALIDATION_LEVEL_MAVEN_2_0) {
validateBoolean(
@ -1183,7 +1128,7 @@ public class DefaultModelValidator implements ModelValidator {
"test",
"system");
validateEffectiveModelAgainstDependency(prefix, problems, m, d, request);
validateEffectiveModelAgainstDependency(prefix, problems, m, d);
} else {
validateEnum(
prefix,
@ -1206,7 +1151,7 @@ public class DefaultModelValidator implements ModelValidator {
}
private void validateEffectiveModelAgainstDependency(
String prefix, ModelProblemCollector problems, Model m, Dependency d, ModelBuilderRequest request) {
String prefix, ModelProblemCollector problems, Model m, Dependency d) {
String key = d.getGroupId() + ":" + d.getArtifactId() + ":" + d.getVersion()
+ (d.getClassifier() != null ? ":" + d.getClassifier() : EMPTY);
String mKey = m.getGroupId() + ":" + m.getArtifactId() + ":" + m.getVersion();
@ -1220,7 +1165,7 @@ public class DefaultModelValidator implements ModelValidator {
}
private void validate20EffectivePluginDependencies(
ModelProblemCollector problems, Plugin plugin, int validationLevel, ModelBuilderRequest request) {
ModelProblemCollector problems, Plugin plugin, int validationLevel) {
List<Dependency> dependencies = plugin.getDependencies();
if (!dependencies.isEmpty()) {
@ -1229,7 +1174,7 @@ public class DefaultModelValidator implements ModelValidator {
Severity errOn30 = getSeverity(validationLevel, ModelValidator.VALIDATION_LEVEL_MAVEN_3_0);
for (Dependency d : dependencies) {
validateEffectiveDependency(problems, d, false, prefix, validationLevel, request);
validateEffectiveDependency(problems, d, false, prefix, validationLevel);
validateVersion(
prefix, "version", problems, errOn30, Version.BASE, d.getVersion(), d.getManagementKey(), d);
@ -1251,12 +1196,7 @@ public class DefaultModelValidator implements ModelValidator {
}
private void validateEffectiveDependency(
ModelProblemCollector problems,
Dependency d,
boolean management,
String prefix,
int validationLevel,
ModelBuilderRequest request) {
ModelProblemCollector problems, Dependency d, boolean management, String prefix, int validationLevel) {
validateCoordinatesId(
prefix,
"artifactId",
@ -1301,12 +1241,7 @@ public class DefaultModelValidator implements ModelValidator {
"must specify an absolute path but is " + systemPath,
d);
} else if (!sysFile.isFile()) {
String msg = "refers to a non-existing file " + sysFile.getAbsolutePath();
systemPath = systemPath.replace('/', File.separatorChar).replace('\\', File.separatorChar);
String jdkHome = request.getSystemProperties().get("java.home") + File.separator + "..";
if (systemPath.startsWith(jdkHome)) {
msg += ". Please verify that you run Maven using a JDK and not just a JRE.";
}
String msg = "refers to a non-existing file " + sysFile.getAbsolutePath() + ".";
addViolation(
problems,
Severity.WARNING,
@ -1388,8 +1323,7 @@ public class DefaultModelValidator implements ModelValidator {
List<Repository> repositories,
String prefix,
String prefix2,
int validationLevel,
ModelBuilderRequest request) {
int validationLevel) {
Map<String, Repository> index = new HashMap<>();
for (Repository repository : repositories) {
@ -1445,11 +1379,7 @@ public class DefaultModelValidator implements ModelValidator {
}
private void validate20EffectiveRepository(
ModelProblemCollector problems,
Repository repository,
String prefix,
int validationLevel,
ModelBuilderRequest request) {
ModelProblemCollector problems, Repository repository, String prefix, int validationLevel) {
if (repository != null) {
Severity errOn31 = getSeverity(validationLevel, ModelValidator.VALIDATION_LEVEL_MAVEN_3_1);
@ -1490,11 +1420,7 @@ public class DefaultModelValidator implements ModelValidator {
}
private void validate20RawResources(
ModelProblemCollector problems,
List<Resource> resources,
String prefix,
int validationLevel,
ModelBuilderRequest request) {
ModelProblemCollector problems, List<Resource> resources, String prefix, int validationLevel) {
Severity errOn30 = getSeverity(validationLevel, ModelValidator.VALIDATION_LEVEL_MAVEN_3_0);
for (Resource resource : resources) {
@ -1696,7 +1622,7 @@ public class DefaultModelValidator implements ModelValidator {
}
Matcher m = EXPRESSION_NAME_PATTERN.matcher(string.trim());
while (m.find()) {
if (m.find()) {
addViolation(
problems,
severity,
@ -2085,8 +2011,7 @@ public class DefaultModelValidator implements ModelValidator {
String string,
String sourceHint,
InputLocationTracker tracker,
int validationLevel,
ModelBuilderRequest request) {
int validationLevel) {
if (string == null) {
addViolation(
problems,

View File

@ -0,0 +1,864 @@
/*
* 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.internal.impl.model;
import java.io.InputStream;
import java.util.List;
import org.apache.maven.api.model.Model;
import org.apache.maven.api.services.model.ModelValidator;
import org.apache.maven.internal.impl.model.profile.SimpleProblemCollector;
import org.apache.maven.model.v4.MavenStaxReader;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
/**
*/
class DefaultModelValidatorTest {
private ModelValidator validator;
private Model read(String pom) throws Exception {
String resource = "/poms/validation/" + pom;
try (InputStream is = getClass().getResourceAsStream(resource)) {
assertNotNull(is, "missing resource: " + resource);
return new MavenStaxReader().read(is);
}
}
private SimpleProblemCollector validate(String pom) throws Exception {
return validateEffective(pom, ModelValidator.VALIDATION_LEVEL_STRICT);
}
private SimpleProblemCollector validateFile(String pom) throws Exception {
return validateFile(pom, ModelValidator.VALIDATION_LEVEL_STRICT);
}
private SimpleProblemCollector validateRaw(String pom) throws Exception {
return validateRaw(pom, ModelValidator.VALIDATION_LEVEL_STRICT);
}
@SuppressWarnings("SameParameterValue")
private SimpleProblemCollector validateEffective(String pom, int level) throws Exception {
Model model = read(pom);
SimpleProblemCollector problems = new SimpleProblemCollector();
validator.validateEffectiveModel(model, level, problems);
return problems;
}
@SuppressWarnings("SameParameterValue")
private SimpleProblemCollector validateFile(String pom, int level) throws Exception {
Model model = read(pom);
SimpleProblemCollector problems = new SimpleProblemCollector();
validator.validateFileModel(model, level, problems);
return problems;
}
@SuppressWarnings("SameParameterValue")
private SimpleProblemCollector validateRaw(String pom, int level) throws Exception {
Model model = read(pom);
SimpleProblemCollector problems = new SimpleProblemCollector();
validator.validateRawModel(model, level, problems);
return problems;
}
private void assertContains(String msg, String substring) {
assertTrue(msg.contains(substring), "\"" + substring + "\" was not found in: " + msg);
}
@BeforeEach
void setUp() throws Exception {
validator = new DefaultModelValidator();
}
@AfterEach
void tearDown() throws Exception {
this.validator = null;
}
private void assertViolations(SimpleProblemCollector result, int fatals, int errors, int warnings) {
assertEquals(fatals, result.getFatals().size(), String.valueOf(result.getFatals()));
assertEquals(errors, result.getErrors().size(), String.valueOf(result.getErrors()));
assertEquals(warnings, result.getWarnings().size(), String.valueOf(result.getWarnings()));
}
@Test
void testMissingModelVersion() throws Exception {
SimpleProblemCollector result = validate("missing-modelVersion-pom.xml");
assertViolations(result, 0, 1, 0);
assertEquals("'modelVersion' is missing.", result.getErrors().get(0));
}
@Test
void testBadModelVersion() throws Exception {
SimpleProblemCollector result = validateFile("bad-modelVersion.xml");
assertViolations(result, 1, 0, 0);
assertTrue(result.getFatals().get(0).contains("modelVersion"));
}
@Test
void testModelVersionMessage() throws Exception {
SimpleProblemCollector result = validateFile("modelVersion-4_0.xml");
assertViolations(result, 0, 1, 0);
assertTrue(result.getErrors().get(0).contains("'modelVersion' must be one of"));
}
@Test
void testMissingArtifactId() throws Exception {
SimpleProblemCollector result = validate("missing-artifactId-pom.xml");
assertViolations(result, 0, 1, 0);
assertEquals("'artifactId' is missing.", result.getErrors().get(0));
}
@Test
void testMissingGroupId() throws Exception {
SimpleProblemCollector result = validate("missing-groupId-pom.xml");
assertViolations(result, 0, 1, 0);
assertEquals("'groupId' is missing.", result.getErrors().get(0));
}
@Test
void testInvalidCoordinateIds() throws Exception {
SimpleProblemCollector result = validate("invalid-coordinate-ids-pom.xml");
assertViolations(result, 0, 2, 0);
assertEquals(
"'groupId' with value 'o/a/m' does not match a valid coordinate id pattern.",
result.getErrors().get(0));
assertEquals(
"'artifactId' with value 'm$-do$' does not match a valid coordinate id pattern.",
result.getErrors().get(1));
}
@Test
void testMissingType() throws Exception {
SimpleProblemCollector result = validate("missing-type-pom.xml");
assertViolations(result, 0, 1, 0);
assertEquals("'packaging' is missing.", result.getErrors().get(0));
}
@Test
void testMissingVersion() throws Exception {
SimpleProblemCollector result = validate("missing-version-pom.xml");
assertViolations(result, 0, 1, 0);
assertEquals("'version' is missing.", result.getErrors().get(0));
}
@Test
void testInvalidAggregatorPackaging() throws Exception {
SimpleProblemCollector result = validate("invalid-aggregator-packaging-pom.xml");
assertViolations(result, 0, 1, 0);
assertTrue(result.getErrors().get(0).contains("Aggregator projects require 'pom' as packaging."));
}
@Test
void testMissingDependencyArtifactId() throws Exception {
SimpleProblemCollector result = validate("missing-dependency-artifactId-pom.xml");
assertViolations(result, 0, 1, 0);
assertTrue(result.getErrors()
.get(0)
.contains("'dependencies.dependency.artifactId' for groupId:null:jar is missing"));
}
@Test
void testMissingDependencyGroupId() throws Exception {
SimpleProblemCollector result = validate("missing-dependency-groupId-pom.xml");
assertViolations(result, 0, 1, 0);
assertTrue(result.getErrors()
.get(0)
.contains("'dependencies.dependency.groupId' for null:artifactId:jar is missing"));
}
@Test
void testMissingDependencyVersion() throws Exception {
SimpleProblemCollector result = validate("missing-dependency-version-pom.xml");
assertViolations(result, 0, 1, 0);
assertTrue(result.getErrors()
.get(0)
.contains("'dependencies.dependency.version' for groupId:artifactId:jar is missing"));
}
@Test
void testMissingDependencyManagementArtifactId() throws Exception {
SimpleProblemCollector result = validate("missing-dependency-mgmt-artifactId-pom.xml");
assertViolations(result, 0, 1, 0);
assertTrue(result.getErrors()
.get(0)
.contains("'dependencyManagement.dependencies.dependency.artifactId' for groupId:null:jar is missing"));
}
@Test
void testMissingDependencyManagementGroupId() throws Exception {
SimpleProblemCollector result = validate("missing-dependency-mgmt-groupId-pom.xml");
assertViolations(result, 0, 1, 0);
assertTrue(result.getErrors()
.get(0)
.contains("'dependencyManagement.dependencies.dependency.groupId' for null:artifactId:jar is missing"));
}
@Test
void testMissingAll() throws Exception {
SimpleProblemCollector result = validate("missing-1-pom.xml");
assertViolations(result, 0, 4, 0);
List<String> messages = result.getErrors();
assertTrue(messages.contains("'modelVersion' is missing."));
assertTrue(messages.contains("'groupId' is missing."));
assertTrue(messages.contains("'artifactId' is missing."));
assertTrue(messages.contains("'version' is missing."));
// type is inherited from the super pom
}
@Test
void testMissingPluginArtifactId() throws Exception {
SimpleProblemCollector result = validate("missing-plugin-artifactId-pom.xml");
assertViolations(result, 0, 1, 0);
assertEquals(
"'build.plugins.plugin.artifactId' is missing.",
result.getErrors().get(0));
}
@Test
void testEmptyPluginVersion() throws Exception {
SimpleProblemCollector result = validate("empty-plugin-version.xml");
assertViolations(result, 0, 1, 0);
assertEquals(
"'build.plugins.plugin.version' for org.apache.maven.plugins:maven-it-plugin"
+ " must be a valid version but is ''.",
result.getErrors().get(0));
}
@Test
void testMissingRepositoryId() throws Exception {
SimpleProblemCollector result =
validateFile("missing-repository-id-pom.xml", ModelValidator.VALIDATION_LEVEL_STRICT);
assertViolations(result, 0, 4, 0);
assertEquals(
"'repositories.repository.id' is missing.", result.getErrors().get(0));
assertEquals(
"'repositories.repository.[null].url' is missing.",
result.getErrors().get(1));
assertEquals(
"'pluginRepositories.pluginRepository.id' is missing.",
result.getErrors().get(2));
assertEquals(
"'pluginRepositories.pluginRepository.[null].url' is missing.",
result.getErrors().get(3));
}
@Test
void testMissingResourceDirectory() throws Exception {
SimpleProblemCollector result = validate("missing-resource-directory-pom.xml");
assertViolations(result, 0, 2, 0);
assertEquals(
"'build.resources.resource.directory' is missing.",
result.getErrors().get(0));
assertEquals(
"'build.testResources.testResource.directory' is missing.",
result.getErrors().get(1));
}
@Test
void testBadPluginDependencyScope() throws Exception {
SimpleProblemCollector result = validate("bad-plugin-dependency-scope.xml");
assertViolations(result, 0, 3, 0);
assertTrue(result.getErrors().get(0).contains("test:d"));
assertTrue(result.getErrors().get(1).contains("test:e"));
assertTrue(result.getErrors().get(2).contains("test:f"));
}
@Test
void testBadDependencyScope() throws Exception {
SimpleProblemCollector result = validate("bad-dependency-scope.xml");
assertViolations(result, 0, 0, 2);
assertTrue(result.getWarnings().get(0).contains("test:f"));
assertTrue(result.getWarnings().get(1).contains("test:g"));
}
@Test
void testBadDependencyManagementScope() throws Exception {
SimpleProblemCollector result = validate("bad-dependency-management-scope.xml");
assertViolations(result, 0, 0, 1);
assertContains(result.getWarnings().get(0), "test:g");
}
@Test
void testBadDependencyVersion() throws Exception {
SimpleProblemCollector result = validate("bad-dependency-version.xml");
assertViolations(result, 0, 2, 0);
assertContains(
result.getErrors().get(0), "'dependencies.dependency.version' for test:b:jar must be a valid version");
assertContains(
result.getErrors().get(1),
"'dependencies.dependency.version' for test:c:jar must not contain any of these characters");
}
@Test
void testDuplicateModule() throws Exception {
SimpleProblemCollector result = validateFile("duplicate-module.xml");
assertViolations(result, 0, 1, 0);
assertTrue(result.getErrors().get(0).contains("child"));
}
@Test
void testInvalidProfileId() throws Exception {
SimpleProblemCollector result = validateFile("invalid-profile-ids.xml");
assertViolations(result, 0, 4, 0);
assertTrue(result.getErrors().get(0).contains("+invalid-id"));
assertTrue(result.getErrors().get(1).contains("-invalid-id"));
assertTrue(result.getErrors().get(2).contains("!invalid-id"));
assertTrue(result.getErrors().get(3).contains("?invalid-id"));
}
@Test
void testDuplicateProfileId() throws Exception {
SimpleProblemCollector result = validateFile("duplicate-profile-id.xml");
assertViolations(result, 0, 1, 0);
assertTrue(result.getErrors().get(0).contains("non-unique-id"));
}
@Test
void testBadPluginVersion() throws Exception {
SimpleProblemCollector result = validate("bad-plugin-version.xml");
assertViolations(result, 0, 4, 0);
assertContains(
result.getErrors().get(0), "'build.plugins.plugin.version' for test:mip must be a valid version");
assertContains(
result.getErrors().get(1), "'build.plugins.plugin.version' for test:rmv must be a valid version");
assertContains(
result.getErrors().get(2), "'build.plugins.plugin.version' for test:lmv must be a valid version");
assertContains(
result.getErrors().get(3),
"'build.plugins.plugin.version' for test:ifsc must not contain any of these characters");
}
@Test
void testDistributionManagementStatus() throws Exception {
SimpleProblemCollector result = validate("distribution-management-status.xml");
assertViolations(result, 0, 1, 0);
assertTrue(result.getErrors().get(0).contains("distributionManagement.status"));
}
@Test
void testIncompleteParent() throws Exception {
SimpleProblemCollector result = validateRaw("incomplete-parent.xml");
assertViolations(result, 3, 0, 0);
assertTrue(result.getFatals().get(0).contains("parent.groupId"));
assertTrue(result.getFatals().get(1).contains("parent.artifactId"));
assertTrue(result.getFatals().get(2).contains("parent.version"));
}
@Test
void testHardCodedSystemPath() throws Exception {
SimpleProblemCollector result = validateFile("hard-coded-system-path.xml");
assertViolations(result, 0, 0, 3);
assertContains(
result.getWarnings().get(0),
"'dependencies.dependency.scope' for test:a:jar declares usage of deprecated 'system' scope");
assertContains(
result.getWarnings().get(1),
"'dependencies.dependency.systemPath' for test:a:jar should use a variable instead of a hard-coded path");
assertContains(
result.getWarnings().get(2),
"'dependencies.dependency.scope' for test:b:jar declares usage of deprecated 'system' scope");
}
@Test
void testEmptyModule() throws Exception {
SimpleProblemCollector result = validate("empty-module.xml");
assertViolations(result, 0, 1, 0);
assertTrue(result.getErrors().get(0).contains("'modules.module[0]' has been specified without a path"));
}
@Test
void testDuplicatePlugin() throws Exception {
SimpleProblemCollector result = validateFile("duplicate-plugin.xml");
assertViolations(result, 0, 4, 0);
assertTrue(result.getErrors().get(0).contains("duplicate declaration of plugin test:duplicate"));
assertTrue(result.getErrors().get(1).contains("duplicate declaration of plugin test:managed-duplicate"));
assertTrue(result.getErrors().get(2).contains("duplicate declaration of plugin profile:duplicate"));
assertTrue(result.getErrors().get(3).contains("duplicate declaration of plugin profile:managed-duplicate"));
}
@Test
void testDuplicatePluginExecution() throws Exception {
SimpleProblemCollector result = validateFile("duplicate-plugin-execution.xml");
assertViolations(result, 0, 4, 0);
assertContains(result.getErrors().get(0), "duplicate execution with id a");
assertContains(result.getErrors().get(1), "duplicate execution with id default");
assertContains(result.getErrors().get(2), "duplicate execution with id c");
assertContains(result.getErrors().get(3), "duplicate execution with id b");
}
@Test
void testReservedRepositoryId() throws Exception {
SimpleProblemCollector result = validate("reserved-repository-id.xml");
assertViolations(result, 0, 4, 0);
assertContains(result.getErrors().get(0), "'repositories.repository.id'" + " must not be 'local'");
assertContains(result.getErrors().get(1), "'pluginRepositories.pluginRepository.id' must not be 'local'");
assertContains(result.getErrors().get(2), "'distributionManagement.repository.id' must not be 'local'");
assertContains(result.getErrors().get(3), "'distributionManagement.snapshotRepository.id' must not be 'local'");
}
@Test
void testMissingPluginDependencyGroupId() throws Exception {
SimpleProblemCollector result = validate("missing-plugin-dependency-groupId.xml");
assertViolations(result, 0, 1, 0);
assertTrue(result.getErrors().get(0).contains(":a:"));
}
@Test
void testMissingPluginDependencyArtifactId() throws Exception {
SimpleProblemCollector result = validate("missing-plugin-dependency-artifactId.xml");
assertViolations(result, 0, 1, 0);
assertTrue(result.getErrors().get(0).contains("test:"));
}
@Test
void testMissingPluginDependencyVersion() throws Exception {
SimpleProblemCollector result = validate("missing-plugin-dependency-version.xml");
assertViolations(result, 0, 1, 0);
assertTrue(result.getErrors().get(0).contains("test:a"));
}
@Test
void testBadPluginDependencyVersion() throws Exception {
SimpleProblemCollector result = validate("bad-plugin-dependency-version.xml");
assertViolations(result, 0, 1, 0);
assertTrue(result.getErrors().get(0).contains("test:b"));
}
@Test
void testBadVersion() throws Exception {
SimpleProblemCollector result = validate("bad-version.xml");
assertViolations(result, 0, 1, 0);
assertContains(result.getErrors().get(0), "'version' must not contain any of these characters");
}
@Test
void testBadSnapshotVersion() throws Exception {
SimpleProblemCollector result = validate("bad-snapshot-version.xml");
assertViolations(result, 0, 1, 0);
assertContains(result.getErrors().get(0), "'version' uses an unsupported snapshot version format");
}
@Test
void testBadRepositoryId() throws Exception {
SimpleProblemCollector result = validate("bad-repository-id.xml");
assertViolations(result, 0, 4, 0);
assertContains(
result.getErrors().get(0), "'repositories.repository.id' must not contain any of these characters");
assertContains(
result.getErrors().get(1),
"'pluginRepositories.pluginRepository.id' must not contain any of these characters");
assertContains(
result.getErrors().get(2),
"'distributionManagement.repository.id' must not contain any of these characters");
assertContains(
result.getErrors().get(3),
"'distributionManagement.snapshotRepository.id' must not contain any of these characters");
}
@Test
void testBadDependencyExclusionId() throws Exception {
SimpleProblemCollector result =
validateEffective("bad-dependency-exclusion-id.xml", ModelValidator.VALIDATION_LEVEL_MAVEN_2_0);
assertViolations(result, 0, 0, 2);
assertContains(
result.getWarnings().get(0), "'dependencies.dependency.exclusions.exclusion.groupId' for gid:aid:jar");
assertContains(
result.getWarnings().get(1),
"'dependencies.dependency.exclusions.exclusion.artifactId' for gid:aid:jar");
// MNG-3832: Aether (part of M3+) supports wildcard expressions for exclusions
SimpleProblemCollector result_30 = validate("bad-dependency-exclusion-id.xml");
assertViolations(result_30, 0, 0, 0);
}
@Test
void testMissingDependencyExclusionId() throws Exception {
SimpleProblemCollector result = validate("missing-dependency-exclusion-id.xml");
assertViolations(result, 0, 0, 2);
assertContains(
result.getWarnings().get(0),
"'dependencies.dependency.exclusions.exclusion.groupId' for gid:aid:jar is missing");
assertContains(
result.getWarnings().get(1),
"'dependencies.dependency.exclusions.exclusion.artifactId' for gid:aid:jar is missing");
}
@Test
void testBadImportScopeType() throws Exception {
SimpleProblemCollector result = validateFile("bad-import-scope-type.xml");
assertViolations(result, 0, 0, 1);
assertContains(
result.getWarnings().get(0),
"'dependencyManagement.dependencies.dependency.type' for test:a:jar must be 'pom'");
}
@Test
void testBadImportScopeClassifier() throws Exception {
SimpleProblemCollector result = validateFile("bad-import-scope-classifier.xml");
assertViolations(result, 0, 1, 0);
assertContains(
result.getErrors().get(0),
"'dependencyManagement.dependencies.dependency.classifier' for test:a:pom:cls must be empty");
}
@Test
void testSystemPathRefersToProjectBasedir() throws Exception {
SimpleProblemCollector result = validateFile("basedir-system-path.xml");
assertViolations(result, 0, 0, 4);
assertContains(
result.getWarnings().get(0),
"'dependencies.dependency.scope' for test:a:jar declares usage of deprecated 'system' scope");
assertContains(
result.getWarnings().get(1),
"'dependencies.dependency.systemPath' for test:a:jar should not point at files within the project directory");
assertContains(
result.getWarnings().get(2),
"'dependencies.dependency.scope' for test:b:jar declares usage of deprecated 'system' scope");
assertContains(
result.getWarnings().get(3),
"'dependencies.dependency.systemPath' for test:b:jar should not point at files within the project directory");
}
@Test
void testInvalidVersionInPluginManagement() throws Exception {
SimpleProblemCollector result = validateFile("raw-model/missing-plugin-version-pluginManagement.xml");
assertViolations(result, 1, 0, 0);
assertEquals(
"'build.pluginManagement.plugins.plugin.(groupId:artifactId)' version of a plugin must be defined. ",
result.getFatals().get(0));
}
@Test
void testInvalidGroupIdInPluginManagement() throws Exception {
SimpleProblemCollector result = validateFile("raw-model/missing-groupId-pluginManagement.xml");
assertViolations(result, 1, 0, 0);
assertEquals(
"'build.pluginManagement.plugins.plugin.(groupId:artifactId)' groupId of a plugin must be defined. ",
result.getFatals().get(0));
}
@Test
void testInvalidArtifactIdInPluginManagement() throws Exception {
SimpleProblemCollector result = validateFile("raw-model/missing-artifactId-pluginManagement.xml");
assertViolations(result, 1, 0, 0);
assertEquals(
"'build.pluginManagement.plugins.plugin.(groupId:artifactId)' artifactId of a plugin must be defined. ",
result.getFatals().get(0));
}
@Test
void testInvalidGroupAndArtifactIdInPluginManagement() throws Exception {
SimpleProblemCollector result = validateFile("raw-model/missing-ga-pluginManagement.xml");
assertViolations(result, 2, 0, 0);
assertEquals(
"'build.pluginManagement.plugins.plugin.(groupId:artifactId)' groupId of a plugin must be defined. ",
result.getFatals().get(0));
assertEquals(
"'build.pluginManagement.plugins.plugin.(groupId:artifactId)' artifactId of a plugin must be defined. ",
result.getFatals().get(1));
}
@Test
void testMissingReportPluginVersion() throws Exception {
SimpleProblemCollector result = validate("missing-report-version-pom.xml");
assertViolations(result, 0, 0, 0);
}
@Test
void testDeprecatedDependencyMetaversionsLatestAndRelease() throws Exception {
SimpleProblemCollector result = validateFile("deprecated-dependency-metaversions-latest-and-release.xml");
assertViolations(result, 0, 0, 2);
assertContains(
result.getWarnings().get(0),
"'dependencies.dependency.version' for test:a:jar is either LATEST or RELEASE (both of them are being deprecated)");
assertContains(
result.getWarnings().get(1),
"'dependencies.dependency.version' for test:b:jar is either LATEST or RELEASE (both of them are being deprecated)");
}
@Test
void testSelfReferencingDependencyInRawModel() throws Exception {
SimpleProblemCollector result = validateFile("raw-model/self-referencing.xml");
assertViolations(result, 1, 0, 0);
assertEquals(
"'dependencies.dependency[com.example.group:testinvalidpom:0.0.1-SNAPSHOT]' for com.example.group:testinvalidpom:0.0.1-SNAPSHOT is referencing itself.",
result.getFatals().get(0));
}
@Test
void testSelfReferencingDependencyWithClassifierInRawModel() throws Exception {
SimpleProblemCollector result = validateRaw("raw-model/self-referencing-classifier.xml");
assertViolations(result, 0, 0, 0);
}
@Test
void testCiFriendlySha1() throws Exception {
SimpleProblemCollector result = validateRaw("raw-model/ok-ci-friendly-sha1.xml");
assertViolations(result, 0, 0, 0);
}
@Test
void testCiFriendlyRevision() throws Exception {
SimpleProblemCollector result = validateRaw("raw-model/ok-ci-friendly-revision.xml");
assertViolations(result, 0, 0, 0);
}
@Test
void testCiFriendlyChangeList() throws Exception {
SimpleProblemCollector result = validateRaw("raw-model/ok-ci-friendly-changelist.xml");
assertViolations(result, 0, 0, 0);
}
@Test
void testCiFriendlyAllExpressions() throws Exception {
SimpleProblemCollector result = validateRaw("raw-model/ok-ci-friendly-all-expressions.xml");
assertViolations(result, 0, 0, 0);
}
@Test
void testCiFriendlyBad() throws Exception {
SimpleProblemCollector result = validateFile("raw-model/bad-ci-friendly.xml");
assertViolations(result, 0, 0, 1);
assertEquals(
"'version' contains an expression but should be a constant.",
result.getWarnings().get(0));
}
@Test
void testCiFriendlyBadSha1Plus() throws Exception {
SimpleProblemCollector result = validateFile("raw-model/bad-ci-friendly-sha1plus.xml");
assertViolations(result, 0, 0, 1);
assertEquals(
"'version' contains an expression but should be a constant.",
result.getWarnings().get(0));
}
@Test
void testCiFriendlyBadSha1Plus2() throws Exception {
SimpleProblemCollector result = validateFile("raw-model/bad-ci-friendly-sha1plus2.xml");
assertViolations(result, 0, 0, 1);
assertEquals(
"'version' contains an expression but should be a constant.",
result.getWarnings().get(0));
}
@Test
void testParentVersionLATEST() throws Exception {
SimpleProblemCollector result = validateRaw("raw-model/bad-parent-version-latest.xml");
assertViolations(result, 0, 0, 1);
assertEquals(
"'parent.version' is either LATEST or RELEASE (both of them are being deprecated)",
result.getWarnings().get(0));
}
@Test
void testParentVersionRELEASE() throws Exception {
SimpleProblemCollector result = validateRaw("raw-model/bad-parent-version-release.xml");
assertViolations(result, 0, 0, 1);
assertEquals(
"'parent.version' is either LATEST or RELEASE (both of them are being deprecated)",
result.getWarnings().get(0));
}
@Test
void repositoryWithExpression() throws Exception {
SimpleProblemCollector result = validateFile("raw-model/repository-with-expression.xml");
assertViolations(result, 0, 1, 0);
assertEquals(
"'repositories.repository.[repo].url' contains an expression but should be a constant.",
result.getErrors().get(0));
}
@Test
void repositoryWithBasedirExpression() throws Exception {
SimpleProblemCollector result = validateRaw("raw-model/repository-with-basedir-expression.xml");
assertViolations(result, 0, 0, 0);
}
@Test
void profileActivationWithAllowedExpression() throws Exception {
SimpleProblemCollector result = validateRaw(
"raw-model/profile-activation-file-with-allowed-expressions.xml",
ModelValidator.VALIDATION_LEVEL_STRICT);
// mbr -> mbr.userProperties(
// Map.of("foo", "foo", "bar", "foo")));
assertViolations(result, 0, 0, 0);
}
@Test
void profileActivationFileWithProjectExpression() throws Exception {
SimpleProblemCollector result = validateFile("raw-model/profile-activation-file-with-project-expressions.xml");
assertViolations(result, 0, 0, 2);
assertEquals(
"'profiles.profile[exists-project-version].activation.file.exists' "
+ "Failed to interpolate profile activation property ${project.version}/test.txt: "
+ "${project.version} expressions are not supported during profile activation.",
result.getWarnings().get(0));
assertEquals(
"'profiles.profile[missing-project-version].activation.file.missing' "
+ "Failed to interpolate profile activation property ${project.version}/test.txt: "
+ "${project.version} expressions are not supported during profile activation.",
result.getWarnings().get(1));
}
@Test
void profileActivationPropertyWithProjectExpression() throws Exception {
SimpleProblemCollector result =
validateFile("raw-model/profile-activation-property-with-project-expressions.xml");
assertViolations(result, 0, 0, 2);
assertEquals(
"'profiles.profile[property-name-project-version].activation.property.name' "
+ "Failed to interpolate profile activation property ${project.version}: "
+ "${project.version} expressions are not supported during profile activation.",
result.getWarnings().get(0));
assertEquals(
"'profiles.profile[property-value-project-version].activation.property.value' "
+ "Failed to interpolate profile activation property ${project.version}: "
+ "${project.version} expressions are not supported during profile activation.",
result.getWarnings().get(1));
}
}

View File

@ -0,0 +1,40 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>foo</artifactId>
<groupId>foo</groupId>
<version>99.44</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>gid</groupId>
<artifactId>aid</artifactId>
<version>1.0</version>
<exclusions>
<exclusion>
<groupId>test?</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,72 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>test</groupId>
<artifactId>a</artifactId>
<version>0.2</version>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>b</artifactId>
<version>0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>c</artifactId>
<version>0.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>d</artifactId>
<version>0.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>e</artifactId>
<version>0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>f</artifactId>
<version>0.2</version>
<scope>import</scope>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>g</artifactId>
<version>1</version>
<type>pom</type>
<scope>include</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -0,0 +1,69 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
<dependencies>
<dependency>
<groupId>test</groupId>
<artifactId>a</artifactId>
<version>0.2</version>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>b</artifactId>
<version>0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>c</artifactId>
<version>0.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>d</artifactId>
<version>0.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>e</artifactId>
<version>0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>f</artifactId>
<version>0.2</version>
<scope>import</scope>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>g</artifactId>
<version>0.2</version>
<scope>optional</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,43 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
<dependencies>
<dependency>
<groupId>test</groupId>
<artifactId>a</artifactId>
<version>0.2</version>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>b</artifactId>
<version>${missing.property}</version>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>c</artifactId>
<version>1/1</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,38 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>test</groupId>
<artifactId>a</artifactId>
<version>0.1</version>
<scope>import</scope>
<type>pom</type>
<classifier>cls</classifier>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -0,0 +1,37 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>test</groupId>
<artifactId>a</artifactId>
<version>0.1</version>
<scope>import</scope>
<!-- missing type=pom -->
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -0,0 +1,25 @@
<!--
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.
-->
<project>
<modelVersion>99.0.0</modelVersion>
<groupId>foo</groupId>
<artifactId>bar</artifactId>
<version>0.1</version>
</project>

View File

@ -0,0 +1,70 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
<build>
<plugins>
<plugin>
<artifactId>maven-it-plugin</artifactId>
<version>0.1</version>
<dependencies>
<dependency>
<groupId>test</groupId>
<artifactId>a</artifactId>
<version>0.2</version>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>b</artifactId>
<version>0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>c</artifactId>
<version>0.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>d</artifactId>
<version>0.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>e</artifactId>
<version>0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>f</artifactId>
<version>0.2</version>
<scope>import</scope>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,46 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
<build>
<plugins>
<plugin>
<artifactId>maven-it-plugin</artifactId>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>test</groupId>
<artifactId>a</artifactId>
<version>0.1</version>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>b</artifactId>
<version>${missing.property}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,55 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
<build>
<plugins>
<plugin>
<groupId>test</groupId>
<artifactId>good</artifactId>
<version>1.0</version>
</plugin>
<plugin>
<groupId>test</groupId>
<artifactId>mip</artifactId>
<version>${missing.property}</version>
</plugin>
<plugin>
<groupId>test</groupId>
<artifactId>rmv</artifactId>
<version>RELEASE</version>
</plugin>
<plugin>
<groupId>test</groupId>
<artifactId>lmv</artifactId>
<version>LATEST</version>
</plugin>
<plugin>
<groupId>test</groupId>
<artifactId>ifsc</artifactId>
<version>1/1</version>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,50 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>gid</groupId>
<artifactId>aid</artifactId>
<version>1.0</version>
<repositories>
<repository>
<id>this/is\bad</id>
<url>http://localhost</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>this/is\bad</id>
<url>http://localhost</url>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<repository>
<id>this/is\bad</id>
<url>http://localhost</url>
</repository>
<snapshotRepository>
<id>this/is\bad</id>
<url>http://localhost</url>
</snapshotRepository>
</distributionManagement>
</project>

View File

@ -0,0 +1,25 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>foo</groupId>
<artifactId>bar</artifactId>
<version>1.2.3.SNAPSHOT</version>
</project>

View File

@ -0,0 +1,25 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>foo</groupId>
<artifactId>bar</artifactId>
<version>this\is/bad</version>
</project>

View File

@ -0,0 +1,42 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
<dependencies>
<dependency>
<groupId>test</groupId>
<artifactId>a</artifactId>
<version>0.2</version>
<scope>system</scope>
<systemPath>${basedir}/lib/a.jar</systemPath>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>b</artifactId>
<version>0.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/b.jar</systemPath>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,38 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>gid</groupId>
<artifactId>aid</artifactId>
<version>0.1</version>
<dependencies>
<dependency>
<groupId>test</groupId>
<artifactId>a</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>b</artifactId>
<version>RELEASE</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,29 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>foo</groupId>
<artifactId>bar</artifactId>
<version>0.1</version>
<distributionManagement>
<status>generated</status>
</distributionManagement>
</project>

View File

@ -0,0 +1,31 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
<packaging>pom</packaging>
<modules>
<module>child</module>
<module>child</module>
</modules>
</project>

View File

@ -0,0 +1,103 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
<packaging>pom</packaging>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>build</groupId>
<artifactId>managed-plugin</artifactId>
<executions>
<execution>
<phase>test</phase>
</execution>
<execution>
<phase>test</phase>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>build</groupId>
<artifactId>plugin</artifactId>
<executions>
<execution>
<id>a</id>
<phase>test</phase>
</execution>
<execution>
<id>a</id>
<phase>test</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>test</id>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>profile</groupId>
<artifactId>managed-plugin</artifactId>
<executions>
<execution>
<id>b</id>
<phase>test</phase>
</execution>
<execution>
<id>b</id>
<phase>test</phase>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>profile</groupId>
<artifactId>plugin</artifactId>
<executions>
<execution>
<id>c</id>
<phase>test</phase>
</execution>
<execution>
<id>c</id>
<phase>test</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@ -0,0 +1,81 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
<packaging>pom</packaging>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>test</groupId>
<artifactId>managed-duplicate</artifactId>
</plugin>
<plugin>
<groupId>test</groupId>
<artifactId>managed-duplicate</artifactId>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>test</groupId>
<artifactId>duplicate</artifactId>
</plugin>
<plugin>
<groupId>test</groupId>
<artifactId>duplicate</artifactId>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>test</id>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>profile</groupId>
<artifactId>managed-duplicate</artifactId>
</plugin>
<plugin>
<groupId>profile</groupId>
<artifactId>managed-duplicate</artifactId>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>profile</groupId>
<artifactId>duplicate</artifactId>
</plugin>
<plugin>
<groupId>profile</groupId>
<artifactId>duplicate</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@ -0,0 +1,35 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
<packaging>pom</packaging>
<profiles>
<profile>
<id>non-unique-id</id>
</profile>
<profile>
<id>non-unique-id</id>
</profile>
</profiles>
</project>

View File

@ -0,0 +1,30 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
<packaging>pom</packaging>
<modules>
<module> </module>
</modules>
</project>

View File

@ -0,0 +1,34 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>foo</artifactId>
<groupId>bar</groupId>
<version>1.0</version>
<packaging>pack</packaging>
<build>
<plugins>
<plugin>
<artifactId>maven-it-plugin</artifactId>
<version></version>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,42 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
<dependencies>
<dependency>
<groupId>test</groupId>
<artifactId>a</artifactId>
<version>0.2</version>
<scope>system</scope>
<systemPath>should-use-variables-and-not-hard-code-this-path</systemPath>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>b</artifactId>
<version>0.1</version>
<scope>system</scope>
<systemPath>${java.home}/lib/good.jar</systemPath>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,30 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<!-- all fields missing -->
</parent>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
</project>

View File

@ -0,0 +1,30 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>foo</artifactId>
<groupId>foo</groupId>
<version>99.44</version>
<packaging>bleh</packaging>
<modules>
<module>test-module</module>
</modules>
</project>

View File

@ -0,0 +1,26 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>o/a/m</groupId>
<artifactId>m$-do$</artifactId>
<version>99.44</version>
<packaging>bleh</packaging>
</project>

View File

@ -0,0 +1,47 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
<packaging>pom</packaging>
<profiles>
<profile>
<id>+invalid-id</id>
</profile>
<profile>
<id>-invalid-id</id>
</profile>
<profile>
<id>!invalid-id</id>
</profile>
<profile>
<id>?invalid-id</id>
</profile>
<profile>
<id>valid-id</id>
</profile>
<profile>
<id>valid?-jdk9+!</id>
</profile>
</profiles>
</project>

View File

@ -0,0 +1,21 @@
<!--
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.
-->
<project>
</project>

View File

@ -0,0 +1,25 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>foo</groupId>
<version>99.44</version>
<packaging>bleh</packaging>
</project>

View File

@ -0,0 +1,32 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>foo</artifactId>
<groupId>foo</groupId>
<version>99.44</version>
<packaging>bleh</packaging>
<dependencies>
<dependency>
<groupId>groupId</groupId>
<version>1.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,39 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>foo</artifactId>
<groupId>foo</groupId>
<version>99.44</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>gid</groupId>
<artifactId>aid</artifactId>
<version>1.0</version>
<exclusions>
<exclusion>
<groupId></groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,32 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>foo</artifactId>
<groupId>foo</groupId>
<version>99.44</version>
<packaging>bleh</packaging>
<dependencies>
<dependency>
<artifactId>artifactId</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,34 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>foo</artifactId>
<groupId>foo</groupId>
<version>99.44</version>
<packaging>bleh</packaging>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>groupId</groupId>
<version>version</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -0,0 +1,34 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>foo</artifactId>
<groupId>foo</groupId>
<version>99.44</version>
<packaging>bleh</packaging>
<dependencyManagement>
<dependencies>
<dependency>
<artifactId>artifactId</artifactId>
<version>version</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -0,0 +1,34 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>foo</artifactId>
<groupId>foo</groupId>
<version>99.44</version>
<packaging>bleh</packaging>
<dependencyManagement>
<dependencies>
<dependency>
<artifactId>artifactId</artifactId>
<groupId>groupId</groupId>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -0,0 +1,32 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>foo</artifactId>
<groupId>foo</groupId>
<version>99.44</version>
<packaging>bleh</packaging>
<dependencies>
<dependency>
<artifactId>artifactId</artifactId>
<groupId>groupId</groupId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,25 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>bar</artifactId>
<version>99.44</version>
<packaging>bleh</packaging>
</project>

View File

@ -0,0 +1,25 @@
<!--
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.
-->
<project>
<groupId>foo</groupId>
<artifactId>foo</artifactId>
<version>99.44</version>
<packaging>bleh</packaging>
</project>

View File

@ -0,0 +1,33 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>foo</artifactId>
<groupId>foo</groupId>
<version>99.44</version>
<packaging>bleh</packaging>
<build>
<plugins>
<plugin>
<version>1.0</version>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,41 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>1.0</version>
<build>
<plugins>
<plugin>
<artifactId>maven-it-plugin</artifactId>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>test</groupId>
<!-- artifact id missing -->
<version>2.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,41 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>1.0</version>
<build>
<plugins>
<plugin>
<artifactId>maven-it-plugin</artifactId>
<version>1.0</version>
<dependencies>
<dependency>
<!-- groupId missing -->
<artifactId>a</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,41 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>1.0</version>
<build>
<plugins>
<plugin>
<artifactId>maven-it-plugin</artifactId>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>test</groupId>
<artifactId>a</artifactId>
<!-- version missing -->
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,33 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>foo</artifactId>
<groupId>foo</groupId>
<version>99.44</version>
<packaging>bleh</packaging>
<build>
<plugins>
<plugin>
<artifactId>maven-it-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,33 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>foo</artifactId>
<groupId>foo</groupId>
<version>99.44</version>
<packaging>bleh</packaging>
<reporting>
<plugins>
<plugin>
</plugin>
</plugins>
</reporting>
</project>

View File

@ -0,0 +1,57 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>foo</artifactId>
<groupId>foo</groupId>
<version>99.44</version>
<packaging>bleh</packaging>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-from-pluginManagement-plugin</artifactId>
<version>1.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-from-plugins-plugin</artifactId>
<version>1.0</version>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<artifactId>maven-noversion-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-from-plugins-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-from-pluginManagement-plugin</artifactId>
</plugin>
</plugins>
</reporting>
</project>

View File

@ -0,0 +1,36 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>foo</artifactId>
<groupId>foo</groupId>
<version>99.44</version>
<packaging>bleh</packaging>
<repositories>
<repository>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
</pluginRepository>
</pluginRepositories>
</project>

View File

@ -0,0 +1,38 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>foo</artifactId>
<groupId>foo</groupId>
<version>99.44</version>
<packaging>bleh</packaging>
<build>
<resources>
<resource>
</resource>
</resources>
<testResources>
<testResource>
</testResource>
</testResources>
</build>
</project>

View File

@ -0,0 +1,26 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>foo</groupId>
<artifactId>bar</artifactId>
<version>99.44</version>
<packaging></packaging>
</project>

View File

@ -0,0 +1,25 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>foo</groupId>
<artifactId>bar</artifactId>
<packaging>bleh</packaging>
</project>

View File

@ -0,0 +1,25 @@
<!--
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.
-->
<project>
<modelVersion>4.0</modelVersion>
<groupId>foo</groupId>
<artifactId>bar</artifactId>
<version>0.1</version>
</project>

View File

@ -0,0 +1,31 @@
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.group</groupId>
<artifactId>valid-version-sha1plus</artifactId>
<version>${sha1}${wrong}</version>
<description>
This will test if the validation for the ci friendly versions
is working correct.
</description>
</project>

View File

@ -0,0 +1,31 @@
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.group</groupId>
<artifactId>valid-version-sha1plus</artifactId>
<version>${sha1}${wrong}${revision}</version>
<description>
This will test if the validation for the ci friendly versions
is working correct.
</description>
</project>

View File

@ -0,0 +1,31 @@
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.group</groupId>
<artifactId>valid-version-wrong</artifactId>
<version>${wrong}</version>
<description>
This will test if the validation for the ci friendly versions
is working correct.
</description>
</project>

View File

@ -0,0 +1,37 @@
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.example.group</groupId>
<artifactId>com-parent</artifactId>
<version>LATEST</version>
</parent>
<groupId>com.example.group</groupId>
<artifactId>valid-version-wrong</artifactId>
<version>1.0</version>
<description>
This will test if the validation for the parent version
is working correct in case of usage of LATEST
</description>
</project>

View File

@ -0,0 +1,37 @@
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.example.group</groupId>
<artifactId>com-parent</artifactId>
<version>RELEASE</version>
</parent>
<groupId>com.example.group</groupId>
<artifactId>valid-version-wrong</artifactId>
<version>1.0</version>
<description>
This will test if the validation for the parent version
is working correct in case of usage of RELEASE
</description>
</project>

View File

@ -0,0 +1,39 @@
<!--
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.
-->
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.group</groupId>
<artifactId>testinvalidpom</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>the.groupId.Of.This.Plugin</groupId>
<artifactId/>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

View File

@ -0,0 +1,39 @@
<!--
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.
-->
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.group</groupId>
<artifactId>testinvalidpom</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId></groupId>
<artifactId/>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

View File

@ -0,0 +1,39 @@
<!--
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.
-->
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.group</groupId>
<artifactId>testinvalidpom</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId></groupId>
<artifactId>this-is-the-artifact</artifactId>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

View File

@ -0,0 +1,40 @@
<!--
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.
-->
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.group</groupId>
<artifactId>testinvalidpom</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>the.group.id</groupId>
<artifactId>the.artifact</artifactId>
<version/>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

View File

@ -0,0 +1,31 @@
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.group</groupId>
<artifactId>valid-version-sha1</artifactId>
<version>${revision}${changelist}${sha1}</version>
<description>
This will test if the validation for the ci friendly versions
is working correct.
</description>
</project>

View File

@ -0,0 +1,31 @@
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.group</groupId>
<artifactId>valid-version-changelist</artifactId>
<version>${changelist}</version>
<description>
This will test if the validation for the ci friendly versions
is working correct.
</description>
</project>

View File

@ -0,0 +1,31 @@
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.group</groupId>
<artifactId>valid-version-revision</artifactId>
<version>${revision}</version>
<description>
This will test if the validation for the ci friendly versions
is working correct.
</description>
</project>

View File

@ -0,0 +1,31 @@
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.group</groupId>
<artifactId>valid-version-sha1</artifactId>
<version>${sha1}</version>
<description>
This will test if the validation for the ci friendly versions
is working correct.
</description>
</project>

View File

@ -0,0 +1,82 @@
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
<packaging>pom</packaging>
<profiles>
<profile>
<id>exists-basedir</id>
<activation>
<file>
<exists>${basedir}/test.txt</exists>
</file>
</activation>
</profile>
<profile>
<id>missing-basedir</id>
<activation>
<file>
<missing>${basedir}/test.txt</missing>
</file>
</activation>
</profile>
<profile>
<id>exists-project-basedir</id>
<activation>
<file>
<exists>${project.basedir}/test.txt</exists>
</file>
</activation>
</profile>
<profile>
<id>missing-project-basedir</id>
<activation>
<file>
<missing>${project.basedir}/test.txt</missing>
</file>
</activation>
</profile>
<profile>
<id>dynamic-property-available</id>
<activation>
<property>
<name>${activationProperty}</name>
</property>
</activation>
</profile>
<profile>
<id>matches-another-property</id>
<activation>
<property>
<name>foo</name>
<value>${bar}</value>
</property>
</activation>
</profile>
</profiles>
</project>

View File

@ -0,0 +1,48 @@
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
<packaging>pom</packaging>
<profiles>
<profile>
<id>exists-project-version</id>
<activation>
<file>
<exists>${project.version}/test.txt</exists>
</file>
</activation>
</profile>
<profile>
<id>missing-project-version</id>
<activation>
<file>
<missing>${project.version}/test.txt</missing>
</file>
</activation>
</profile>
</profiles>
</project>

View File

@ -0,0 +1,49 @@
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>aid</artifactId>
<groupId>gid</groupId>
<version>0.1</version>
<packaging>pom</packaging>
<profiles>
<profile>
<id>property-name-project-version</id>
<activation>
<property>
<name>${project.version}</name>
</property>
</activation>
</profile>
<profile>
<id>property-value-project-version</id>
<activation>
<property>
<name>project.version</name>
<value>${project.version}</value>
</property>
</activation>
</profile>
</profiles>
</project>

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.validation</groupId>
<artifactId>parent</artifactId>
<version>1</version>
</parent>
<groupId>org.apache.maven.validation</groupId>
<artifactId>project</artifactId>
<version>1.0.0-SNAPSHOT</version>
<repositories>
<repository>
<id>repo</id>
<url>file://${basedir}/target/remote-repo</url>
</repository>
<repository>
<id>repo-project-basedir</id>
<url>file://${project.basedir}/sdk/maven/repo</url>
</repository>
<repository>
<id>repo-project-baseUri</id>
<url>${project.baseUri}/sdk/maven/repo</url>
</repository>
</repositories>
</project>

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.validation</groupId>
<artifactId>parent</artifactId>
<version>1</version>
</parent>
<groupId>org.apache.maven.validation</groupId>
<artifactId>project</artifactId>
<version>1.0.0-SNAPSHOT</version>
<properties>
<x>just/some/path</x>
</properties>
<repositories>
<repository>
<id>repo</id>
<url>file://${x}/sdk/maven/repo</url>
</repository>
</repositories>
</project>

View File

@ -0,0 +1,39 @@
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.group</groupId>
<artifactId>testvalidpom</artifactId>
<version>0.0.1-SNAPSHOT</version>
<description>
This will test if the module validator recognized that this dependency with classifier
is not the same as the module itself.
</description>
<dependencies>
<dependency>
<groupId>com.example.group</groupId>
<artifactId>testvalidpom</artifactId>
<version>0.0.1-SNAPSHOT</version>
<classifier>linux</classifier>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,38 @@
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.group</groupId>
<artifactId>testinvalidpom</artifactId>
<version>0.0.1-SNAPSHOT</version>
<description>
This will test if the module validator recognized that this
dependency is the same as the module itself.
</description>
<dependencies>
<dependency>
<groupId>com.example.group</groupId>
<artifactId>testinvalidpom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,50 @@
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>gid</groupId>
<artifactId>aid</artifactId>
<version>99.44</version>
<repositories>
<repository>
<id>local</id>
<url>http://localhost</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>local</id>
<url>http://localhost</url>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<repository>
<id>local</id>
<url>http://localhost</url>
</repository>
<snapshotRepository>
<id>local</id>
<url>http://localhost</url>
</snapshotRepository>
</distributionManagement>
</project>