Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Incomplete
-
None
-
None
-
None
-
None
-
Ubuntu 6.10
Maven 2.0.4
Description
I am new to Maven and have been trying to learn how to create a simple project.
Let me walk through my scenario of creating a pom.xml file:
1. I bind the
namespace (defined at "http://maven.apache.org/maven-v4_0_0.xsd") to Java classes using an XML Binding solution.
2. I use the bound classes to create a simple <project/> as one would expect to see in a pom.xml file.
3. I marshal the bound Java objects into xml and write it into pom.xml. Here is the xml I use:
<ns1:project
xmlns:ns1="http://maven.apache.org/POM/4.0.0">
<ns1:modelVersion>4.0.0</ns1:modelVersion>
<ns1:groupId>com.myapp</ns1:groupId>
<ns1:artifactId>sample-project</ns1:artifactId>
<ns1:name>Sample Maven Project</ns1:name>
<ns1:version>1.0</ns1:version>
<ns1:developers>
<ns1:developer>
<ns1:id>ssafris</ns1:id>
<ns1:name>Seva Safris</ns1:name>
</ns1:developer>
</ns1:developers>
<ns1:build>
<ns1:sourceDirectory>${basedir}/src/java</ns1:sourceDirectory>
</ns1:build>
</ns1:project>
4. I run mvn, and am promptly given a "Not a v4.0.0 POM." exception.
Tracing through Maven's source, I went to the exact location of the exception in DefaultMavenProjectBuilder.java. On line 1297 it has:
Attachments
Issue Links
- duplicates
-
MNG-2715 Maven does not comply to XML rules regarding prefixes.
- Closed