Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-6269

DynamicClassLoaderIT fails when the org.apache.sling.commons.osgi:2.1.0 Maven artifact is not available locally

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

      Description

      The following code snippet tries to load the OSGi bundle from the filesystem

              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());
      

      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.

        Attachments

          Activity

            People

            • Assignee:
              rombert Robert Munteanu
              Reporter:
              rombert Robert Munteanu

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment