views:

573

answers:

2

I'm generating an Eclipse update site and I'm trying to give it a label so that when it appears in a user's sites list, it would appear as a name (e.g., "Ganymede project") rather than as a URL.

I haven't been able to find any parameter for it in the PDE or site.xml

The only thing that I've seen is to let it generate and then manually edit artifact.xml, but that gets messed up everytime you build and is ugly as hell.

A: 

Perhaps I am misunderstanding your question, but doesn't the user choose the name of the site when they add it using find / install features? The dialog specifies a Name field and a URL field. The name is what is displayed in the "Sites to Search" list.

Ian McLaird
In previous versions this was the case. to add in ganymede you just add a url, and then sometimes the name it self is auto configured byt the address you type in. I think the auto assignment is Ganymede specific and not all update sites have added a name.
_ande_turner_
There's a property in artifact.xml that lets you change it. It is by default generated with the file://xxxxxxx where your update site was generated (which looks fairly ugly). I'm trying to find out if there's a way to do something in site.xml so that artifact.xml is generated correctly.
Uri
+2  A: 

Not 100% sure on this since I'm not familiar with Eclipse update site building, but this page:

http://wiki.eclipse.org/Equinox_p2_Metadata_Generator

Seems to indicate you can generate the metadata for the update site using org.eclipse.equinox.p2.metadata.generator.EclipseGenerator which includes the site name as a parameter:

Arguments describing the output

[...]

-metadataRepositoryName

a user friendly name for the metadata repository

Perhaps that's what you need, to generate the metadata for the site? See http://wiki.eclipse.org/WTP/What_we_have_learned_(to_love)_about_P2 as well:

...Since you have both a content.jar and a site.xml at that location, you actually have two repositories. You have a classic update site, and a p2 repository (these files don't know/care about each other). Classic update sites don't contain a site name (site.xml has no name element), so these sites are "nameless". p2 repositories contain a name element so they have a human-readable name.

Jay