commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COMPRESS-199) Introduction of XZ breaks OSGi support
Date Thu, 20 Dec 2012 01:17:15 GMT

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

Jukka Zitting commented on COMPRESS-199:
----------------------------------------

The following patch implements an alternative solution by marking the xz dependency as optional
when working with OSGi.

{code}
diff --git a/pom.xml b/pom.xml
index 110e618..f51d628 100644
--- a/pom.xml
+++ b/pom.xml
@@ -151,6 +151,15 @@ These include: bzip2, gzip, pack200, xz and ar, cpio, jar,
           </archive>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            <Import-Package>org.tukaani.xz;resolution:=optional</Import-Package
+          </instructions>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
{code}
                
> Introduction of XZ breaks OSGi support
> --------------------------------------
>
>                 Key: COMPRESS-199
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-199
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Compressors
>    Affects Versions: 1.4.1
>         Environment: Windows Vista & RHEL 6.2, Java 1.6.0_33, Equinox  org.eclipse.osgi_3.7.2.v20120110-1415.jar.
>            Reporter: Niklas Gertoft
>              Labels: osgi
>
> The introduction of XZ seems to break the OSGi support for the compress bundle.
> The XZ component doesn't seem to be included or referred to (dependency).
> !ENTRY org.apache.commons.compress 4 0 2012-08-20 17:06:19.339
> !MESSAGE FrameworkEvent ERROR
> !STACK 0
> org.osgi.framework.BundleException: The bundle "org.apache.commons.compress_1.4.1 [20]"
could not be resolved. Reason: Missing Constraint: Import-Package: org.tukaani.xz; version="0.0.0"
>         at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1327)
>         at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1311)
>         at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:323)
>         at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
>         at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1131)
>         at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
>         at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
>         at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
>         at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
>         at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
>         at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
>         at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>         at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
> Included in my project by maven and
> <dependency>
> 	<groupId>org.apache.commons</groupId>
> 	<artifactId>commons-compress</artifactId>
> 	<version>1.4.1</version>
> </dependency>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message