Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360148 - Bad site.xml == cryptic failure building site - could the error message reflect the fixable problem?
Summary: Bad site.xml == cryptic failure building site - could the error message refle...
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-06 14:39 EDT by Nick Boldt CLA
Modified: 2021-04-28 16:54 EDT (History)
1 user (show)

See Also:


Attachments
snippet of log showing failure as reported w/ Tycho 0.13.0 (5.01 KB, text/plain)
2011-10-06 14:40 EDT, Nick Boldt CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Boldt CLA 2011-10-06 14:39:36 EDT
Someone who will remain nameless added a few feature to our site.xml for generating an aggregate update site, leaving off the </feature> tag.

Tycho 0.12 (and 0.13), in its wisdom, failed to build. This much is fine.

Problem?

The error reported was:

'org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: org.eclipse.equinox.internal.p2.updatesite.SiteFeature cannot be cast to org.eclipse.equinox.internal.p2.updatesite.SiteModel'

when in fact the problem was:

'org.xml.sax.SAXParseException: The element type "feature" must be terminated by the matching end-tag "</feature>'

Steps to reproduce (using an example - feel free to use your own instead):

0. svn checkout & mvn3 build this project's parent pom:

svn co http://anonsvn.jboss.org/repos/jbosstools/trunk/build/; cd build/parent; mvn3 clean install

1. build a site project, such as 

svn co http://anonsvn.jboss.org/repos/jbosstools/trunk/build/aggregate/webtools-site/; cd webtools-site; mvn3 clean install

> BUILD SUCCESSFUL

3. Now, remove some </feature> tag from the site.xml, and respin:

vi site.xml; mvn3 clean install 

> BUILD FAILED

----

If you're wondering how I figured this out, I renamed site.xml to category.xml, and in the pom.xml, changed 

  <packaging>eclipse-update-site</packaging>

to

  <packaging>eclipse-repository</packaging>

As a result, a more useful error was generated and I could fix the XML.
Comment 1 Nick Boldt CLA 2011-10-06 14:40:24 EDT
Created attachment 204704 [details]
snippet of log showing failure as reported w/ Tycho 0.13.0
Comment 2 Tobias Oberlies CLA 2011-10-10 09:41:46 EDT
What is the behaviour if you use eclipse-repository instead of eclipse-update-site? (Make sure to rename your site.xml to category.xml when switching to eclipse-repository).
Comment 3 Tobias Oberlies CLA 2011-10-13 12:18:21 EDT
(In reply to comment #2)
> What is the behaviour if you use eclipse-repository instead of
> eclipse-update-site? (Make sure to rename your site.xml to category.xml when
> switching to eclipse-repository).

The error message looks good in case of eclipse-repository.
To be honest: eclipse-update-site is pretty close to being deprecated (see bug 342876), so I don't believe that anyone will still work on this problem.
Comment 4 Mickael Istria CLA 2020-06-29 08:45:55 EDT
eclipse-update-site and site.xml have been deprecated for a long time, no effort will be spent here.