[
https://issues.jboss.org/browse/SRAMP-506?page=com.atlassian.jira.plugin....
]
Marc Savy commented on SRAMP-506:
---------------------------------
Having spent ages having to meddle with this metadata on a previous project - I should
mention that it can be extremely tricky to get the results you would expect (unless maven
metadata is available).
For instance, in my experience the following aren't uncommon in externally provided
JARs:
- `META-INF` directory to be missing entirely (essentially not a valid JAR)
- Manifest data often doesn't correspond with what you would expect, because the user
decided can some arbitrary value in there (e.g. Bundle-Version => 2.1.0.201209190230-r
instead of 2.1.0, presumably someone decided it'd be nice to have date and time in
there). [1]
- There may be correct data available, but it might not be stored in the key you'd
expect (sometimes people put them in Bundle-Version other times in Specification-Version)
- If there is a 'meta jar' (i.e. Jar wrapping a whole load of other Jars), it may
not even have a `properties.pom`/maven metadata which is useful.
Ultimately for the worst cases I ended up having to use a heuristic based approach, with
regexp for the ultimate fallback if all other methods failed (would we just reject
completely malformed ones?).
While I was developing the aforementioned tooling, I wrote a little program which will
scan through a directory tree, cracks open all of the jars and builds a set of keys (and
values) from all the manifest files. This gives you a very good idea of which fields you
may want to look at to derive the data you need, in addition to the sort of rubbish data
it may contain you'll have to try to avoid!
Sample output (huge set):
https://gist.github.com/msavy/cefc9c9b01416176128f
Note format is: key => { v0, v1, ..., Vn }
I'll post a source link as a priv comment as I haven't put any copyright headers
and whatnot on it.
Maven repository facade. Add extended type
------------------------------------------
Key: SRAMP-506
URL:
https://issues.jboss.org/browse/SRAMP-506
Project: S-RAMP
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Reporter: David virgil naranjo
Assignee: David virgil naranjo
It is necessary to add the possibility of setting a different s-ramp type.
By default right now the s-ramp type is Java Archive. For uploading switchyard
applications it is necessary to add a mechanism to set the extended type.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)