Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.4.1
-
Fix Version/s: 1.5
-
Labels:None
-
Environment:Windows 2000, JDK 1.4.2_07
Description
Using the genapp plugin (2.2) of Maven-1.1-beta-1, I created a simple jar project.
Running pom:validate on the POM gave errors due to the fact that project.xml generated by the genapp plugin isn't a model-3.0.0 POM, because e.g. the <package> element generated by the genapp wizard isn't defined in the model-3.0.0 xsd. So I modified project.xml in order to be conform with the model-3.0.0 xsd. However running pom:validate still gives the following error:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$maven -e pom:validate
__ __
| \/ | __ Apache_ ___ | |||||
| \/ | / ` \ V / -) ' \ ~ intelligent projects ~ | |||||
| _ | _,_ | _/___ | _ | _ | v. 1.1-beta-1 |
|---|
build:start:
pom:verify-version:
pom:validate:
[echo] ====== CUSTOM ADDED IN POM PLUGIN ====
[echo] XSD file : c:\devtools\maven-1.1-beta-1/maven-project-3.xsd
[echo] POM file : C:\tmp\myapp\project.xml
[echo] =======================================
[java] C:\tmp\myapp\project.xml:19:10: error: cvc-elt.1: Cannot find the declaration of element 'project'.
[java] [ERROR] Java Result: 1
BUILD SUCCESSFUL
Total time : 4 seconds
Finished at : zondag 31 juli 2005 12:58:49 CEST
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The POM file project.xml is included as attachment.
Additional question : is the pom plugin still necessary from maven-1.1-beta-1 onwards, because I thought the Maven core would verify more strictly the POM itself (cf http://maven.apache.org/reference/backwards-compatibility.html)?
Regards,
Davy Toch
Issue Links
- is depended upon by
-
MAVEN-1653
Executing the "pom:validate" goal on a reconstituted project.xml file using the content from the ten minute test page produces error messages
-
- is related to
-
MPXDOC-87
xdoc:validate broken
-
The case can be closed.
I noticed that you now need a namespace "http://maven.apache.org/POM/3.0.0" in the root of the POM xml document. After adding this I still had a little problem because the genapp wizard creates an element <package>, while in POM 3.0.0 <packageName> is declared. From other posts on the Maven user/dev mailing lists, it seems the latter is incorrect and will be corrected in the final 1.1 version of Maven.
So sorry for wasting your time.