jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 1.x POM Plugin
  • MPPOM-5

pom:validate doesn't work in maven-1.1-beta-1

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major 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

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. XML File
    project.xml
    31/Jul/05 6:12 AM
    4 kB
    Davy Toch

Issue Links

is depended upon by

Bug - A problem which impairs or prevents the functions of the product. 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

  • Minor - Minor loss of function, or other problem where easy workaround is present.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
is related to

Bug - A problem which impairs or prevents the functions of the product. MPXDOC-87 xdoc:validate broken

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Davy Toch added a comment - 14/Sep/05 5:10 PM

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.

Show
Davy Toch added a comment - 14/Sep/05 5:10 PM 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.
Hide
Permalink
Arnaud Heritier added a comment - 14/Sep/05 5:19 PM

I also noticed the namespace problem. I'm checking to see if it's not possible to have a workaround.
For the packageName attribute, I fixed the xsd today on the web site.
You can download it.

Show
Arnaud Heritier added a comment - 14/Sep/05 5:19 PM I also noticed the namespace problem. I'm checking to see if it's not possible to have a workaround. For the packageName attribute, I fixed the xsd today on the web site. You can download it.
Hide
Permalink
Arnaud Heritier added a comment - 14/Sep/05 5:20 PM

packageName isn't an attribute but an element

Show
Arnaud Heritier added a comment - 14/Sep/05 5:20 PM packageName isn't an attribute but an element
Hide
Permalink
Davy Toch added a comment - 14/Sep/05 5:26 PM

I suppose the best solution is to modify the maven genapp plugin so it can create Maven projects with v3.0.0 POM's (instead of adding a workaround in the maven pom plugin).

Show
Davy Toch added a comment - 14/Sep/05 5:26 PM I suppose the best solution is to modify the maven genapp plugin so it can create Maven projects with v3.0.0 POM's (instead of adding a workaround in the maven pom plugin).
Hide
Permalink
Arnaud Heritier added a comment - 15/Sep/05 12:53 AM

Yes I'll do it

Show
Arnaud Heritier added a comment - 15/Sep/05 12:53 AM Yes I'll do it
Hide
Permalink
Arnaud Heritier added a comment - 15/Sep/05 4:57 PM

This is due to this "issue"

Show
Arnaud Heritier added a comment - 15/Sep/05 4:57 PM This is due to this "issue"
Hide
Permalink
Arnaud Heritier added a comment - 16/Sep/05 5:28 AM

We must do something reusable

Show
Arnaud Heritier added a comment - 16/Sep/05 5:28 AM We must do something reusable
Hide
Permalink
Arnaud Heritier added a comment - 16/Sep/05 5:30 AM

Lukas is already working on it (he try to see if it's possible and better to use msv to do the validation)

Show
Arnaud Heritier added a comment - 16/Sep/05 5:30 AM Lukas is already working on it (he try to see if it's possible and better to use msv to do the validation)
Hide
Permalink
Lukas Theussl added a comment - 13/Dec/05 2:32 PM

Reopen to change fix version

Show
Lukas Theussl added a comment - 13/Dec/05 2:32 PM Reopen to change fix version

People

  • Assignee:
    Lukas Theussl
    Reporter:
    Davy Toch
Vote (0)
Watch (0)

Dates

  • Created:
    31/Jul/05 6:12 AM
    Updated:
    13/Dec/05 2:33 PM
    Resolved:
    13/Dec/05 2:33 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.