Bug 532696 - Add error message for wrong pom
Summary: Add error message for wrong pom
Status: RESOLVED WORKSFORME
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: wst.xml CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard: RHT
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2018-03-21 05:17 EDT by Lars Vogel CLA
Modified: 2020-05-19 05:28 EDT (History)
3 users (show)

See Also:


Attachments
Screenshot (36.92 KB, image/png)
2018-03-21 05:17 EDT, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2018-03-21 05:17:19 EDT
Created attachment 273233 [details]
Screenshot

Accidently I create a wrong pom without the <project> tag.

Example pom.xml:
------
<modelVersion>4.0.0</modelVersion>
	<groupId>com.vogella.maven</groupId>
	<artifactId>com.vogella.maven.executablejar</artifactId>
	<version>0.1.0-SNAPSHOT</version>
	<packaging>jar</packaging>
------

m2e showed me an error marker in the editor but no problem marker in the Problems view. Also the marker had no error message. I would expect at least a hover text with "Invalid format of the pom" for something similar. 

See screenshot.
Comment 1 Fred Bricon CLA 2018-03-21 08:39:15 EDT
Interesting. When you save the pom, you get an error marker:

Project build error: Non-parseable POM /Users/fbricon/Dev/workspaces/sdk-photon-M6/aaaaaaaaaa/pom.xml: start tag not allowed in epilog but got g (position: END_TAG seen ...</modelVersion>\n\n  <g... @3:5)
Comment 2 Fred Bricon CLA 2018-03-24 17:23:36 EDT
So, the message-less marker (which doesn't appear to be an actual org.eclipse.core.internal.resources.Marker) is added by the XMLValidator, detecting the xml is malformed. So moving to the -hopefully- proper project.
Comment 3 Nitin Dahyabhai CLA 2018-03-25 00:30:20 EDT
What was the value in the Type column of the Problems View?
Comment 4 Nitin Dahyabhai CLA 2018-03-25 00:32:20 EDT
Can you fill in the version numbers on this, and try it with and without the Maven tools? Without the Maven tools, I see "The markup in the document following the root element must be well-formed." in Oxygen.3.
Comment 5 Lars Vogel CLA 2020-05-19 05:28:03 EDT
Have not seen a lot of request for that.