use of org.apache.maven.model.building.SimpleProblemCollector in project maven by apache.
the class DefaultModelValidatorTest method testReservedRepositoryId.
@Test
public 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'");
}
use of org.apache.maven.model.building.SimpleProblemCollector in project maven by apache.
the class DefaultModelValidatorTest method testMissingDependencyManagementArtifactId.
@Test
public 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"));
}
use of org.apache.maven.model.building.SimpleProblemCollector in project maven by apache.
the class DefaultModelValidatorTest method testCiFriendlySha1.
@Test
public void testCiFriendlySha1() throws Exception {
SimpleProblemCollector result = validateRaw("raw-model/ok-ci-friendly-sha1.xml");
assertViolations(result, 0, 0, 0);
}
use of org.apache.maven.model.building.SimpleProblemCollector in project maven by apache.
the class DefaultModelValidatorTest method testMissingVersion.
@Test
public void testMissingVersion() throws Exception {
SimpleProblemCollector result = validate("missing-version-pom.xml");
assertViolations(result, 0, 1, 0);
assertEquals("'version' is missing.", result.getErrors().get(0));
}
use of org.apache.maven.model.building.SimpleProblemCollector in project maven by apache.
the class DefaultModelValidatorTest method testMissingPluginDependencyGroupId.
@Test
public void testMissingPluginDependencyGroupId() throws Exception {
SimpleProblemCollector result = validate("missing-plugin-dependency-groupId.xml");
assertViolations(result, 0, 1, 0);
assertTrue(result.getErrors().get(0).contains(":a:"));
}
Aggregations