Raising new orbit deps to top level dependencyManagement, and wiring up jetty-osgi with new deps
This commit is contained in:
parent
154f4e7ed7
commit
c4cf25f51b
|
@ -10,7 +10,6 @@
|
|||
<packaging>pom</packaging>
|
||||
<properties>
|
||||
<assembly-directory>target/distribution</assembly-directory>
|
||||
<orbit-servlet-api-version>2.5.0.v201103041518</orbit-servlet-api-version>
|
||||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
|
@ -284,73 +283,6 @@
|
|||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<!-- Orbit Deps -->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.servlet</artifactId>
|
||||
<version>${orbit-servlet-api-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.annotation</artifactId>
|
||||
<version>1.1.0.v201108011116</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>org.objectweb.asm</artifactId>
|
||||
<version>3.1.0.v200803061910</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.activation</artifactId>
|
||||
<version>1.1.0.v201105071233</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.mail.glassfish</artifactId>
|
||||
<version>1.4.1.v201005082020</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.transaction</artifactId>
|
||||
<version>1.1.1.v201105210645</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.el</artifactId>
|
||||
<version>2.1.0.v201105211819</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.servlet.jsp</artifactId>
|
||||
<version>2.1.0.v201105211820</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.servlet.jsp.jstl</artifactId>
|
||||
<version>1.2.0.v201105211821</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>com.sun.el</artifactId>
|
||||
<version>1.0.0.v201105211818</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>org.apache.jasper.glassfish</artifactId>
|
||||
<version>2.1.0.v201110031002</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>org.apache.taglibs.standard.glassfish</artifactId>
|
||||
<version>1.2.0.v201112081803</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>org.eclipse.jdt.core</artifactId>
|
||||
<version>3.7.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Standard Jetty Deps -->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
|
|
|
@ -24,24 +24,46 @@
|
|||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.osgi</groupId>
|
||||
<artifactId>org.eclipse.osgi</artifactId>
|
||||
<groupId>org.eclipse.osgi</groupId>
|
||||
<artifactId>org.eclipse.osgi</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.osgi</groupId>
|
||||
<artifactId>org.eclipse.osgi.services</artifactId>
|
||||
<groupId>org.eclipse.osgi</groupId>
|
||||
<artifactId>org.eclipse.osgi.services</artifactId>
|
||||
</dependency>
|
||||
<!-- Orbit Servlet Deps -->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.servlet</artifactId>
|
||||
</dependency>
|
||||
<!-- Orbit JSP Deps -->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.el</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jsp-2.1-glassfish</artifactId>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.servlet.jsp</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jsp-api-2.1-glassfish</artifactId>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.servlet.jsp.jstl</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>com.sun.el</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>org.apache.jasper.glassfish</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>org.apache.taglibs.standard.glassfish</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>org.eclipse.jdt.core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -138,16 +138,6 @@
|
|||
<artifactId>servletbridge</artifactId>
|
||||
<version>${equinox-servletbridge-version}</version>
|
||||
</dependency-->
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jsp-2.1-glassfish</artifactId>
|
||||
<version>${jsp-2.1-glassfish-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jsp-api-2.1-glassfish</artifactId>
|
||||
<version>${jsp-2.1-glassfish-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
|
|
|
@ -11,23 +11,46 @@
|
|||
<description>Jetty OSGi Integration test</description>
|
||||
<properties>
|
||||
<bundle-symbolic-name>${project.groupId}.boot.test</bundle-symbolic-name>
|
||||
<jetty-orbit-url>http://download.eclipse.org/jetty/orbit/</jetty-orbit-url>
|
||||
<assembly-directory>target/distribution</assembly-directory>
|
||||
<paxexam-version>1.2.0</paxexam-version>
|
||||
<eclipse-ecj-version>3.6</eclipse-ecj-version>
|
||||
<orbit-javax-activation-version>${javax-activation-version}.0.v201005080500</orbit-javax-activation-version>
|
||||
<orbit-javax-annotation-version>1.0.0.v20100513-0750</orbit-javax-annotation-version>
|
||||
<orbit-javax-el-version>2.1.0.v201004190952</orbit-javax-el-version>
|
||||
<orbit-javax-mail-glassfish-version>${javax-mail-version}.v201005082020</orbit-javax-mail-glassfish-version>
|
||||
<orbit-javax-servlet-version>2.5.0.v200910301333</orbit-javax-servlet-version>
|
||||
<orbit-javax-servlet-jsp-version>2.1.0.v201004190952</orbit-javax-servlet-jsp-version>
|
||||
<orbit-javax-servlet-jsp-jstl-version>1.2.0.v201004190952</orbit-javax-servlet-jsp-jstl-version>
|
||||
<orbit-com-sun-el-version>1.0.0.v201004190952</orbit-com-sun-el-version>
|
||||
<orbit-org-apache-jasper-version>2.1.0.v201007080150</orbit-org-apache-jasper-version>
|
||||
<orbit-org-apache-taglibs-standard-version>1.2.0.v201004190952</orbit-org-apache-taglibs-standard-version>
|
||||
<orbit-org-objectweb-asm-version>3.1.0.v200803061910</orbit-org-objectweb-asm-version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<!-- Orbit Servlet Deps -->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.servlet</artifactId>
|
||||
</dependency>
|
||||
<!-- Orbit JSP Deps -->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.el</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.servlet.jsp</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.servlet.jsp.jstl</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>com.sun.el</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>org.apache.jasper.glassfish</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>org.apache.taglibs.standard.glassfish</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>org.eclipse.jdt.core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- OSGi Deps -->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||
<artifactId>jetty-osgi-boot</artifactId>
|
||||
|
@ -46,6 +69,8 @@
|
|||
<version>${project.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Jetty Deps -->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-webapp</artifactId>
|
||||
|
@ -67,6 +92,11 @@
|
|||
<artifactId>jetty-servlet</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-servlets</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-xml</artifactId>
|
||||
|
@ -94,23 +124,16 @@
|
|||
<artifactId>jetty-websocket</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<!-- can't use javax.servlet:servlet-api:2.5 it is not a bundle.
|
||||
the mortbay one is a bundle -->
|
||||
|
||||
<!-- Eclipse OSGi Deps -->
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<version>2.5-20081211</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.eclipse.osgi</groupId>
|
||||
<artifactId>org.eclipse.osgi</artifactId>
|
||||
<groupId>org.eclipse.osgi</groupId>
|
||||
<artifactId>org.eclipse.osgi</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.osgi</groupId>
|
||||
<artifactId>org.eclipse.osgi.services</artifactId>
|
||||
<groupId>org.eclipse.osgi</groupId>
|
||||
<artifactId>org.eclipse.osgi.services</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -118,11 +141,6 @@
|
|||
<artifactId>servlet</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-servlets</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
|
@ -160,93 +178,77 @@
|
|||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.ops4j.pax.exam</groupId>
|
||||
<artifactId>maven-paxexam-plugin</artifactId>
|
||||
<version>${paxexam-version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-config</id>
|
||||
<goals>
|
||||
<goal>generate-depends-file</goal>
|
||||
<goal>generate-config</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<options>
|
||||
<workingDirectory>${project.build.directory}/paxexam</workingDirectory>
|
||||
</options>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- prepare the orbit jars in the target/distribution folder copied from jetty-distribution/pom.xml -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<groupId>org.ops4j.pax.exam</groupId>
|
||||
<artifactId>maven-paxexam-plugin</artifactId>
|
||||
<version>${paxexam-version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-config</id>
|
||||
<goals>
|
||||
<goal>generate-depends-file</goal>
|
||||
<goal>generate-config</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<options>
|
||||
<workingDirectory>${project.build.directory}/paxexam</workingDirectory>
|
||||
</options>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-orbit-servlet-api-deps</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<!-- This is the Orbit Downloads Process -->
|
||||
|
||||
<!-- Step 1: download orbit artifact into orbit-cache (if not present) -->
|
||||
<property name="orbit-cache" value="${user.home}/.m2/eclipse-orbit" />
|
||||
|
||||
<mkdir dir="${orbit-cache}" />
|
||||
<get dest="${orbit-cache}" verbose="true" skipexisting="true">
|
||||
<url url="${jetty-orbit-url}/javax.servlet_${orbit-javax-servlet-version}.jar" />
|
||||
<url url="${jetty-orbit-url}/javax.activation_${orbit-javax-activation-version}.jar" />
|
||||
<url url="${jetty-orbit-url}/javax.mail.glassfish_${orbit-javax-mail-glassfish-version}.jar" />
|
||||
<url url="${jetty-orbit-url}/javax.el_${orbit-javax-el-version}.jar" />
|
||||
<url url="${jetty-orbit-url}/javax.servlet.jsp_${orbit-javax-servlet-jsp-version}.jar" />
|
||||
<url url="${jetty-orbit-url}/javax.servlet.jsp.jstl_${orbit-javax-servlet-jsp-jstl-version}.jar" />
|
||||
<url url="${jetty-orbit-url}/com.sun.el_${orbit-com-sun-el-version}.jar" />
|
||||
<url url="${jetty-orbit-url}/org.apache.jasper.glassfish_${orbit-org-apache-jasper-version}.jar" />
|
||||
<url url="${jetty-orbit-url}/org.apache.taglibs.standard.glassfish_${orbit-org-apache-taglibs-standard-version}.jar" />
|
||||
<url url="${jetty-orbit-url}/ecj-${eclipse-ecj-version}.jar" />
|
||||
</get>
|
||||
|
||||
<!-- Step 2: copy the orbit artifact from orbit-cache to the appropriate lib directory -->
|
||||
|
||||
<!-- ${jetty.home}/lib/ -->
|
||||
<mkdir dir="${assembly-directory}/lib" />
|
||||
<copy file="${orbit-cache}/javax.servlet_${orbit-javax-servlet-version}.jar" tofile="${assembly-directory}/lib/servlet-api-2.5.jar" />
|
||||
|
||||
<!-- ${jetty.home}/lib/jndi/ -->
|
||||
<mkdir dir="${assembly-directory}/lib/jndi" />
|
||||
<copy todir="${assembly-directory}/lib/jndi">
|
||||
<fileset dir="${orbit-cache}">
|
||||
<include name="javax.activation_${orbit-javax-activation-version}.jar" />
|
||||
<include name="javax.mail.glassfish_${orbit-javax-mail-glassfish-version}.jar" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<!-- ${jetty.home}/lib/jsp/ -->
|
||||
<mkdir dir="${assembly-directory}/lib/jsp" />
|
||||
<copy todir="${assembly-directory}/lib/jsp">
|
||||
<fileset dir="${orbit-cache}">
|
||||
<include name="javax.el_${orbit-javax-el-version}.jar" />
|
||||
<include name="javax.servlet.jsp_${orbit-javax-servlet-jsp-version}.jar" />
|
||||
<include name="javax.servlet.jsp.jstl_${orbit-javax-servlet-jsp-jstl-version}.jar" />
|
||||
<include name="com.sun.el_${orbit-com-sun-el-version}.jar" />
|
||||
<include name="org.apache.jasper.glassfish_${orbit-org-apache-jasper-version}.jar" />
|
||||
<include name="org.apache.taglibs.standard.glassfish_${orbit-org-apache-taglibs-standard-version}.jar" />
|
||||
<include name="ecj-${eclipse-ecj-version}.jar" />
|
||||
</fileset>
|
||||
<!--fileset dir="${orbit-cache}/${eclipse-drop}">
|
||||
<include name="ecj-${eclipse-ecj-version}.jar" />
|
||||
</fileset-->
|
||||
</copy>
|
||||
|
||||
</tasks>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.servlet</artifactId>
|
||||
<version>${orbit-servlet-api-version}</version>
|
||||
<overWrite>true</overWrite>
|
||||
<outputDirectory>${assembly-directory}/lib</outputDirectory>
|
||||
<destFileName>servlet-api-2.5.jar</destFileName>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-orbit-lib-jndi-deps</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<includeGroupIds>org.eclipse.jetty.orbit</includeGroupIds>
|
||||
<includeArtifactIds>javax.mail.glassfish,javax.activation</includeArtifactIds>
|
||||
<includeTypes>jar</includeTypes>
|
||||
<outputDirectory>${assembly-directory}/lib/jndi</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-orbit-lib-jsp-deps</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<includeGroupIds>org.eclipse.jetty.orbit</includeGroupIds>
|
||||
<includeArtifactIds>com.sun.el,javax.el,javax.servlet.jsp,javax.servlet.jsp.jstl,org.apache.jasper.glassfish,org.apache.taglibs.standard.glassfish,org.eclipse.jdt.core</includeArtifactIds>
|
||||
<includeTypes>jar</includeTypes>
|
||||
<outputDirectory>${assembly-directory}/lib/jsp</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
|
@ -260,7 +262,6 @@
|
|||
</sourceExcludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
// ========================================================================
|
||||
package org.eclipse.jetty.osgi.boot;
|
||||
|
||||
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
|
||||
import static org.ops4j.pax.exam.CoreOptions.options;
|
||||
import static org.ops4j.pax.exam.CoreOptions.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
@ -61,17 +60,18 @@ public class TestJettyOSGiBootCore
|
|||
* Jetty-osgi including webapp support and also jetty-client.
|
||||
* Sets the system property jetty.home.bunde=org.eclipse.jetty.osgi.boot
|
||||
* to use the jetty server configuration embedded in
|
||||
* @return
|
||||
*
|
||||
* @return list of options
|
||||
*/
|
||||
public static List<Option> provisionCoreJetty()
|
||||
{
|
||||
return Arrays.asList(options(
|
||||
//get the jetty home config from the osgi boot bundle.
|
||||
// get the jetty home config from the osgi boot bundle.
|
||||
PaxRunnerOptions.vmOptions("-Djetty.port=9876 -D" + DefaultJettyAtJettyHomeHelper.SYS_PROP_JETTY_HOME_BUNDLE + "=org.eclipse.jetty.osgi.boot"),
|
||||
|
||||
// CoreOptions.equinox(),
|
||||
// CoreOptions.equinox(),
|
||||
|
||||
mavenBundle().groupId( "org.mortbay.jetty" ).artifactId( "servlet-api" ).versionAsInProject().noStart(),
|
||||
mavenBundle().groupId( "org.eclipse.jetty.orbit" ).artifactId( "javax.servlet" ).versionAsInProject().noStart(),
|
||||
mavenBundle().groupId( "org.eclipse.osgi" ).artifactId( "org.eclipse.osgi" ).versionAsInProject().noStart(),
|
||||
mavenBundle().groupId( "org.eclipse.osgi" ).artifactId( "org.eclipse.osgi.services" ).versionAsInProject().noStart(),
|
||||
|
||||
|
@ -85,10 +85,11 @@ public class TestJettyOSGiBootCore
|
|||
mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-io" ).versionAsInProject().noStart(),
|
||||
mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-continuation" ).versionAsInProject().noStart(),
|
||||
mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-security" ).versionAsInProject().noStart(),
|
||||
mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-websocket" ).versionAsInProject().noStart(),
|
||||
mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-servlets" ).versionAsInProject().noStart(),
|
||||
|
||||
mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-client" ).versionAsInProject().noStart()
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
@Inject
|
||||
|
@ -154,6 +155,7 @@ public class TestJettyOSGiBootCore
|
|||
HttpService http = (HttpService)bundleContext.getService(sr);
|
||||
http.registerServlet("/greetings", new HttpServlet() {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest req,
|
||||
HttpServletResponse resp) throws ServletException,
|
||||
IOException {
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
// ========================================================================
|
||||
package org.eclipse.jetty.osgi.boot;
|
||||
|
||||
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
|
||||
import static org.ops4j.pax.exam.CoreOptions.options;
|
||||
import static org.ops4j.pax.exam.CoreOptions.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
|
@ -32,7 +31,6 @@ import org.eclipse.jetty.http.HttpMethods;
|
|||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.ops4j.pax.exam.CoreOptions;
|
||||
import org.ops4j.pax.exam.Inject;
|
||||
import org.ops4j.pax.exam.Option;
|
||||
import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
|
||||
|
@ -48,10 +46,12 @@ import org.osgi.framework.BundleContext;
|
|||
@RunWith( JUnit4TestRunner.class )
|
||||
public class TestJettyOSGiBootWithJsp
|
||||
{
|
||||
private static final boolean LOGGING_ENABLED = false;
|
||||
private static final boolean REMOTE_DEBUGGING = false;
|
||||
|
||||
@Inject
|
||||
BundleContext bundleContext = null;
|
||||
|
||||
|
||||
@Configuration
|
||||
public static Option[] configure()
|
||||
{
|
||||
|
@ -59,29 +59,48 @@ public class TestJettyOSGiBootWithJsp
|
|||
|
||||
ArrayList<Option> options = new ArrayList<Option>();
|
||||
options.addAll(TestJettyOSGiBootCore.provisionCoreJetty());
|
||||
|
||||
// Enable Logging
|
||||
if(LOGGING_ENABLED) {
|
||||
options.addAll(Arrays.asList(options(
|
||||
// install log service using pax runners profile abstraction (there are more profiles, like DS)
|
||||
// logProfile(),
|
||||
// this is how you set the default log level when using pax logging (logProfile)
|
||||
systemProperty( "org.ops4j.pax.logging.DefaultServiceLog.level" ).value( "INFO" )
|
||||
)));
|
||||
}
|
||||
|
||||
// Remote JDWP Debugging
|
||||
if(REMOTE_DEBUGGING) {
|
||||
options.addAll(Arrays.asList(options(
|
||||
// this just adds all what you write here to java vm argumenents of the (new) osgi process.
|
||||
PaxRunnerOptions.vmOption( "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006" )
|
||||
)));
|
||||
}
|
||||
|
||||
// Standard Options
|
||||
options.addAll(Arrays.asList(options(
|
||||
// install log service using pax runners profile abstraction (there are more profiles, like DS)
|
||||
//logProfile(),
|
||||
// this is how you set the default log level when using pax logging (logProfile)
|
||||
//systemProperty( "org.ops4j.pax.logging.DefaultServiceLog.level" ).value( "INFO" ),
|
||||
|
||||
// this just adds all what you write here to java vm argumenents of the (new) osgi process.
|
||||
// PaxRunnerOptions.vmOption( "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006" ),
|
||||
|
||||
PaxRunnerOptions.vmOption("-Djetty.port=9876 -D" + OSGiServerConstants.MANAGED_JETTY_XML_CONFIG_URLS +
|
||||
"=etc/jetty.xml;" + testrealm.getAbsolutePath()),
|
||||
PaxRunnerOptions.vmOption("-Djetty.port=9876 -D" + OSGiServerConstants.MANAGED_JETTY_XML_CONFIG_URLS +
|
||||
"=etc/jetty.xml;" + testrealm.getAbsolutePath()),
|
||||
|
||||
mavenBundle().groupId( "org.eclipse.jetty.osgi" ).artifactId( "jetty-osgi-boot" ).versionAsInProject(),
|
||||
mavenBundle().groupId( "org.eclipse.jetty.osgi" ).artifactId( "jetty-osgi-boot-jsp" ).versionAsInProject(),
|
||||
|
||||
mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-websocket" ).versionAsInProject(),
|
||||
mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-servlets" ).versionAsInProject(),
|
||||
mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "test-jetty-webapp" ).classifier("webbundle").versionAsInProject(),
|
||||
//the jsp bundles downloaded from eclipse orbit website and the ecj jar.
|
||||
// CoreOptions.provision( PaxRunnerOptions.scanDir( "jasper" ) ),
|
||||
CoreOptions.provision( PaxRunnerOptions.scanDir( "target/distribution/lib/jsp" ) )
|
||||
/* orbit deps */
|
||||
mavenBundle().groupId( "org.eclipse.jetty.orbit" ).artifactId( "javax.servlet.jsp" ).versionAsInProject(),
|
||||
mavenBundle().groupId( "org.eclipse.jetty.orbit" ).artifactId( "javax.servlet.jsp.jstl" ).versionAsInProject(),
|
||||
mavenBundle().groupId( "org.eclipse.jetty.orbit" ).artifactId( "javax.el" ).versionAsInProject(),
|
||||
mavenBundle().groupId( "org.eclipse.jetty.orbit" ).artifactId( "com.sun.el" ).versionAsInProject(),
|
||||
mavenBundle().groupId( "org.eclipse.jetty.orbit" ).artifactId( "org.apache.jasper.glassfish" ).versionAsInProject(),
|
||||
mavenBundle().groupId( "org.eclipse.jetty.orbit" ).artifactId( "org.apache.taglibs.standard.glassfish" ).versionAsInProject(),
|
||||
mavenBundle().groupId( "org.eclipse.jetty.orbit" ).artifactId( "org.eclipse.jdt.core" ).versionAsInProject(),
|
||||
|
||||
/* jetty-osgi deps */
|
||||
mavenBundle().groupId( "org.eclipse.jetty.osgi" ).artifactId( "jetty-osgi-boot" ).versionAsInProject().start(),
|
||||
mavenBundle().groupId( "org.eclipse.jetty.osgi" ).artifactId( "jetty-osgi-boot-jsp" ).versionAsInProject().start(),
|
||||
|
||||
mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "test-jetty-webapp" ).classifier("webbundle").versionAsInProject()
|
||||
|
||||
// mavenBundle().groupId( "org.eclipse.equinox.http" ).artifactId( "servlet" ).versionAsInProject().start()
|
||||
)));
|
||||
|
||||
return options.toArray(new Option[options.size()]);
|
||||
}
|
||||
|
||||
|
|
69
pom.xml
69
pom.xml
|
@ -13,6 +13,7 @@
|
|||
<properties>
|
||||
<javax-activation-version>1.1</javax-activation-version>
|
||||
<javax-mail-version>1.4.1</javax-mail-version>
|
||||
<orbit-servlet-api-version>2.5.0.v201103041518</orbit-servlet-api-version>
|
||||
<javax-servlet-jsp-version>2.1.v20100127</javax-servlet-jsp-version>
|
||||
<javax-transaction-version>1.1.1</javax-transaction-version>
|
||||
<jetty.url>http://www.eclipse.org/jetty</jetty.url>
|
||||
|
@ -362,6 +363,74 @@
|
|||
</modules>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!-- Orbit Deps -->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.servlet</artifactId>
|
||||
<version>${orbit-servlet-api-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.annotation</artifactId>
|
||||
<version>1.1.0.v201108011116</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>org.objectweb.asm</artifactId>
|
||||
<version>3.1.0.v200803061910</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.activation</artifactId>
|
||||
<version>1.1.0.v201105071233</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.mail.glassfish</artifactId>
|
||||
<version>1.4.1.v201005082020</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.transaction</artifactId>
|
||||
<version>1.1.1.v201105210645</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.el</artifactId>
|
||||
<version>2.1.0.v201105211819</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.servlet.jsp</artifactId>
|
||||
<version>2.1.0.v201105211820</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.servlet.jsp.jstl</artifactId>
|
||||
<version>1.2.0.v201105211821</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>com.sun.el</artifactId>
|
||||
<version>1.0.0.v201105211818</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>org.apache.jasper.glassfish</artifactId>
|
||||
<version>2.1.0.v201110031002</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>org.apache.taglibs.standard.glassfish</artifactId>
|
||||
<version>1.2.0.v201112081803</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>org.eclipse.jdt.core</artifactId>
|
||||
<version>3.7.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Old Deps -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
|
|
Loading…
Reference in New Issue