maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Herve Boutemy (JIRA)" <j...@codehaus.org>
Subject [jira] Updated: (MNG-1803) Provide line number information when there are errors processing a pom.xml
Date Sun, 06 Jun 2010 09:49:13 GMT

     [ http://jira.codehaus.org/browse/MNG-1803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Herve Boutemy updated MNG-1803:
-------------------------------

    Description: 
When there is an error in a pom.xml, Maven 2 does a reasonable job identifying the error,
but it doesn't provide the location of the error.  For example, I forget to include a <version>
inside one of my dependencies:
{noformat}
bash-3.00$ mvn
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: hivemind:hivemind
POM Location: c:\workspace\jakarta-hivemind\library\pom.xml
Validation Messages:

    [0]  'dependencies.dependency.version' is missing.


Reason: Failed to validate POM


[INFO] ----------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Failed to validate POM
        at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:359)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:276)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.InvalidProjectModelException: Failed to validate POM
        at org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:774)
        at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:624)
        at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFile(DefaultMavenProjectBuilder.java:298)
        at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:276)
        at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:509)
        at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:441)
        at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:345)
        ... 11 more
[INFO] ----------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Sat Dec 10 10:09:16 PST 2005
[INFO] Final Memory: 1M/2M
[INFO] ----------------------------------------------------------------------------
{noformat}
Maven should have identified the LINE NUMBER, not just the file.  I shouldn't have to pick
my way though the document when Maven already has.  Better yet, it should display the invalid
portion of the file and highlight the exact point of the error.

I realize that it is controversial to add this issue as a bug and not an enhancement, but
I feel strongly about the absolute importance of developer feedback in any complex tool.

  was:
When there is an error in a pom.xml, Maven 2 does a reasonable job identifying the error,
but it doesn't provide the location of the error.  For example, I forget to include a <version>
inside one of my dependencies:

bash-3.00$ mvn
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: hivemind:hivemind
POM Location: c:\workspace\jakarta-hivemind\library\pom.xml
Validation Messages:

    [0]  'dependencies.dependency.version' is missing.


Reason: Failed to validate POM


[INFO] ----------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Failed to validate POM
        at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:359)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:276)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.InvalidProjectModelException: Failed to validate POM
        at org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:774)
        at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:624)
        at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFile(DefaultMavenProjectBuilder.java:298)
        at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:276)
        at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:509)
        at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:441)
        at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:345)
        ... 11 more
[INFO] ----------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Sat Dec 10 10:09:16 PST 2005
[INFO] Final Memory: 1M/2M
[INFO] ----------------------------------------------------------------------------

Maven should have identified the LINE NUMBER, not just the file.  I shouldn't have to pick
my way though the document when Maven already has.  Better yet, it should display the invalid
portion of the file and highlight the exact point of the error.

I realize that it is controversial to add this issue as a bug and not an enhancement, but
I feel strongly about the absolute importance of developer feedback in any complex tool.


> Provide line number information when there are errors processing a pom.xml
> --------------------------------------------------------------------------
>
>                 Key: MNG-1803
>                 URL: http://jira.codehaus.org/browse/MNG-1803
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Logging, POM
>    Affects Versions: 2.0
>         Environment: Maven 2.0, Windows xp, jdk 1.5, cygwin
>            Reporter: Howard M. Lewis Ship
>            Assignee: Benjamin Bentmann
>             Fix For: 3.0-beta-2
>
>
> When there is an error in a pom.xml, Maven 2 does a reasonable job identifying the error,
but it doesn't provide the location of the error.  For example, I forget to include a <version>
inside one of my dependencies:
> {noformat}
> bash-3.00$ mvn
> [INFO] Scanning for projects...
> [INFO] ----------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ----------------------------------------------------------------------------
> [INFO] Error building POM (may not be this project's POM).
> Project ID: hivemind:hivemind
> POM Location: c:\workspace\jakarta-hivemind\library\pom.xml
> Validation Messages:
>     [0]  'dependencies.dependency.version' is missing.
> Reason: Failed to validate POM
> [INFO] ----------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.reactor.MavenExecutionException: Failed to validate POM
>         at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:359)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:276)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.project.InvalidProjectModelException: Failed to validate
POM
>         at org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:774)
>         at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:624)
>         at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFile(DefaultMavenProjectBuilder.java:298)
>         at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:276)
>         at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:509)
>         at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:441)
>         at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:345)
>         ... 11 more
> [INFO] ----------------------------------------------------------------------------
> [INFO] Total time: < 1 second
> [INFO] Finished at: Sat Dec 10 10:09:16 PST 2005
> [INFO] Final Memory: 1M/2M
> [INFO] ----------------------------------------------------------------------------
> {noformat}
> Maven should have identified the LINE NUMBER, not just the file.  I shouldn't have to
pick my way though the document when Maven already has.  Better yet, it should display the
invalid portion of the file and highlight the exact point of the error.
> I realize that it is controversial to add this issue as a bug and not an enhancement,
but I feel strongly about the absolute importance of developer feedback in any complex tool.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message