Re: [Eclipseme-users] Remove the MIDlet-URL
Brought to you by:
setera
From: Craig S. <set...@ch...> - 2004-07-15 23:55:42
|
Tom, Thanks for the update and the offer for the changes. I've thought about this some since you submitted the request to sourceforge a while back. I think it really requires the ability to specify (via preferences or similar) what entries should be filtered (or included I suppose) into the manifest rather than hardcoded assumptions. It is on the list and I will look at it as I find time. For now, it sounds like you are covered? Thanks, Craig Tom Hubina wrote: > At 12:10 AM 7/15/2004, set...@ch... wrote: > >> Tom, >> >> I will have to do a bit of looking around the source, but my first >> reaction is that your first remove should just work. Remove uses >> Object.equals to determine equality and String equals should work >> correctly. It has been a while, but I think I have a wrapper around a >> properties object that may not be handling remove correctly? I can look >> more tonight. > > > That's what I thought too, but if I use > mainAttributes.containsKey(IJADConstants.JAD_MIDLET_JAR_URL) it fails to > find it there as well. > > I just added the following code to createDeployedJarFile(): > > Set c = mainAttributes.entrySet(); > > Iterator i = c.iterator(); > while (i.hasNext()) > { > Map.Entry o = (Map.Entry)i.next(); > if(o.getKey().toString().compareTo(IJADConstants.JAD_MIDLET_JAR_URL) > == 0) > { > i.remove(); > break; > } > } > > and that works. However the following does not: > > mainAttributes.remove(IJADConstants.JAD_MIDLET_JAR_URL); > > go figure. > > I don't know if you're interested in adding this to the main EclipseME > code, but the reason I do this is because I frequently need to be able > to change the jad/jar file names after creation and if the name is > contained in the manifest it makes things a lot more complicated. > > I think the "right" thing to do is make a more general manifest filter > that only inserts required fields, and ignores the rest of the stuff > from the JAD. I know in my case I'm going to have to deal with this > again as there are a few other fields that I'll be changing in the JAD > after the package is created - or more to the point, fields that the > publisher will be changing after I deliver it to them - URLs for web > pages, downloadable assets, etc. > > If this is something you're interested in I'm sure I can find the list > of which fields are mandatory in the manifest, and under what conditions > (there are some fields that must be in the manifest .. but only if > they're present in the JAD). > > Tom > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click > _______________________________________________ > Eclipseme-users mailing list > Ecl...@li... > https://lists.sourceforge.net/lists/listinfo/eclipseme-users |