You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Robert Munteanu (JIRA)" <ji...@apache.org> on 2016/11/10 16:40:58 UTC

[jira] [Updated] (SLING-6269) DynamicClassLoaderIT fails when the org.apache.sling.commons.osgi:2.1.0 Maven artifact is not available locally

     [ https://issues.apache.org/jira/browse/SLING-6269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Munteanu updated SLING-6269:
-----------------------------------
    Labels: sling-IT  (was: )

> DynamicClassLoaderIT fails when the org.apache.sling.commons.osgi:2.1.0 Maven artifact is not available locally
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-6269
>                 URL: https://issues.apache.org/jira/browse/SLING-6269
>             Project: Sling
>          Issue Type: Bug
>          Components: Commons
>            Reporter: Robert Munteanu
>            Assignee: Robert Munteanu
>              Labels: sling-IT
>             Fix For: Commons ClassLoader 1.3.8
>
>
> The following code snippet tries to load the OSGi bundle from the filesystem
> {code}
>         final URL url = new URL(mavenBundle("org.apache.sling", "org.apache.sling.commons.osgi", "2.1.0").getURL());
>         final InputStream is = url.openStream();
>         Bundle osgiBundle = null;
>         try {
>             osgiBundle = this.bundleContext.installBundle(url.toExternalForm(), is);
>         } finally {
>             try { is.close(); } catch ( final IOException ignore) {}
>         }
>         assertNotNull(osgiBundle);
>         assertEquals(Bundle.INSTALLED, osgiBundle.getState());
> {code}
> Even though it's wrapped in a {{mavenBundle}} call, the bundle is not actually downloaded, so if the bundle is not available locally the test will fail.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)