ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Magoffin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACE-600) Cannot add artifacts if MANIFEST.MF is not at start of JAR
Date Wed, 12 Jul 2017 22:04:00 GMT

    [ https://issues.apache.org/jira/browse/ACE-600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16084809#comment-16084809
] 

Matt Magoffin commented on ACE-600:
-----------------------------------

I tried to find where in the [spec|http://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html]
it was mandated to be the first entry, but couldn't find it mentioned. This was noted in bug
[4338238|http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4338238] as well.

In any case, I don't recall where the JARs I had came from (they might have been existing
JARs created elsewhere). I just figured it would be nice if Ace could work with them.

> Cannot add artifacts if MANIFEST.MF is not at start of JAR
> ----------------------------------------------------------
>
>                 Key: ACE-600
>                 URL: https://issues.apache.org/jira/browse/ACE-600
>             Project: ACE
>          Issue Type: Bug
>            Reporter: Matt Magoffin
>
> I've been attempting to upload some existing OSGi bundle artifacts into ACE (via the
web UI) and some JARs are being rejected as "
> Looking into the issue, I found that the JARs are being rejected because when {{org.apache.ace.client.repository.helper.bundle.impl.BundleHelperImpl}}
is getting a {{null}} {{Manifest}} object from the {{JarInputStream}} it created from the
uploaded artifact:
> {code:java}
> JarInputStream jis = null;
> try {
> 	jis = new JarInputStream(artifact.openStream());
> 	Manifest manifest = jis.getManifest();
> {code}
>  It turns out {{JarInputStream}} will only return a {{Manifest}} in this way if it is
at the start of the JAR file, but these failing artifacts have the {{META-INF/MANIFEST.MF}}
entry later on in the archive.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message