Attempting to fix OSGi build for Java 8

This commit is contained in:
Joakim Erdfelt 2014-03-25 09:01:11 -07:00
parent fab377335f
commit aea74ea2da
4 changed files with 11 additions and 4 deletions

View File

@ -35,7 +35,7 @@
<Bundle-ManifestVersion>2</Bundle-ManifestVersion>
<Bundle-SymbolicName>${bundle-symbolic-name};singleton:=true</Bundle-SymbolicName>
<Bundle-Name>Jetty OSGi ALPN Fragment</Bundle-Name>
<Bundle-Version>${parsedVersion.osgiVersion}</Bundle-Version>
<Bundle-Version>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</Bundle-Version>
<Export-Package>org.eclipse.jetty.alpn</Export-Package>
<Fragment-Host>system.bundle;extension:=framework</Fragment-Host>
</manifestEntries>

View File

@ -31,12 +31,14 @@ import java.util.List;
import javax.inject.Inject;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.CoreOptions;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.Configuration;
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
/**
@ -98,14 +100,15 @@ public class TestJettyOSGiBootSpdy
res.add(CoreOptions.vmOptions("-Xbootclasspath/p:" + alpnBoot));
res.add(mavenBundle().groupId("org.eclipse.jetty.osgi").artifactId("jetty-osgi-alpn").versionAsInProject().noStart());
res.add(mavenBundle().groupId("org.eclipse.jetty.spdy").artifactId("spdy-client").versionAsInProject().noStart());
res.add(mavenBundle().groupId("org.eclipse.jetty.spdy").artifactId("spdy-core").versionAsInProject().noStart());
res.add(mavenBundle().groupId("org.eclipse.jetty.spdy").artifactId("spdy-server").versionAsInProject().noStart());
res.add(mavenBundle().groupId("org.eclipse.jetty.spdy").artifactId("spdy-http-common").versionAsInProject().noStart());
res.add(mavenBundle().groupId("org.eclipse.jetty.spdy").artifactId("spdy-http-server").versionAsInProject().noStart());
res.add(mavenBundle().groupId("org.eclipse.jetty.spdy").artifactId("spdy-client").versionAsInProject().noStart());
return res;
}
@Ignore
@Test
public void checkALPNBootOnBootstrapClasspath() throws Exception
{
@ -117,6 +120,10 @@ public class TestJettyOSGiBootSpdy
@Test
public void assertAllBundlesActiveOrResolved()
{
Bundle b = TestOSGiUtil.getBundle(bundleContext, "org.eclipse.jetty.spdy.client");
TestOSGiUtil.diagnoseNonActiveOrNonResolvedBundle(b);
b = TestOSGiUtil.getBundle(bundleContext, "org.eclipse.jetty.osgi.boot");
TestOSGiUtil.diagnoseNonActiveOrNonResolvedBundle(b);
TestOSGiUtil.assertAllBundlesActiveOrResolved(bundleContext);
}

View File

@ -29,7 +29,7 @@
<configuration>
<instructions>
<Export-Package>org.eclipse.jetty.spdy.client;version="9.1"</Export-Package>
<Import-Package>!org.eclipse.jetty.npn,org.eclipse.jetty.*;version="[9.0,10.0)",*</Import-Package>
<Import-Package>!org.eclipse.jetty.npn,!org.eclipse.jetty.alpn,org.eclipse.jetty.*;version="[9.0,10.0)",*</Import-Package>
</instructions>
</configuration>
</execution>

View File

@ -29,7 +29,7 @@
<configuration>
<instructions>
<Export-Package>org.eclipse.jetty.spdy.server;version="9.1"</Export-Package>
<Import-Package>org.eclipse.jetty.alpn,org.eclipse.jetty.npn,org.eclipse.jetty.*;version="[9.0,10.0)",*</Import-Package>
<Import-Package>org.eclipse.jetty.alpn;resolution:=optional,org.eclipse.jetty.npn;resolution:=optional,org.eclipse.jetty.*;version="[9.0,10.0)",*</Import-Package>
<_nouses>true</_nouses>
</instructions>
</configuration>