You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2025/07/21 11:29:51 UTC
(maven) branch prefix created (now 5ec642dced)
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a change to branch prefix
in repository https://gitbox.apache.org/repos/asf/maven.git
at 5ec642dced Add test for prefixed Maven elements
This branch includes the following new commits:
new 5ec642dced Add test for prefixed Maven elements
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(maven) 01/01: Add test for prefixed Maven elements
Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch prefix
in repository https://gitbox.apache.org/repos/asf/maven.git
commit 5ec642dced86a11c9ecadfa6216427c9c4b35057
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Mon Jul 21 07:29:43 2025 -0400
Add test for prefixed Maven elements
---
.../src/test/java/org/apache/maven/DefaultMavenTest.java | 10 ++++++++++
impl/maven-core/src/test/projects/default-maven/prefix/pom.xml | 10 ++++++++++
2 files changed, 20 insertions(+)
diff --git a/impl/maven-core/src/test/java/org/apache/maven/DefaultMavenTest.java b/impl/maven-core/src/test/java/org/apache/maven/DefaultMavenTest.java
index 7c1f8e1020..2d9ec84001 100644
--- a/impl/maven-core/src/test/java/org/apache/maven/DefaultMavenTest.java
+++ b/impl/maven-core/src/test/java/org/apache/maven/DefaultMavenTest.java
@@ -87,6 +87,16 @@ void testThatErrorDuringProjectDependencyGraphCreationAreStored() throws Excepti
assertEquals(ProjectCycleException.class, result.getExceptions().get(0).getClass());
}
+ @Test
+ void testThatNamespacePrefixAreAllowed() throws Exception {
+ MavenExecutionRequest request =
+ createMavenExecutionRequest(getProject("prefix")).setGoals(asList("validate"));
+
+ MavenExecutionResult result = maven.execute(request);
+
+ assertTrue(result.getExceptions().isEmpty());
+ }
+
@Test
void testMavenProjectNoDuplicateArtifacts() throws Exception {
MavenProjectHelper mavenProjectHelper = getContainer().lookup(MavenProjectHelper.class);
diff --git a/impl/maven-core/src/test/projects/default-maven/prefix/pom.xml b/impl/maven-core/src/test/projects/default-maven/prefix/pom.xml
new file mode 100644
index 0000000000..de7d1b0a40
--- /dev/null
+++ b/impl/maven-core/src/test/projects/default-maven/prefix/pom.xml
@@ -0,0 +1,10 @@
+<mvn:project xmlns:mvn="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">
+ <mvn:modelVersion>4.0.0</mvn:modelVersion>
+
+ <mvn:groupId>prefix</mvn:groupId>
+ <mvn:artifactId>prefix</mvn:artifactId>
+ <mvn:version>1.0-SNAPSHOT</mvn:version>
+ <mvn:packaging>pom</mvn:packaging>
+
+</mvn:project>