Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #5675 Update some osgi test dependencies #5676

Merged
merged 8 commits into from Dec 2, 2020
2 changes: 1 addition & 1 deletion jetty-osgi/pom.xml
Expand Up @@ -12,7 +12,7 @@
<packaging>pom</packaging>

<properties>
<osgi-version>3.6.0.v20100517</osgi-version>
<osgi-version>3.7.1</osgi-version>
<osgi-services-version>3.2.100.v20100503</osgi-services-version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This osgi-services-version is still using ...

<dependency>
  <groupId>org.eclipse.osgi</groupId>
  <artifactId>org.eclipse.osgi.services</artifactId>
  <version>3.2.100.v20100503</version>
</dependency>

Which is the old, bad, maven coordinates. (which is a 10 year old artifact now with no updates on this coordinate space)
Link to old / bad coordinates: https://search.maven.org/artifact/org.eclipse.osgi/org.eclipse.osgi.services

The correct coordinates for osgi.services is ...

<dependency>
  <groupId>org.eclipse.platform</groupId>
  <artifactId>org.eclipse.osgi.services</artifactId>
  <version>3.9.0</version>
</dependency>

Which was updated 14-Sep-2020
Link to proper coordinates: https://search.maven.org/artifact/org.eclipse.platform/org.eclipse.osgi.services

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're positive that those 2 different coordinates are for the osgi services, then I'll try updating the version of that. I did look for a newer version, but obviously only at the old coordinates.

Copy link
Contributor

@joakime joakime Nov 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version from the bad coordinates is also dependent on the older osgi version ...

    <dependency>
      <groupId>org.eclipse.osgi</groupId>
      <artifactId>org.eclipse.osgi</artifactId>
      <version>3.6.0.v20100517</version>
    </dependency>

Copy link
Contributor

@joakime joakime Nov 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The listed packages for both ...

Old Coordinate Space

$ jar -tvf org.eclipse.osgi.services-3.2.100.v20100503.jar | cut -c37- | grep -E ".class$" | sed -e "s/[A-Za-z0-9\$]*\.class//" | sort -u | grep -v "META-INF"
org/osgi/service/cm/
org/osgi/service/component/
org/osgi/service/device/
org/osgi/service/event/
org/osgi/service/http/
org/osgi/service/io/
org/osgi/service/log/
org/osgi/service/metatype/
org/osgi/service/provisioning/
org/osgi/service/upnp/
org/osgi/service/useradmin/
org/osgi/service/wireadmin/

New Coordinate Space

$ jar -tvf org.eclipse.osgi.services-3.9.0.jar | cut -c37- | grep -E ".class$" | sed -e "s/[A-Za-z0-9\$\-]*\.class//" | sort -u | grep -v "META-INF"
org/osgi/service/cm/
org/osgi/service/component/
org/osgi/service/component/annotations/
org/osgi/service/component/runtime/
org/osgi/service/component/runtime/dto/
org/osgi/service/device/
org/osgi/service/event/
org/osgi/service/http/
org/osgi/service/http/context/
org/osgi/service/http/runtime/
org/osgi/service/http/runtime/dto/
org/osgi/service/http/whiteboard/
org/osgi/service/log/
org/osgi/service/metatype/
org/osgi/service/provisioning/
org/osgi/service/upnp/
org/osgi/service/useradmin/
org/osgi/service/wireadmin/

