You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Barry Kaplan (JIRA)" <ji...@codehaus.org> on 2005/11/03 00:42:06 UTC
[jira] Created: (MNG-1404) Provide informative messages when POM is invalid
Provide informative messages when POM is invalid
------------------------------------------------
Key: MNG-1404
URL: http://jira.codehaus.org/browse/MNG-1404
Project: Maven 2
Type: Improvement
Versions: 2.0
Reporter: Barry Kaplan
When a pom is invalid the error message should identify the problem. For example, in the POM below the closing "dependencies" element is misspelled, yet the error messages is only:
[WARNING] POM for: 'springframework:spring:pom:1.2.6' does not appear to
> be valid. Its will be ignored for artifact resolution.
> Reason: Parse error reading POM
> [DEBUG] springframework:spring:jar:1.2.6 (selected for compile)
----
<project>
> <modelVersion>4.0.0</modelVersion>
> <groupId>springframework</groupId>
> <artifactId>spring</artifactId>
> <!-- Really 1.2.6-SNAPSHOT -->
> <version>1.2.6</version>
>
> <dependencies>
> <dependency>
> <groupId>commons-logging</groupId>
> <artifactId>commons-logging</artifactId>
> <version>1.0.4</version>
> <scope>compile</scope>
> </dependency>
> </depenencies>
>
> </project>
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Updated: (MNG-1404) Provide informative messages when POM is invalid
Posted by "David Jackman (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-1404?page=all ]
David Jackman updated MNG-1404:
-------------------------------
Attachment: MNG-1404.patch
The current version of maven-project does output the validation errors in debug mode (using the -X parameter). However, XML parsing problems (such as the one I reported on the jMock POM (which has since been fixed)) aren't included in the validation errors. I'm attaching a patch that addresses this problem. This patch also fixes the spelling error in the current error message ("it" instead of "its").
> Provide informative messages when POM is invalid
> ------------------------------------------------
>
> Key: MNG-1404
> URL: http://jira.codehaus.org/browse/MNG-1404
> Project: Maven 2
> Type: Improvement
> Versions: 2.0
> Reporter: Barry Kaplan
> Attachments: MNG-1404.patch
>
>
> When a pom is invalid the error message should identify the problem. For example, in the POM below the closing "dependencies" element is misspelled, yet the error messages is only:
> [WARNING] POM for: 'springframework:spring:pom:1.2.6' does not appear to
> > be valid. Its will be ignored for artifact resolution.
> > Reason: Parse error reading POM
> > [DEBUG] springframework:spring:jar:1.2.6 (selected for compile)
> ----
> <project>
> > <modelVersion>4.0.0</modelVersion>
> > <groupId>springframework</groupId>
> > <artifactId>spring</artifactId>
> > <!-- Really 1.2.6-SNAPSHOT -->
> > <version>1.2.6</version>
> >
> > <dependencies>
> > <dependency>
> > <groupId>commons-logging</groupId>
> > <artifactId>commons-logging</artifactId>
> > <version>1.0.4</version>
> > <scope>compile</scope>
> > </dependency>
> > </depenencies>
> >
> > </project>
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Closed: (MNG-1404) Provide informative messages when POM is invalid
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-1404?page=all ]
John Casey closed MNG-1404:
---------------------------
Assign To: John Casey
Resolution: Fixed
Fix Version: 2.0.1
Did not apply patch; typo fix was already committed for MavenMetadataSource, and xpp3 error should not be wrapped in a ModelValidationResult (it's not part of the model validation), so I appended it to the message of the exception that is thrown.
> Provide informative messages when POM is invalid
> ------------------------------------------------
>
> Key: MNG-1404
> URL: http://jira.codehaus.org/browse/MNG-1404
> Project: Maven 2
> Type: Improvement
> Versions: 2.0
> Reporter: Barry Kaplan
> Assignee: John Casey
> Fix For: 2.0.1
> Attachments: MNG-1404.patch
>
>
> When a pom is invalid the error message should identify the problem. For example, in the POM below the closing "dependencies" element is misspelled, yet the error messages is only:
> [WARNING] POM for: 'springframework:spring:pom:1.2.6' does not appear to
> > be valid. Its will be ignored for artifact resolution.
> > Reason: Parse error reading POM
> > [DEBUG] springframework:spring:jar:1.2.6 (selected for compile)
> ----
> <project>
> > <modelVersion>4.0.0</modelVersion>
> > <groupId>springframework</groupId>
> > <artifactId>spring</artifactId>
> > <!-- Really 1.2.6-SNAPSHOT -->
> > <version>1.2.6</version>
> >
> > <dependencies>
> > <dependency>
> > <groupId>commons-logging</groupId>
> > <artifactId>commons-logging</artifactId>
> > <version>1.0.4</version>
> > <scope>compile</scope>
> > </dependency>
> > </depenencies>
> >
> > </project>
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org