<equinox-http-servlet-version>1.0.0-v20070606</equinox-http-servlet-version>
</properties>
Expand Down
60 changes: 54 additions & 6 deletions jetty-osgi/test-jetty-osgi/pom.xml
Expand Up @@ -14,7 +14,10 @@
<jetty-orbit-url>https://download.eclipse.org/jetty/orbit/</jetty-orbit-url>
<assembly-directory>target/distribution</assembly-directory>
<exam.version>4.13.1</exam.version>
<url.version>2.6.1</url.version>
<url.version>2.6.2</url.version>
<bnd.version>5.2.0</bnd.version>
<swissbox.version>1.8.3</swissbox.version>
<tinybundles.version>3.0.0</tinybundles.version>
<injection.bundle.version>1.0</injection.bundle.version>
</properties>
<dependencies>
Expand All @@ -37,17 +40,38 @@
<artifactId>pax-exam-container-forked</artifactId>
<version>${exam.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bndlib</artifactId>
</exclusion>
<exclusion>
<groupId>org.ops4j.pax.tinybundles</groupId>
<artifactId>tinybundles</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.ops4j.pax.tinybundles</groupId>
<artifactId>tinybundles</artifactId>
<version>${tinybundles.version}</version>
</dependency>
<dependency>
<groupId>org.ops4j.pax.swissbox</groupId>
<artifactId>pax-swissbox-framework</artifactId>
<version>1.8.3</version>
<version>${swissbox.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.ops4j.base</groupId>
<artifactId>ops4j-base-monitors</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.ops4j.pax.swissbox</groupId>
<artifactId>pax-swissbox-tracker</artifactId>
<version>1.8.3</version>
<version>${swissbox.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -71,13 +95,19 @@
<dependency>
<groupId>org.ops4j.pax.url</groupId>
<artifactId>pax-url-wrap</artifactId>
<version>2.6.1</version>
<version>${url.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bndlib</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bndlib</artifactId>
<version>2.4.0</version>
<artifactId>biz.aQute.bndlib</artifactId>
<version>${bnd.version}</version>
<exclusions>
<exclusion>
<groupId>org.osgi</groupId>
Expand Down Expand Up @@ -432,6 +462,24 @@
<artifactId>asm-commons</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId>
<scope>test</scope>
<version>${asm.version}</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-analysis</artifactId>
<scope>test</scope>
<version>${asm.version}</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-util</artifactId>
<scope>test</scope>
<version>${asm.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-client</artifactId>
Expand Down
Expand Up @@ -25,14 +25,12 @@
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;
import javax.inject.Inject;

import aQute.bnd.osgi.Constants;
import org.eclipse.jetty.annotations.ClassInheritanceHandler;
import org.eclipse.jetty.osgi.annotations.AnnotationParser;
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Configuration;
Expand All @@ -46,6 +44,8 @@

import static org.junit.Assert.assertTrue;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;


/**
* TestJettyOSGiAnnotationParser
*
Expand All @@ -64,8 +64,8 @@ public static Option[] configure()
options.add(TestOSGiUtil.optionalRemoteDebug());
options.add(CoreOptions.junitBundles());
options.addAll(TestOSGiUtil.coreJettyDependencies());
options.add(mavenBundle().groupId("biz.aQute.bnd").artifactId("bndlib").versionAsInProject().start());
options.add(mavenBundle().groupId("org.ops4j.pax.tinybundles").artifactId("tinybundles").version("2.1.1").start());
options.add(mavenBundle().groupId("biz.aQute.bnd").artifactId("biz.aQute.bndlib").version("3.5.0").start());
joakime marked this conversation as resolved.
Show resolved Hide resolved
options.add(mavenBundle().groupId("org.ops4j.pax.tinybundles").artifactId("tinybundles").versionAsInProject().start());
return options.toArray(new Option[options.size()]);
}

Expand Down
Expand Up @@ -18,7 +18,6 @@

package org.eclipse.jetty.osgi.test;

import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;
Expand Down
Expand Up @@ -93,8 +93,9 @@ public static List<Option> annotationDependencies()
public static List<Option> extraDependencies()
{
List<Option> res = new ArrayList<>();
res.add(mavenBundle().groupId("biz.aQute.bnd").artifactId("bndlib").versionAsInProject().start());
res.add(mavenBundle().groupId("org.ops4j.pax.tinybundles").artifactId("tinybundles").version("2.1.1").start());
//Need an earlier version of bndlib because of tinybundles
res.add(mavenBundle().groupId("biz.aQute.bnd").artifactId("biz.aQute.bndlib").version("3.5.0").start());
joakime marked this conversation as resolved.
Show resolved Hide resolved
res.add(mavenBundle().groupId("org.ops4j.pax.tinybundles").artifactId("tinybundles").versionAsInProject().start());
return res;
}

Expand Down
Expand Up @@ -41,7 +41,6 @@

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.systemProperty;

Expand Down Expand Up @@ -70,8 +69,9 @@ public static Option[] configure()
"com.sun.org.apache.xpath.internal.jaxp", "com.sun.org.apache.xpath.internal.objects"));

options.addAll(TestOSGiUtil.coreJettyDependencies());
options.add(mavenBundle().groupId("biz.aQute.bnd").artifactId("bndlib").versionAsInProject().start());
options.add(mavenBundle().groupId("org.ops4j.pax.tinybundles").artifactId("tinybundles").version("2.1.1").start());
//Note: we have to back down the version of bnd used here because tinybundles expects only this version
options.add(mavenBundle().groupId("biz.aQute.bnd").artifactId("biz.aQute.bndlib").version("3.5.0").start());
joakime marked this conversation as resolved.
Show resolved Hide resolved
options.add(mavenBundle().groupId("org.ops4j.pax.tinybundles").artifactId("tinybundles").versionAsInProject().start());
options.add(mavenBundle().groupId("org.eclipse.jetty.osgi").artifactId("test-jetty-osgi-webapp-resources").type("war").versionAsInProject());
options.add(systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value(LOG_LEVEL));
options.add(systemProperty("org.eclipse.jetty.LEVEL").value(LOG_LEVEL));
Expand Down