merge from master
This commit is contained in:
commit
6b079ae3d8
|
@ -6,6 +6,7 @@
|
||||||
# maven
|
# maven
|
||||||
target/
|
target/
|
||||||
*/src/main/java/META-INF/
|
*/src/main/java/META-INF/
|
||||||
|
*.versionsBackup
|
||||||
|
|
||||||
# common junk
|
# common junk
|
||||||
*.log
|
*.log
|
||||||
|
|
|
@ -8,10 +8,6 @@
|
||||||
<artifactId>example-jetty-embedded</artifactId>
|
<artifactId>example-jetty-embedded</artifactId>
|
||||||
<name>Example :: Jetty Embedded</name>
|
<name>Example :: Jetty Embedded</name>
|
||||||
<description>Jetty Embedded Examples</description>
|
<description>Jetty Embedded Examples</description>
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
|
|
@ -25,8 +25,9 @@
|
||||||
<goal>unpack-dependencies</goal>
|
<goal>unpack-dependencies</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<includes>META-INF/**,org/eclipse/**,org/apache/jasper/compiler/**</includes>
|
|
||||||
<excludes>**/MANIFEST.MF,javax/**</excludes>
|
<excludes>**/MANIFEST.MF,javax/**</excludes>
|
||||||
|
<excludeArtifactIds>javax</excludeArtifactIds>
|
||||||
|
<excludeGroupIds>javax,org.eclipse.jetty.orbit</excludeGroupIds>
|
||||||
<outputDirectory>${project.build.directory}/classes</outputDirectory>
|
<outputDirectory>${project.build.directory}/classes</outputDirectory>
|
||||||
<overWriteReleases>false</overWriteReleases>
|
<overWriteReleases>false</overWriteReleases>
|
||||||
<overWriteSnapshots>true</overWriteSnapshots>
|
<overWriteSnapshots>true</overWriteSnapshots>
|
||||||
|
@ -43,6 +44,8 @@
|
||||||
<includes>**/*</includes>
|
<includes>**/*</includes>
|
||||||
<excludes>META-INF/**</excludes>
|
<excludes>META-INF/**</excludes>
|
||||||
<includeGroupIds>org.eclipse.jetty</includeGroupIds>
|
<includeGroupIds>org.eclipse.jetty</includeGroupIds>
|
||||||
|
<excludeArtifactIds>javax</excludeArtifactIds>
|
||||||
|
<excludeGroupIds>javax,org.eclipse.jetty.orbit</excludeGroupIds>
|
||||||
<outputDirectory>${project.build.directory}/sources</outputDirectory>
|
<outputDirectory>${project.build.directory}/sources</outputDirectory>
|
||||||
<overWriteReleases>true</overWriteReleases>
|
<overWriteReleases>true</overWriteReleases>
|
||||||
<overWriteSnapshots>true</overWriteSnapshots>
|
<overWriteSnapshots>true</overWriteSnapshots>
|
||||||
|
@ -117,16 +120,6 @@
|
||||||
<artifactId>jetty-deploy</artifactId>
|
<artifactId>jetty-deploy</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.mortbay.jetty</groupId>
|
|
||||||
<artifactId>servlet-api</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>javax.servlet</groupId>
|
|
||||||
<artifactId>servlet-api</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
@ -135,9 +128,9 @@
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>servlet-api</artifactId>
|
||||||
<version>${servlet.spec.version}</version>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
@ -150,24 +143,6 @@
|
||||||
<artifactId>jetty-plus</artifactId>
|
<artifactId>jetty-plus</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>javax.servlet</groupId>
|
|
||||||
<artifactId>servlet-api</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
|
||||||
<artifactId>geronimo-jta_1.1_spec</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>javax.mail</groupId>
|
|
||||||
<artifactId>mail</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>javax.activation</groupId>
|
|
||||||
<artifactId>activation</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
@ -180,28 +155,12 @@
|
||||||
<artifactId>jetty-annotations</artifactId>
|
<artifactId>jetty-annotations</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
|
||||||
<artifactId>geronimo-annotation_1.0_spec</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>asm</groupId>
|
|
||||||
<artifactId>asm-commons</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-jaspi</artifactId>
|
<artifactId>jetty-jaspi</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
|
||||||
<artifactId>geronimo-jaspic_1.0_spec</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
@ -228,37 +187,24 @@
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>geronimo-jta_1.1_spec</artifactId>
|
<artifactId>javax.security.auth.message</artifactId>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.mail</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>mail</artifactId>
|
<artifactId>javax.mail.glassfish</artifactId>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.activation</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>activation</artifactId>
|
<artifactId>javax.activation</artifactId>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>geronimo-jaspic_1.0_spec</artifactId>
|
<artifactId>javax.annotation</artifactId>
|
||||||
<version>1.0</version>
|
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
|
||||||
<artifactId>geronimo-annotation_1.0_spec</artifactId>
|
|
||||||
<version>1.1.1</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>asm</groupId>
|
|
||||||
<artifactId>asm-commons</artifactId>
|
|
||||||
<scope>compile</scope>
|
|
||||||
<version>3.1</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -20,8 +20,9 @@
|
||||||
<goal>unpack-dependencies</goal>
|
<goal>unpack-dependencies</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<includes>META-INF/**,org/eclipse/**,org/apache/jasper/compiler/*</includes>
|
|
||||||
<excludes>**/MANIFEST.MF,javax/**</excludes>
|
<excludes>**/MANIFEST.MF,javax/**</excludes>
|
||||||
|
<excludeArtifactIds>javax</excludeArtifactIds>
|
||||||
|
<excludeGroupIds>javax,org.eclipse.jetty.orbit</excludeGroupIds>
|
||||||
<outputDirectory>${project.build.directory}/classes</outputDirectory>
|
<outputDirectory>${project.build.directory}/classes</outputDirectory>
|
||||||
<overWriteReleases>false</overWriteReleases>
|
<overWriteReleases>false</overWriteReleases>
|
||||||
<overWriteSnapshots>true</overWriteSnapshots>
|
<overWriteSnapshots>true</overWriteSnapshots>
|
||||||
|
@ -38,6 +39,8 @@
|
||||||
<includes>**/*</includes>
|
<includes>**/*</includes>
|
||||||
<excludes>META-INF/**</excludes>
|
<excludes>META-INF/**</excludes>
|
||||||
<includeGroupIds>org.eclipse.jetty</includeGroupIds>
|
<includeGroupIds>org.eclipse.jetty</includeGroupIds>
|
||||||
|
<excludeArtifactIds>javax</excludeArtifactIds>
|
||||||
|
<excludeGroupIds>javax,org.eclipse.jetty.orbit</excludeGroupIds>
|
||||||
<outputDirectory>${project.build.directory}/sources</outputDirectory>
|
<outputDirectory>${project.build.directory}/sources</outputDirectory>
|
||||||
<overWriteReleases>true</overWriteReleases>
|
<overWriteReleases>true</overWriteReleases>
|
||||||
<overWriteSnapshots>true</overWriteSnapshots>
|
<overWriteSnapshots>true</overWriteSnapshots>
|
||||||
|
@ -103,8 +106,12 @@
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>org.mortbay.jetty</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>servlet-api</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>servlet-api</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -115,8 +122,8 @@
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>servlet-api</artifactId>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -132,8 +139,8 @@
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>servlet-api</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
|
@ -160,28 +167,12 @@
|
||||||
<artifactId>jetty-annotations</artifactId>
|
<artifactId>jetty-annotations</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
|
||||||
<artifactId>geronimo-annotation_1.0_spec</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>asm</groupId>
|
|
||||||
<artifactId>asm-commons</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-jaspi</artifactId>
|
<artifactId>jetty-jaspi</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
|
||||||
<artifactId>geronimo-jaspic_1.0_spec</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
@ -212,38 +203,5 @@
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
|
||||||
<artifactId>geronimo-jta_1.1_spec</artifactId>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax.mail</groupId>
|
|
||||||
<artifactId>mail</artifactId>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax.activation</groupId>
|
|
||||||
<artifactId>activation</artifactId>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
|
||||||
<artifactId>geronimo-jaspic_1.0_spec</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
|
||||||
<artifactId>geronimo-annotation_1.0_spec</artifactId>
|
|
||||||
<version>1.1.1</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>asm</groupId>
|
|
||||||
<artifactId>asm-commons</artifactId>
|
|
||||||
<scope>compile</scope>
|
|
||||||
<version>3.1</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -21,8 +21,9 @@
|
||||||
<goal>unpack-dependencies</goal>
|
<goal>unpack-dependencies</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<includes>META-INF/**,org/eclipse/**</includes>
|
|
||||||
<excludes>**/MANIFEST.MF,javax/**</excludes>
|
<excludes>**/MANIFEST.MF,javax/**</excludes>
|
||||||
|
<excludeArtifactIds>javax</excludeArtifactIds>
|
||||||
|
<excludeGroupIds>javax,org.eclipse.jetty.orbit</excludeGroupIds>
|
||||||
<outputDirectory>${project.build.directory}/classes</outputDirectory>
|
<outputDirectory>${project.build.directory}/classes</outputDirectory>
|
||||||
<overWriteReleases>false</overWriteReleases>
|
<overWriteReleases>false</overWriteReleases>
|
||||||
<overWriteSnapshots>true</overWriteSnapshots>
|
<overWriteSnapshots>true</overWriteSnapshots>
|
||||||
|
@ -39,6 +40,8 @@
|
||||||
<includes>**/*</includes>
|
<includes>**/*</includes>
|
||||||
<excludes>META-INF/**</excludes>
|
<excludes>META-INF/**</excludes>
|
||||||
<includeGroupIds>org.eclipse.jetty</includeGroupIds>
|
<includeGroupIds>org.eclipse.jetty</includeGroupIds>
|
||||||
|
<excludeArtifactIds>javax</excludeArtifactIds>
|
||||||
|
<excludeGroupIds>javax,org.eclipse.jetty.orbit</excludeGroupIds>
|
||||||
<outputDirectory>${project.build.directory}/sources</outputDirectory>
|
<outputDirectory>${project.build.directory}/sources</outputDirectory>
|
||||||
<overWriteReleases>true</overWriteReleases>
|
<overWriteReleases>true</overWriteReleases>
|
||||||
<overWriteSnapshots>true</overWriteSnapshots>
|
<overWriteSnapshots>true</overWriteSnapshots>
|
||||||
|
@ -85,8 +88,8 @@
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>servlet-api</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
|
@ -103,10 +106,9 @@
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>servlet-api</artifactId>
|
||||||
<version>${servlet.spec.version}</version>
|
<scope>compile</scope>
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
|
|
|
@ -85,20 +85,25 @@
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>servlet-api</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
|
<artifactId>javax.servlet</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-websocket</artifactId>
|
<artifactId>jetty-websocket</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
|
<artifactId>javax.servlet</artifactId>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -85,15 +85,20 @@
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>servlet-api</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
|
<artifactId>javax.servlet</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>javax.servlet</artifactId>
|
||||||
</dependency>
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-websocket</artifactId>
|
<artifactId>jetty-websocket</artifactId>
|
||||||
|
|
|
@ -85,15 +85,15 @@
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>javax.servlet</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>javax.servlet</artifactId>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -92,14 +92,12 @@
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>geronimo-annotation_1.0_spec</artifactId>
|
<artifactId>javax.annotation</artifactId>
|
||||||
<version>1.1.1</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>asm</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>asm-commons</artifactId>
|
<artifactId>org.objectweb.asm</artifactId>
|
||||||
<version>3.1</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
<artifactItem>
|
<artifactItem>
|
||||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||||
<artifactId>jetty-test-policy</artifactId>
|
<artifactId>jetty-test-policy</artifactId>
|
||||||
<version>${jetty.test.policy}</version>
|
<version>${jetty-test-policy-version}</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<overWrite>true</overWrite>
|
<overWrite>true</overWrite>
|
||||||
<includes>**/*.keystore,**/*.pem</includes>
|
<includes>**/*.keystore,**/*.pem</includes>
|
||||||
|
|
|
@ -810,8 +810,8 @@ public class HttpExchange
|
||||||
|
|
||||||
void associate(AbstractHttpConnection connection)
|
void associate(AbstractHttpConnection connection)
|
||||||
{
|
{
|
||||||
if (connection.getEndPoint().getLocalHost() != null)
|
if (connection.getEndPoint().getLocalAddr() != null)
|
||||||
_localAddress = new Address(connection.getEndPoint().getLocalHost(),connection.getEndPoint().getLocalPort());
|
_localAddress = new Address(connection.getEndPoint().getLocalAddr(),connection.getEndPoint().getLocalPort());
|
||||||
|
|
||||||
_connection = connection;
|
_connection = connection;
|
||||||
if (getStatus() == STATUS_CANCELLING)
|
if (getStatus() == STATUS_CANCELLING)
|
||||||
|
|
|
@ -64,11 +64,11 @@
|
||||||
</build>
|
</build>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>org.mortbay.jetty</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>servlet-api</artifactId>
|
||||||
<version>${servlet.spec.version}</version>
|
<version>3.0.20100224</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mortbay.jetty</groupId>
|
<groupId>org.mortbay.jetty</groupId>
|
||||||
<artifactId>jetty-util</artifactId>
|
<artifactId>jetty-util</artifactId>
|
||||||
|
|
|
@ -9,21 +9,20 @@
|
||||||
<name>Jetty :: Distribution Assemblies</name>
|
<name>Jetty :: Distribution Assemblies</name>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<properties>
|
<properties>
|
||||||
<jetty-orbit-url>http://download.eclipse.org/jetty/orbit</jetty-orbit-url>
|
|
||||||
<assembly-directory>target/distribution</assembly-directory>
|
<assembly-directory>target/distribution</assembly-directory>
|
||||||
<eclipse-ecj-version>3.6</eclipse-ecj-version>
|
<eclipse-ecj-version>3.6</eclipse-ecj-version>
|
||||||
<orbit-javax-activation-version>${javax-activation-version}.0.v201005080500</orbit-javax-activation-version>
|
<orbit-javax-activation-version>${javax-activation-version}.0.v201005080500</orbit-javax-activation-version>
|
||||||
<orbit-javax-annotation-version>1.1.0.v201105051105</orbit-javax-annotation-version>
|
<orbit-javax-annotation-version>1.0.0.v20100513-0750</orbit-javax-annotation-version>
|
||||||
<orbit-javax-el-version>2.2.0.v201105051105</orbit-javax-el-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-mail-glassfish-version>${javax-mail-version}.v201005082020</orbit-javax-mail-glassfish-version>
|
||||||
<orbit-javax-servlet-version>3.0.0.v201112011016</orbit-javax-servlet-version>
|
<orbit-javax-servlet-version>2.5.0.v200910301333</orbit-javax-servlet-version>
|
||||||
<orbit-javax-servlet-jsp-version>2.2.0.v201112011158</orbit-javax-servlet-jsp-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-javax-servlet-jsp-jstl-version>1.2.0.v201004190952</orbit-javax-servlet-jsp-jstl-version>
|
||||||
<orbit-com-sun-el-version>2.2.0.v201105051105</orbit-com-sun-el-version>
|
<orbit-com-sun-el-version>1.0.0.v201004190952</orbit-com-sun-el-version>
|
||||||
|
<orbit-org-apache-jasper-version>2.1.0.v201110031002</orbit-org-apache-jasper-version>
|
||||||
<orbit-org-apache-taglibs-standard-version>1.2.0.v201004190952</orbit-org-apache-taglibs-standard-version>
|
<orbit-org-apache-taglibs-standard-version>1.2.0.v201004190952</orbit-org-apache-taglibs-standard-version>
|
||||||
<orbit-org-objectweb-asm-version>3.3.1.v201101071600</orbit-org-objectweb-asm-version>
|
<orbit-org-objectweb-asm-version>3.1.0.v200803061910</orbit-org-objectweb-asm-version>
|
||||||
<orbit-javax-transaction-version>1.1.1.v201004190952</orbit-javax-transaction-version>
|
<orbit-javax-transaction-version>1.1.1.v201004190952</orbit-javax-transaction-version>
|
||||||
<orbit-org-apache-jasper-version>2.2.2.v201112011158</orbit-org-apache-jasper-version>
|
|
||||||
</properties>
|
</properties>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
@ -87,9 +86,8 @@
|
||||||
|
|
||||||
<!-- ${jetty.home}/lib/ -->
|
<!-- ${jetty.home}/lib/ -->
|
||||||
<mkdir dir="${assembly-directory}/lib" />
|
<mkdir dir="${assembly-directory}/lib" />
|
||||||
<copy file="${orbit-cache}/javax.servlet_${orbit-javax-servlet-version}.jar" tofile="${assembly-directory}/lib/servlet-api-3.0.jar" />
|
<copy file="${orbit-cache}/javax.servlet_${orbit-javax-servlet-version}.jar" tofile="${assembly-directory}/lib/servlet-api-2.5.jar" />
|
||||||
|
|
||||||
|
|
||||||
<!-- ${jetty.home}/lib/annotations/ -->
|
<!-- ${jetty.home}/lib/annotations/ -->
|
||||||
<mkdir dir="${assembly-directory}/lib/annotations" />
|
<mkdir dir="${assembly-directory}/lib/annotations" />
|
||||||
<copy todir="${assembly-directory}/lib/annotations">
|
<copy todir="${assembly-directory}/lib/annotations">
|
||||||
|
@ -124,11 +122,12 @@
|
||||||
<include name="javax.servlet.jsp_${orbit-javax-servlet-jsp-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="javax.servlet.jsp.jstl_${orbit-javax-servlet-jsp-jstl-version}.jar" />
|
||||||
<include name="com.sun.el_${orbit-com-sun-el-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.jasper.glassfish_${orbit-org-apache-jasper-version}.jar" />
|
||||||
<include name="org.apache.taglibs.standard.glassfish_${orbit-org-apache-taglibs-standard-version}.jar" />
|
<include name="org.apache.taglibs.standard.glassfish_${orbit-org-apache-taglibs-standard-version}.jar" />
|
||||||
<include name="ecj-${eclipse-ecj-version}.jar" />
|
<include name="ecj-${eclipse-ecj-version}.jar" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
|
|
||||||
<chmod dir="${assembly-directory}/bin" perm="755" includes="**/*.sh" />
|
<chmod dir="${assembly-directory}/bin" perm="755" includes="**/*.sh" />
|
||||||
</tasks>
|
</tasks>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -206,11 +205,83 @@
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<includeGroupIds>org.eclipse.jetty</includeGroupIds>
|
<includeGroupIds>org.eclipse.jetty</includeGroupIds>
|
||||||
<excludeArtifactIds>jetty-start,jetty-monitor</excludeArtifactIds>
|
<excludeGroupIds>org.eclipse.jetty.orbit</excludeGroupIds>
|
||||||
|
<excludeArtifactIds>jetty-start,jetty-monitor,jetty-jsp</excludeArtifactIds>
|
||||||
<includeTypes>jar</includeTypes>
|
<includeTypes>jar</includeTypes>
|
||||||
<outputDirectory>${assembly-directory}/lib</outputDirectory>
|
<outputDirectory>${assembly-directory}/lib</outputDirectory>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>copy-orbit-servlet-api-deps</id>
|
||||||
|
<phase>generate-resources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<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-annotations-deps</id>
|
||||||
|
<phase>generate-resources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<includeGroupIds>org.eclipse.jetty.orbit</includeGroupIds>
|
||||||
|
<includeArtifactIds>javax.annotation,org.objectweb.asm</includeArtifactIds>
|
||||||
|
<includeTypes>jar</includeTypes>
|
||||||
|
<outputDirectory>${assembly-directory}/lib/annotations</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>copy-orbit-lib-jta-deps</id>
|
||||||
|
<phase>generate-resources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<includeGroupIds>org.eclipse.jetty.orbit</includeGroupIds>
|
||||||
|
<includeArtifactIds>javax.transaction</includeArtifactIds>
|
||||||
|
<includeTypes>jar</includeTypes>
|
||||||
|
<outputDirectory>${assembly-directory}/lib/jta</outputDirectory>
|
||||||
|
</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>
|
||||||
<execution>
|
<execution>
|
||||||
<id>copy-lib-monitor-deps</id>
|
<id>copy-lib-monitor-deps</id>
|
||||||
<phase>generate-resources</phase>
|
<phase>generate-resources</phase>
|
||||||
|
@ -293,6 +364,39 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!-- Orbit Deps -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
|
<artifactId>javax.annotation</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
|
<artifactId>org.objectweb.asm</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
|
<artifactId>javax.activation</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
|
<artifactId>javax.mail.glassfish</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
|
<artifactId>javax.transaction</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
|
<artifactId>javax.security.auth.message</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
<artifactId>jetty-jsp</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Standard Jetty Deps -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-deploy</artifactId>
|
<artifactId>jetty-deploy</artifactId>
|
||||||
|
|
|
@ -17,9 +17,8 @@
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>javax.servlet</artifactId>
|
||||||
<version>${servlet.spec.version}</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class IOTest
|
||||||
|
|
||||||
IO.copyThread(in,out);
|
IO.copyThread(in,out);
|
||||||
Thread.sleep(1500);
|
Thread.sleep(1500);
|
||||||
System.err.println(out);
|
// System.err.println(out);
|
||||||
|
|
||||||
assertEquals( "copyThread",
|
assertEquals( "copyThread",
|
||||||
out.toString(),
|
out.toString(),
|
||||||
|
@ -157,7 +157,7 @@ public class IOTest
|
||||||
|
|
||||||
// Write from server to client with oshut
|
// Write from server to client with oshut
|
||||||
server.getOutputStream().write(1);
|
server.getOutputStream().write(1);
|
||||||
System.err.println("OSHUT "+server);
|
// System.err.println("OSHUT "+server);
|
||||||
server.shutdownOutput();
|
server.shutdownOutput();
|
||||||
|
|
||||||
// Client reads response
|
// Client reads response
|
||||||
|
@ -168,19 +168,19 @@ public class IOTest
|
||||||
// Client reads -1 and does ishut
|
// Client reads -1 and does ishut
|
||||||
assertEquals(-1,client.getInputStream().read());
|
assertEquals(-1,client.getInputStream().read());
|
||||||
assertFalse(client.isInputShutdown());
|
assertFalse(client.isInputShutdown());
|
||||||
System.err.println("ISHUT "+client);
|
//System.err.println("ISHUT "+client);
|
||||||
client.shutdownInput();
|
client.shutdownInput();
|
||||||
|
|
||||||
// Client ???
|
// Client ???
|
||||||
System.err.println("OSHUT "+client);
|
//System.err.println("OSHUT "+client);
|
||||||
client.shutdownOutput();
|
client.shutdownOutput();
|
||||||
System.err.println("CLOSE "+client);
|
//System.err.println("CLOSE "+client);
|
||||||
client.close();
|
client.close();
|
||||||
|
|
||||||
// Server reads -1, does ishut and then close
|
// Server reads -1, does ishut and then close
|
||||||
assertEquals(-1,server.getInputStream().read());
|
assertEquals(-1,server.getInputStream().read());
|
||||||
assertFalse(server.isInputShutdown());
|
assertFalse(server.isInputShutdown());
|
||||||
System.err.println("ISHUT "+server);
|
//System.err.println("ISHUT "+server);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -188,9 +188,9 @@ public class IOTest
|
||||||
}
|
}
|
||||||
catch(SocketException e)
|
catch(SocketException e)
|
||||||
{
|
{
|
||||||
System.err.println(e);
|
// System.err.println(e);
|
||||||
}
|
}
|
||||||
System.err.println("CLOSE "+server);
|
//System.err.println("CLOSE "+server);
|
||||||
server.close();
|
server.close();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -222,7 +222,7 @@ public class IOTest
|
||||||
|
|
||||||
// Write from server to client with oshut
|
// Write from server to client with oshut
|
||||||
server.getOutputStream().write(1);
|
server.getOutputStream().write(1);
|
||||||
System.err.println("OSHUT "+server);
|
//System.err.println("OSHUT "+server);
|
||||||
server.shutdownOutput();
|
server.shutdownOutput();
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -255,8 +255,6 @@ public class IOTest
|
||||||
|
|
||||||
// Client can still write data even though server is closed???
|
// Client can still write data even though server is closed???
|
||||||
client.getOutputStream().write(1);
|
client.getOutputStream().write(1);
|
||||||
Thread.sleep(100);
|
|
||||||
client.getOutputStream().write(1);
|
|
||||||
|
|
||||||
// Client eventually sees Broken Pipe
|
// Client eventually sees Broken Pipe
|
||||||
int i=0;
|
int i=0;
|
||||||
|
|
|
@ -52,21 +52,6 @@
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<repositories>
|
|
||||||
<repository>
|
|
||||||
<id>repository.apache.org</id>
|
|
||||||
<name>Apache Snapshot Repository</name>
|
|
||||||
<layout>default</layout>
|
|
||||||
<url>http://repository.apache.org/content/groups/snapshots/</url>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</snapshots>
|
|
||||||
<releases>
|
|
||||||
<enabled>false</enabled>
|
|
||||||
</releases>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
@ -79,9 +64,8 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>geronimo-jaspic_1.0_spec</artifactId>
|
<artifactId>javax.security.auth.message</artifactId>
|
||||||
<version>1.0</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -64,14 +64,8 @@
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.mail</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>mail</artifactId>
|
<artifactId>javax.mail.glassfish</artifactId>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>javax.activation</groupId>
|
|
||||||
<artifactId>activation</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<profiles>
|
<profiles>
|
||||||
|
@ -82,9 +76,8 @@
|
||||||
</activation>
|
</activation>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.activation</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>activation</artifactId>
|
<artifactId>javax.activation</artifactId>
|
||||||
<version>1.1</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<parent>
|
||||||
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
<artifactId>jetty-project</artifactId>
|
||||||
|
<version>7.6.1-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>jetty-jsp</artifactId>
|
||||||
|
<name>Jetty :: JSP dependencies</name>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<build>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!-- JSP Api -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
|
<artifactId>javax.servlet.jsp</artifactId>
|
||||||
|
<version>2.1.0.v201105211820</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- JSP Impl -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
|
<artifactId>org.apache.jasper.glassfish</artifactId>
|
||||||
|
<version>2.1.0.v201110031002</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- JSTL Api -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
|
<artifactId>javax.servlet.jsp.jstl</artifactId>
|
||||||
|
<version>1.2.0.v201105211821</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- JSTL Impl -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
|
<artifactId>org.apache.taglibs.standard.glassfish</artifactId>
|
||||||
|
<version>1.2.0.v201112081803</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- EL Api -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
|
<artifactId>javax.el</artifactId>
|
||||||
|
<version>2.1.0.v201105211819</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- EL Impl -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
|
<artifactId>com.sun.el</artifactId>
|
||||||
|
<version>1.0.0.v201105211818</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- Eclipse Java Compiler (for JSP Compilation) -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
|
<artifactId>org.eclipse.jdt.core</artifactId>
|
||||||
|
<version>3.7.1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
|
@ -0,0 +1,4 @@
|
||||||
|
This jar file is purely to work around a problem with the Maven Dependency plugin.
|
||||||
|
Several modules in jetty use the Dependency plugin to copy or unpack the dependencies of other modules.
|
||||||
|
However, the Dependency plugin is not capable of unpacking or copying a dependency of type 'pom', which
|
||||||
|
this module is, as it consists purely of external dependencies needed to run jsp.
|
|
@ -8,8 +8,6 @@
|
||||||
<artifactId>jetty-nosql</artifactId>
|
<artifactId>jetty-nosql</artifactId>
|
||||||
<name>Jetty :: NoSQL Session Managers</name>
|
<name>Jetty :: NoSQL Session Managers</name>
|
||||||
<properties>
|
<properties>
|
||||||
<jetty-version>${project.version}</jetty-version>
|
|
||||||
<junit4-version>${junit-version}</junit4-version>
|
|
||||||
<bundle-symbolic-name>${project.groupId}.nosql</bundle-symbolic-name>
|
<bundle-symbolic-name>${project.groupId}.nosql</bundle-symbolic-name>
|
||||||
</properties>
|
</properties>
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -28,8 +28,6 @@ import org.eclipse.jetty.nosql.NoSqlSessionManager;
|
||||||
import org.eclipse.jetty.server.SessionIdManager;
|
import org.eclipse.jetty.server.SessionIdManager;
|
||||||
import org.eclipse.jetty.util.log.Log;
|
import org.eclipse.jetty.util.log.Log;
|
||||||
import org.eclipse.jetty.util.log.Logger;
|
import org.eclipse.jetty.util.log.Logger;
|
||||||
import org.eclipse.jetty.util.log.Logger;
|
|
||||||
import org.omg.CORBA._IDLTypeStub;
|
|
||||||
|
|
||||||
import com.mongodb.BasicDBObject;
|
import com.mongodb.BasicDBObject;
|
||||||
import com.mongodb.DBCollection;
|
import com.mongodb.DBCollection;
|
||||||
|
@ -421,7 +419,7 @@ public class MongoSessionManager extends NoSqlSessionManager
|
||||||
o = null;
|
o = null;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
o.append(encodeName(entry.getKey().toString()),encodeName(out,bout,value));
|
o.append(encodeName(entry.getKey().toString()),encodeName(out,bout,entry.getValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (o != null)
|
if (o != null)
|
||||||
|
|
|
@ -24,48 +24,25 @@
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.osgi</groupId>
|
<groupId>org.eclipse.osgi</groupId>
|
||||||
<artifactId>org.eclipse.osgi</artifactId>
|
<artifactId>org.eclipse.osgi</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.osgi</groupId>
|
<groupId>org.eclipse.osgi</groupId>
|
||||||
<artifactId>org.eclipse.osgi.services</artifactId>
|
<artifactId>org.eclipse.osgi.services</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- switch to 2.2 once it works in OSGi for us
|
<!-- Orbit Servlet Deps -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.glassfish.web</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>jsp-impl</artifactId>
|
<artifactId>javax.servlet</artifactId>
|
||||||
<version>2.2</version>
|
|
||||||
</dependency> -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.mortbay.jetty</groupId>
|
|
||||||
<artifactId>jsp-2.1-glassfish</artifactId>
|
|
||||||
<version>2.1.v20100127</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--dependency>
|
<!-- Orbit JSP Deps -->
|
||||||
<groupId>javax.servlet.jsp</groupId>
|
|
||||||
<artifactId>jsp-api</artifactId>
|
|
||||||
<version>2.2</version>
|
|
||||||
</dependency-->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.el</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>el-api</artifactId>
|
<artifactId>jetty-jsp</artifactId>
|
||||||
<version>2.2</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<!-- can't find the jsp-2.2 jars on maven central.
|
|
||||||
adding glassifish maven repo for now. -->
|
|
||||||
<repositories>
|
|
||||||
<repository>
|
|
||||||
<id>sun</id>
|
|
||||||
<url>http://download.java.net/maven/2/</url>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
|
||||||
|
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
@ -117,6 +94,4 @@
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -30,8 +30,8 @@
|
||||||
<artifactId>org.eclipse.osgi</artifactId>
|
<artifactId>org.eclipse.osgi</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>javax.servlet</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
<osgi-services-version>3.2.100.v20100503</osgi-services-version>
|
<osgi-services-version>3.2.100.v20100503</osgi-services-version>
|
||||||
<equinox-http-servlet-version>1.0.0-v20070606</equinox-http-servlet-version>
|
<equinox-http-servlet-version>1.0.0-v20070606</equinox-http-servlet-version>
|
||||||
<!--equinox-servletbridge-version>1.0.0-v20070523</equinox-servletbridge-version-->
|
<!--equinox-servletbridge-version>1.0.0-v20070523</equinox-servletbridge-version-->
|
||||||
<jsp-api-2.2-tomcat-version>7.0.8</jsp-api-2.2-tomcat-version>
|
<jsp-2.1-glassfish-version>2.1.v20100127</jsp-2.1-glassfish-version>
|
||||||
<el-api-2.2-tomcat-version>7.0.8</el-api-2.2-tomcat-version>
|
|
||||||
<logback-version>0.9.18</logback-version>
|
<logback-version>0.9.18</logback-version>
|
||||||
<slf4j-version>1.5.11</slf4j-version>
|
<slf4j-version>1.5.11</slf4j-version>
|
||||||
</properties>
|
</properties>
|
||||||
|
@ -148,14 +147,14 @@
|
||||||
<version>${jsp-impl-2.2-glassfish-version}</version>
|
<version>${jsp-impl-2.2-glassfish-version}</version>
|
||||||
</dependency-->
|
</dependency-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.tomcat</groupId>
|
<groupId>org.mortbay.jetty</groupId>
|
||||||
<artifactId>tomcat-jsp-api</artifactId>
|
<artifactId>jsp-2.1-glassfish</artifactId>
|
||||||
<version>${jsp-api-2.2-tomcat-version}</version>
|
<version>${jsp-2.1-glassfish-version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.tomcat</groupId>
|
<groupId>org.mortbay.jetty</groupId>
|
||||||
<artifactId>tomcat-el-api</artifactId>
|
<artifactId>jsp-api-2.1-glassfish</artifactId>
|
||||||
<version>${el-api-2.2-tomcat-version}</version>
|
<version>${jsp-2.1-glassfish-version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
|
|
|
@ -11,23 +11,25 @@
|
||||||
<description>Jetty OSGi Integration test</description>
|
<description>Jetty OSGi Integration test</description>
|
||||||
<properties>
|
<properties>
|
||||||
<bundle-symbolic-name>${project.groupId}.boot.test</bundle-symbolic-name>
|
<bundle-symbolic-name>${project.groupId}.boot.test</bundle-symbolic-name>
|
||||||
<jetty-orbit-url>http://download.eclipse.org/jetty/orbit</jetty-orbit-url>
|
<jetty-orbit-url>http://download.eclipse.org/jetty/orbit/</jetty-orbit-url>
|
||||||
<assembly-directory>target/distribution</assembly-directory>
|
<assembly-directory>target/distribution</assembly-directory>
|
||||||
<eclipse-ecj-version>3.6</eclipse-ecj-version>
|
<paxexam-version>1.2.0</paxexam-version>
|
||||||
<orbit-javax-activation-version>${javax-activation-version}.0.v201005080500</orbit-javax-activation-version>
|
|
||||||
<orbit-javax-annotation-version>1.1.0.v201105051105</orbit-javax-annotation-version>
|
|
||||||
<orbit-javax-el-version>2.2.0.v201105051105</orbit-javax-el-version>
|
|
||||||
<orbit-javax-mail-glassfish-version>${javax-mail-version}.v201005082020</orbit-javax-mail-glassfish-version>
|
|
||||||
<orbit-javax-servlet-version>3.0.0.v201112011016</orbit-javax-servlet-version>
|
|
||||||
<orbit-javax-servlet-jsp-version>2.2.0.v201112011158</orbit-javax-servlet-jsp-version>
|
|
||||||
<orbit-javax-servlet-jsp-jstl-version>1.2.0.v201105211821</orbit-javax-servlet-jsp-jstl-version>
|
|
||||||
<orbit-com-sun-el-version>2.2.0.v201108011116</orbit-com-sun-el-version>
|
|
||||||
<orbit-org-apache-jasper-version>2.2.2.v201112011158</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.3.1.v201101071600</orbit-org-objectweb-asm-version>
|
|
||||||
<orbit-javax-transaction-version>1.1.1.v201004190952</orbit-javax-transaction-version>
|
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!-- Orbit Servlet Deps -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
|
<artifactId>javax.servlet</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Orbit JSP Deps -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
<artifactId>jetty-jsp</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- OSGi Deps -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty.osgi</groupId>
|
<groupId>org.eclipse.jetty.osgi</groupId>
|
||||||
<artifactId>jetty-osgi-boot</artifactId>
|
<artifactId>jetty-osgi-boot</artifactId>
|
||||||
|
@ -46,6 +48,8 @@
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Jetty Deps -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-webapp</artifactId>
|
<artifactId>jetty-webapp</artifactId>
|
||||||
|
@ -67,6 +71,11 @@
|
||||||
<artifactId>jetty-servlet</artifactId>
|
<artifactId>jetty-servlet</artifactId>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
<artifactId>jetty-servlets</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-xml</artifactId>
|
<artifactId>jetty-xml</artifactId>
|
||||||
|
@ -94,23 +103,16 @@
|
||||||
<artifactId>jetty-websocket</artifactId>
|
<artifactId>jetty-websocket</artifactId>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</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>
|
<dependency>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>org.eclipse.osgi</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>org.eclipse.osgi</artifactId>
|
||||||
<version>${servlet.spec.version}</version>
|
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.osgi</groupId>
|
|
||||||
<artifactId>org.eclipse.osgi</artifactId>
|
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.osgi</groupId>
|
<groupId>org.eclipse.osgi</groupId>
|
||||||
<artifactId>org.eclipse.osgi.services</artifactId>
|
<artifactId>org.eclipse.osgi.services</artifactId>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -118,11 +120,6 @@
|
||||||
<artifactId>servlet</artifactId>
|
<artifactId>servlet</artifactId>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-servlets</artifactId>
|
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
@ -135,19 +132,19 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.ops4j.pax.exam</groupId>
|
<groupId>org.ops4j.pax.exam</groupId>
|
||||||
<artifactId>pax-exam</artifactId>
|
<artifactId>pax-exam</artifactId>
|
||||||
<version>1.2.0</version>
|
<version>${paxexam-version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.ops4j.pax.exam</groupId>
|
<groupId>org.ops4j.pax.exam</groupId>
|
||||||
<artifactId>pax-exam-junit</artifactId>
|
<artifactId>pax-exam-junit</artifactId>
|
||||||
<version>1.2.0</version>
|
<version>${paxexam-version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.ops4j.pax.exam</groupId>
|
<groupId>org.ops4j.pax.exam</groupId>
|
||||||
<artifactId>pax-exam-container-default</artifactId>
|
<artifactId>pax-exam-container-default</artifactId>
|
||||||
<version>1.2.0</version>
|
<version>${paxexam-version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -160,93 +157,77 @@
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.ops4j.pax.exam</groupId>
|
<groupId>org.ops4j.pax.exam</groupId>
|
||||||
<artifactId>maven-paxexam-plugin</artifactId>
|
<artifactId>maven-paxexam-plugin</artifactId>
|
||||||
<version>1.2.0</version>
|
<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>
|
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<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>
|
<phase>generate-resources</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>run</goal>
|
<goal>copy</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<tasks>
|
<artifactItems>
|
||||||
<!-- This is the Orbit Downloads Process -->
|
<artifactItem>
|
||||||
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<!-- Step 1: download orbit artifact into orbit-cache (if not present) -->
|
<artifactId>javax.servlet</artifactId>
|
||||||
<property name="orbit-cache" value="${user.home}/.m2/eclipse-orbit" />
|
<version>${orbit-servlet-api-version}</version>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
<mkdir dir="${orbit-cache}" />
|
<outputDirectory>${assembly-directory}/lib</outputDirectory>
|
||||||
<get dest="${orbit-cache}" verbose="true" skipexisting="true">
|
<destFileName>servlet-api-2.5.jar</destFileName>
|
||||||
<url url="${jetty-orbit-url}/javax.servlet_${orbit-javax-servlet-version}.jar" />
|
</artifactItem>
|
||||||
<url url="${jetty-orbit-url}/javax.activation_${orbit-javax-activation-version}.jar" />
|
</artifactItems>
|
||||||
<url url="${jetty-orbit-url}/javax.mail.glassfish_${orbit-javax-mail-glassfish-version}.jar" />
|
</configuration>
|
||||||
<url url="${jetty-orbit-url}/javax.el_${orbit-javax-el-version}.jar" />
|
</execution>
|
||||||
<url url="${jetty-orbit-url}/javax.servlet.jsp_${orbit-javax-servlet-jsp-version}.jar" />
|
<execution>
|
||||||
<url url="${jetty-orbit-url}/javax.servlet.jsp.jstl_${orbit-javax-servlet-jsp-jstl-version}.jar" />
|
<id>copy-orbit-lib-jndi-deps</id>
|
||||||
<url url="${jetty-orbit-url}/com.sun.el_${orbit-com-sun-el-version}.jar" />
|
<phase>generate-resources</phase>
|
||||||
<url url="${jetty-orbit-url}/org.apache.jasper.glassfish_${orbit-org-apache-jasper-version}.jar" />
|
<goals>
|
||||||
<url url="${jetty-orbit-url}/org.apache.taglibs.standard.glassfish_${orbit-org-apache-taglibs-standard-version}.jar" />
|
<goal>copy-dependencies</goal>
|
||||||
<url url="${jetty-orbit-url}/ecj-${eclipse-ecj-version}.jar" />
|
</goals>
|
||||||
</get>
|
<configuration>
|
||||||
|
<includeGroupIds>org.eclipse.jetty.orbit</includeGroupIds>
|
||||||
<!-- Step 2: copy the orbit artifact from orbit-cache to the appropriate lib directory -->
|
<includeArtifactIds>javax.mail.glassfish,javax.activation</includeArtifactIds>
|
||||||
|
<includeTypes>jar</includeTypes>
|
||||||
<!-- ${jetty.home}/lib/ -->
|
<outputDirectory>${assembly-directory}/lib/jndi</outputDirectory>
|
||||||
<mkdir dir="${assembly-directory}/lib" />
|
</configuration>
|
||||||
<copy file="${orbit-cache}/javax.servlet_${orbit-javax-servlet-version}.jar" tofile="${assembly-directory}/lib/servlet-api-3.0.jar" />
|
</execution>
|
||||||
|
<execution>
|
||||||
<!-- ${jetty.home}/lib/jndi/ -->
|
<id>copy-orbit-lib-jsp-deps</id>
|
||||||
<mkdir dir="${assembly-directory}/lib/jndi" />
|
<phase>generate-resources</phase>
|
||||||
<copy todir="${assembly-directory}/lib/jndi">
|
<goals>
|
||||||
<fileset dir="${orbit-cache}">
|
<goal>copy-dependencies</goal>
|
||||||
<include name="javax.activation_${orbit-javax-activation-version}.jar" />
|
</goals>
|
||||||
<include name="javax.mail.glassfish_${orbit-javax-mail-glassfish-version}.jar" />
|
<configuration>
|
||||||
</fileset>
|
<includeGroupIds>org.eclipse.jetty.orbit</includeGroupIds>
|
||||||
</copy>
|
<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>
|
||||||
<!-- ${jetty.home}/lib/jsp/ -->
|
<outputDirectory>${assembly-directory}/lib/jsp</outputDirectory>
|
||||||
<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>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-eclipse-plugin</artifactId>
|
<artifactId>maven-eclipse-plugin</artifactId>
|
||||||
|
@ -260,7 +241,6 @@
|
||||||
</sourceExcludes>
|
</sourceExcludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
package org.eclipse.jetty.osgi.boot;
|
package org.eclipse.jetty.osgi.boot;
|
||||||
|
|
||||||
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
|
import static org.ops4j.pax.exam.CoreOptions.*;
|
||||||
import static org.ops4j.pax.exam.CoreOptions.options;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -61,17 +60,18 @@ public class TestJettyOSGiBootCore
|
||||||
* Jetty-osgi including webapp support and also jetty-client.
|
* Jetty-osgi including webapp support and also jetty-client.
|
||||||
* Sets the system property jetty.home.bunde=org.eclipse.jetty.osgi.boot
|
* Sets the system property jetty.home.bunde=org.eclipse.jetty.osgi.boot
|
||||||
* to use the jetty server configuration embedded in
|
* to use the jetty server configuration embedded in
|
||||||
* @return
|
*
|
||||||
|
* @return list of options
|
||||||
*/
|
*/
|
||||||
public static List<Option> provisionCoreJetty()
|
public static List<Option> provisionCoreJetty()
|
||||||
{
|
{
|
||||||
return Arrays.asList(options(
|
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"),
|
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" ).versionAsInProject().noStart(),
|
||||||
mavenBundle().groupId( "org.eclipse.osgi" ).artifactId( "org.eclipse.osgi.services" ).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-io" ).versionAsInProject().noStart(),
|
||||||
mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-continuation" ).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-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()
|
mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-client" ).versionAsInProject().noStart()
|
||||||
));
|
));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
@ -154,6 +155,7 @@ public class TestJettyOSGiBootCore
|
||||||
HttpService http = (HttpService)bundleContext.getService(sr);
|
HttpService http = (HttpService)bundleContext.getService(sr);
|
||||||
http.registerServlet("/greetings", new HttpServlet() {
|
http.registerServlet("/greetings", new HttpServlet() {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
@Override
|
||||||
protected void doGet(HttpServletRequest req,
|
protected void doGet(HttpServletRequest req,
|
||||||
HttpServletResponse resp) throws ServletException,
|
HttpServletResponse resp) throws ServletException,
|
||||||
IOException {
|
IOException {
|
||||||
|
|
|
@ -14,10 +14,7 @@
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
package org.eclipse.jetty.osgi.boot;
|
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 static org.ops4j.pax.exam.CoreOptions.*;
|
||||||
import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.*;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -32,9 +29,9 @@ import org.eclipse.jetty.client.HttpClient;
|
||||||
import org.eclipse.jetty.client.HttpExchange;
|
import org.eclipse.jetty.client.HttpExchange;
|
||||||
import org.eclipse.jetty.http.HttpMethods;
|
import org.eclipse.jetty.http.HttpMethods;
|
||||||
import org.eclipse.jetty.http.HttpStatus;
|
import org.eclipse.jetty.http.HttpStatus;
|
||||||
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.ops4j.pax.exam.CoreOptions;
|
|
||||||
import org.ops4j.pax.exam.Inject;
|
import org.ops4j.pax.exam.Inject;
|
||||||
import org.ops4j.pax.exam.Option;
|
import org.ops4j.pax.exam.Option;
|
||||||
import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
|
import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
|
||||||
|
@ -50,10 +47,12 @@ import org.osgi.framework.BundleContext;
|
||||||
@RunWith( JUnit4TestRunner.class )
|
@RunWith( JUnit4TestRunner.class )
|
||||||
public class TestJettyOSGiBootWithJsp
|
public class TestJettyOSGiBootWithJsp
|
||||||
{
|
{
|
||||||
|
private static final boolean LOGGING_ENABLED = false;
|
||||||
|
private static final boolean REMOTE_DEBUGGING = false;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
BundleContext bundleContext = null;
|
BundleContext bundleContext = null;
|
||||||
|
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public static Option[] configure()
|
public static Option[] configure()
|
||||||
{
|
{
|
||||||
|
@ -61,33 +60,48 @@ public class TestJettyOSGiBootWithJsp
|
||||||
|
|
||||||
ArrayList<Option> options = new ArrayList<Option>();
|
ArrayList<Option> options = new ArrayList<Option>();
|
||||||
options.addAll(TestJettyOSGiBootCore.provisionCoreJetty());
|
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(
|
options.addAll(Arrays.asList(options(
|
||||||
//workaround: for some reason, despite the fact that everyone of those packages is imported by the jsp fragment
|
PaxRunnerOptions.vmOption("-Djetty.port=9876 -D" + OSGiServerConstants.MANAGED_JETTY_XML_CONFIG_URLS +
|
||||||
//felix complains that it cannot find them
|
"=etc/jetty.xml;" + testrealm.getAbsolutePath()),
|
||||||
bootDelegationPackages("org.xml.sax", "org.xml.sax.helpers", "javax.xml.parsers", "org.w3c.dom", "javax.xml.transform", "org.w3c.dom.ls"),
|
|
||||||
|
|
||||||
// install log service using pax runners profile abstraction (there are more profiles, like DS)
|
/* orbit deps */
|
||||||
//logProfile(),
|
mavenBundle().groupId( "org.eclipse.jetty.orbit" ).artifactId( "javax.servlet.jsp" ).versionAsInProject(),
|
||||||
// this is how you set the default log level when using pax logging (logProfile)
|
mavenBundle().groupId( "org.eclipse.jetty.orbit" ).artifactId( "javax.servlet.jsp.jstl" ).versionAsInProject(),
|
||||||
//systemProperty( "org.ops4j.pax.logging.DefaultServiceLog.level" ).value( "INFO" ),
|
mavenBundle().groupId( "org.eclipse.jetty.orbit" ).artifactId( "javax.el" ).versionAsInProject(),
|
||||||
|
mavenBundle().groupId( "org.eclipse.jetty.orbit" ).artifactId( "com.sun.el" ).versionAsInProject(),
|
||||||
// this just adds all what you write here to java vm argumenents of the (new) osgi process.
|
mavenBundle().groupId( "org.eclipse.jetty.orbit" ).artifactId( "org.apache.jasper.glassfish" ).versionAsInProject(),
|
||||||
//PaxRunnerOptions.vmOption( "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006" ),
|
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(),
|
||||||
PaxRunnerOptions.vmOption("-Djetty.port=9876 -D" + OSGiServerConstants.MANAGED_JETTY_XML_CONFIG_URLS +
|
|
||||||
"=etc/jetty.xml;" + testrealm.getAbsolutePath()),
|
/* 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" ).versionAsInProject(),
|
mavenBundle().groupId( "org.eclipse.jetty.osgi" ).artifactId( "jetty-osgi-boot-jsp" ).versionAsInProject().start(),
|
||||||
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" ) )
|
|
||||||
|
|
||||||
|
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()]);
|
return options.toArray(new Option[options.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,6 +110,7 @@ public class TestJettyOSGiBootWithJsp
|
||||||
* plus your testcase, wrapped into a bundle called pax-exam-probe
|
* plus your testcase, wrapped into a bundle called pax-exam-probe
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
|
@Ignore
|
||||||
public void listBundles() throws Exception
|
public void listBundles() throws Exception
|
||||||
{
|
{
|
||||||
Map<String,Bundle> bundlesIndexedBySymbolicName = new HashMap<String, Bundle>();
|
Map<String,Bundle> bundlesIndexedBySymbolicName = new HashMap<String, Bundle>();
|
||||||
|
|
|
@ -48,9 +48,8 @@
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.transaction</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>jta</artifactId>
|
<artifactId>javax.transaction</artifactId>
|
||||||
<version>1.1</version>
|
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -88,8 +88,8 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>geronimo-jta_1.1_spec</artifactId>
|
<artifactId>javax.transaction</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
<artifactItem>
|
<artifactItem>
|
||||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||||
<artifactId>jetty-test-policy</artifactId>
|
<artifactId>jetty-test-policy</artifactId>
|
||||||
<version>${jetty.test.policy}</version>
|
<version>${jetty-test-policy-version}</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<overWrite>true</overWrite>
|
<overWrite>true</overWrite>
|
||||||
<includes>**/*.keystore</includes>
|
<includes>**/*.keystore</includes>
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
<artifactItem>
|
<artifactItem>
|
||||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||||
<artifactId>jetty-test-policy</artifactId>
|
<artifactId>jetty-test-policy</artifactId>
|
||||||
<version>${jetty.test.policy}</version>
|
<version>${jetty-test-policy-version}</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<overWrite>true</overWrite>
|
<overWrite>true</overWrite>
|
||||||
<includes>**</includes>
|
<includes>**</includes>
|
||||||
|
|
|
@ -84,6 +84,10 @@
|
||||||
<artifactId>jetty-client</artifactId>
|
<artifactId>jetty-client</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
|
<artifactId>javax.servlet</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>test-jetty-servlet</artifactId>
|
<artifactId>test-jetty-servlet</artifactId>
|
||||||
|
|
|
@ -23,10 +23,13 @@ import org.eclipse.jetty.server.Request;
|
||||||
/**
|
/**
|
||||||
* Rewrite the URI by matching with a regular expression.
|
* Rewrite the URI by matching with a regular expression.
|
||||||
* The replacement string may use $n" to replace the nth capture group.
|
* The replacement string may use $n" to replace the nth capture group.
|
||||||
|
* If the replacement string contains ? character, then it is split into a path
|
||||||
|
* and query string component. The returned target contains only the path.
|
||||||
*/
|
*/
|
||||||
public class RewriteRegexRule extends RegexRule implements Rule.ApplyURI
|
public class RewriteRegexRule extends RegexRule implements Rule.ApplyURI
|
||||||
{
|
{
|
||||||
private String _replacement;
|
private String _replacement;
|
||||||
|
private String _query;
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
public RewriteRegexRule()
|
public RewriteRegexRule()
|
||||||
|
@ -43,7 +46,9 @@ public class RewriteRegexRule extends RegexRule implements Rule.ApplyURI
|
||||||
*/
|
*/
|
||||||
public void setReplacement(String replacement)
|
public void setReplacement(String replacement)
|
||||||
{
|
{
|
||||||
_replacement = replacement;
|
String[] split=replacement.split("\\?",2);
|
||||||
|
_replacement = split[0];
|
||||||
|
_query=split.length==2?split[1]:null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,32 +59,36 @@ public class RewriteRegexRule extends RegexRule implements Rule.ApplyURI
|
||||||
public String apply(String target, HttpServletRequest request, HttpServletResponse response, Matcher matcher) throws IOException
|
public String apply(String target, HttpServletRequest request, HttpServletResponse response, Matcher matcher) throws IOException
|
||||||
{
|
{
|
||||||
target=_replacement;
|
target=_replacement;
|
||||||
|
String query=_query;
|
||||||
for (int g=1;g<=matcher.groupCount();g++)
|
for (int g=1;g<=matcher.groupCount();g++)
|
||||||
{
|
{
|
||||||
String group = Matcher.quoteReplacement(matcher.group(g));
|
String group=matcher.group(g);
|
||||||
|
if (group==null)
|
||||||
|
group="";
|
||||||
|
else
|
||||||
|
group = Matcher.quoteReplacement(group);
|
||||||
target=target.replaceAll("\\$"+g,group);
|
target=target.replaceAll("\\$"+g,group);
|
||||||
|
if (query!=null)
|
||||||
|
query=query.replaceAll("\\$"+g,group);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (query!=null)
|
||||||
|
request.setAttribute("org.eclipse.jetty.rewrite.handler.RewriteRegexRule.Q",query);
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
public void applyURI(Request request, String oldTarget, String newTarget) throws IOException
|
public void applyURI(Request request, String oldTarget, String newTarget) throws IOException
|
||||||
{
|
{
|
||||||
Matcher matcher=_regex.matcher(request.getRequestURI());
|
request.setRequestURI(newTarget);
|
||||||
boolean matches = matcher.matches();
|
if (_query!=null)
|
||||||
if (matches)
|
|
||||||
{
|
{
|
||||||
String uri=_replacement;
|
String query=(String)request.getAttribute("org.eclipse.jetty.rewrite.handler.RewriteRegexRule.Q");
|
||||||
for (int g=1;g<=matcher.groupCount();g++)
|
if (request.getQueryString()==null)
|
||||||
{
|
request.setQueryString(query);
|
||||||
String group = Matcher.quoteReplacement(matcher.group(g));
|
else
|
||||||
uri=uri.replaceAll("\\$"+g,group);
|
request.setQueryString(request.getQueryString()+"&"+query);
|
||||||
}
|
|
||||||
request.setRequestURI(uri);
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
request.setRequestURI(newTarget);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
|
|
|
@ -23,11 +23,13 @@ public class RewriteRegexRuleTest extends AbstractRuleTestCase
|
||||||
{
|
{
|
||||||
private String[][] _tests=
|
private String[][] _tests=
|
||||||
{
|
{
|
||||||
{"/foo/bar",".*","/replace","/replace"},
|
{"/foo/bar",".*","/replace","/replace",null},
|
||||||
{"/foo/bar","/xxx.*","/replace",null},
|
{"/foo/bar","/xxx.*","/replace",null,null},
|
||||||
{"/foo/bar","/(.*)/(.*)","/$2/$1/xxx","/bar/foo/xxx"},
|
{"/foo/bar","/(.*)/(.*)","/$2/$1/xxx","/bar/foo/xxx",null},
|
||||||
{"/foo/$bar",".*","/$replace","/$replace"},
|
{"/foo/bar","/(foo)/(.*)(bar)","/$3/$1/xxx$2","/bar/foo/xxx",null},
|
||||||
{"/foo/$bar","/foo/(.*)","/$1/replace","/$bar/replace"},
|
{"/foo/$bar",".*","/$replace","/$replace",null},
|
||||||
|
{"/foo/$bar","/foo/(.*)","/$1/replace","/$bar/replace",null},
|
||||||
|
{"/foo/bar/info","/foo/(NotHere)?([^/]*)/(.*)","/$3/other?p1=$2","/info/other","p1=bar"},
|
||||||
};
|
};
|
||||||
private RewriteRegexRule _rule;
|
private RewriteRegexRule _rule;
|
||||||
|
|
||||||
|
@ -47,6 +49,13 @@ public class RewriteRegexRuleTest extends AbstractRuleTestCase
|
||||||
_rule.setReplacement(test[2]);
|
_rule.setReplacement(test[2]);
|
||||||
String result = _rule.matchAndApply(test[0], _request, _response);
|
String result = _rule.matchAndApply(test[0], _request, _response);
|
||||||
assertEquals(test[1], test[3], result);
|
assertEquals(test[1], test[3], result);
|
||||||
|
|
||||||
|
_request.setRequestURI(test[0]);
|
||||||
|
_request.setQueryString(null);
|
||||||
|
_rule.applyURI(_request,test[0],result);
|
||||||
|
|
||||||
|
assertEquals(test[3], _request.getRequestURI());
|
||||||
|
assertEquals(test[4], _request.getQueryString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
<artifactId>jetty-server</artifactId>
|
<artifactId>jetty-server</artifactId>
|
||||||
<name>Jetty :: Server Core</name>
|
<name>Jetty :: Server Core</name>
|
||||||
<description>The core jetty server artifact.</description>
|
<description>The core jetty server artifact.</description>
|
||||||
<url>${jetty.url}</url>
|
|
||||||
<properties>
|
<properties>
|
||||||
<bundle-symbolic-name>${project.groupId}.server</bundle-symbolic-name>
|
<bundle-symbolic-name>${project.groupId}.server</bundle-symbolic-name>
|
||||||
</properties>
|
</properties>
|
||||||
|
@ -88,14 +87,9 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>javax.servlet</artifactId>
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-continuation</artifactId>
|
<artifactId>jetty-continuation</artifactId>
|
||||||
|
@ -113,9 +107,9 @@
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mockito</groupId>
|
<groupId>org.mockito</groupId>
|
||||||
<artifactId>mockito-core</artifactId>
|
<artifactId>mockito-core</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -84,11 +84,11 @@
|
||||||
<artifactId>jetty-util</artifactId>
|
<artifactId>jetty-util</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>javax.servlet</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>test-jetty-servlet</artifactId>
|
<artifactId>test-jetty-servlet</artifactId>
|
||||||
|
|
|
@ -170,6 +170,7 @@ public abstract class AbstractDoSFilterTest
|
||||||
{
|
{
|
||||||
Thread other = new Thread()
|
Thread other = new Thread()
|
||||||
{
|
{
|
||||||
|
@Override
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -205,6 +206,7 @@ public abstract class AbstractDoSFilterTest
|
||||||
{
|
{
|
||||||
Thread other = new Thread()
|
Thread other = new Thread()
|
||||||
{
|
{
|
||||||
|
@Override
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -283,11 +285,11 @@ public abstract class AbstractDoSFilterTest
|
||||||
assertEquals(0,count(responses,"DoSFilter: delayed"));
|
assertEquals(0,count(responses,"DoSFilter: delayed"));
|
||||||
|
|
||||||
// alternate between sessions
|
// alternate between sessions
|
||||||
responses = doRequests(request1+request2+request1+request2+request1,2,550,550,last);
|
responses = doRequests(request1+request2+request1+request2+request1,2,350,550,last);
|
||||||
|
|
||||||
assertEquals(11,count(responses,"HTTP/1.1 200 OK"));
|
assertEquals(11,count(responses,"HTTP/1.1 200 OK"));
|
||||||
int delayedRequests = count(responses,"DoSFilter: delayed");
|
int delayedRequests = count(responses,"DoSFilter: delayed");
|
||||||
assertTrue(delayedRequests >= 2 && delayedRequests <= 3);
|
assertTrue("delayedRequests: " + delayedRequests + " is not between 2 and 3",delayedRequests >= 2 && delayedRequests <= 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -305,6 +307,7 @@ public abstract class AbstractDoSFilterTest
|
||||||
|
|
||||||
public static class TestServlet extends HttpServlet implements Servlet
|
public static class TestServlet extends HttpServlet implements Servlet
|
||||||
{
|
{
|
||||||
|
@Override
|
||||||
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
|
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
|
||||||
{
|
{
|
||||||
if (request.getParameter("session")!=null)
|
if (request.getParameter("session")!=null)
|
||||||
|
|
|
@ -14,12 +14,17 @@
|
||||||
|
|
||||||
package org.eclipse.jetty.servlets;
|
package org.eclipse.jetty.servlets;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertFalse;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.eclipse.jetty.servlets.DoSFilter.RateTracker;
|
||||||
import org.eclipse.jetty.util.log.Log;
|
import org.eclipse.jetty.util.log.Log;
|
||||||
import org.eclipse.jetty.util.log.Logger;
|
import org.eclipse.jetty.util.log.Logger;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
public class DoSFilterTest extends AbstractDoSFilterTest
|
public class DoSFilterTest extends AbstractDoSFilterTest
|
||||||
{
|
{
|
||||||
|
@ -33,6 +38,7 @@ public class DoSFilterTest extends AbstractDoSFilterTest
|
||||||
|
|
||||||
public static class DoSFilter2 extends DoSFilter
|
public static class DoSFilter2 extends DoSFilter
|
||||||
{
|
{
|
||||||
|
@Override
|
||||||
public void closeConnection(HttpServletRequest request, HttpServletResponse response, Thread thread)
|
public void closeConnection(HttpServletRequest request, HttpServletResponse response, Thread thread)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -46,4 +52,31 @@ public class DoSFilterTest extends AbstractDoSFilterTest
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void isRateExceededTest() throws InterruptedException
|
||||||
|
{
|
||||||
|
DoSFilter doSFilter = new DoSFilter();
|
||||||
|
|
||||||
|
boolean exceeded = hitRateTracker(doSFilter,0);
|
||||||
|
assertTrue("Last hit should have exceeded",exceeded);
|
||||||
|
|
||||||
|
int sleep = 250;
|
||||||
|
exceeded = hitRateTracker(doSFilter,sleep);
|
||||||
|
assertFalse("Should not exceed as we sleep 300s for each hit and thus do less than 4 hits/s",exceeded);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean hitRateTracker(DoSFilter doSFilter, int sleep) throws InterruptedException
|
||||||
|
{
|
||||||
|
boolean exceeded = false;
|
||||||
|
RateTracker rateTracker = doSFilter.new RateTracker("test2",0,4);
|
||||||
|
|
||||||
|
for (int i = 0; i < 5; i++)
|
||||||
|
{
|
||||||
|
Thread.sleep(sleep);
|
||||||
|
if (rateTracker.isRateExceeded(System.currentTimeMillis()))
|
||||||
|
exceeded = true;
|
||||||
|
}
|
||||||
|
return exceeded;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,124 @@
|
||||||
|
package org.eclipse.jetty.start;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class CommandLineBuilder
|
||||||
|
{
|
||||||
|
private List<String> args;
|
||||||
|
|
||||||
|
public CommandLineBuilder(String bin)
|
||||||
|
{
|
||||||
|
args = new ArrayList<String>();
|
||||||
|
args.add(bin);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a simple argument to the command line.
|
||||||
|
* <p>
|
||||||
|
* Will quote arguments that have a space in them.
|
||||||
|
*
|
||||||
|
* @param arg
|
||||||
|
* the simple argument to add
|
||||||
|
*/
|
||||||
|
public void addArg(String arg)
|
||||||
|
{
|
||||||
|
args.add(quote(arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Similar to {@link #addArg(String)} but concats both name + value with an "=" sign, quoting were needed, and excluding the "=" portion if the value is
|
||||||
|
* undefined or empty.
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* addEqualsArg("-Dname", "value") = "-Dname=value"
|
||||||
|
* addEqualsArg("-Djetty.home", "/opt/company inc/jetty (7)/") = "-Djetty.home=/opt/company\ inc/jetty\ (7)/"
|
||||||
|
* addEqualsArg("-Djenkins.workspace", "/opt/workspaces/jetty jdk7/") = "-Djenkins.workspace=/opt/workspaces/jetty\ jdk7/"
|
||||||
|
* addEqualsArg("-Dstress", null) = "-Dstress"
|
||||||
|
* addEqualsArg("-Dstress", "") = "-Dstress"
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @param name
|
||||||
|
* the name
|
||||||
|
* @param value
|
||||||
|
* the value
|
||||||
|
*/
|
||||||
|
public void addEqualsArg(String name, String value)
|
||||||
|
{
|
||||||
|
if (value != null && value.length() > 0)
|
||||||
|
{
|
||||||
|
args.add(quote(name + "=" + value));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
args.add(quote(name));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a simple argument to the command line.
|
||||||
|
* <p>
|
||||||
|
* Will <b>NOT</b> quote/escape arguments that have a space in them.
|
||||||
|
*
|
||||||
|
* @param arg
|
||||||
|
* the simple argument to add
|
||||||
|
*/
|
||||||
|
public void addRawArg(String arg)
|
||||||
|
{
|
||||||
|
args.add(arg);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getArgs()
|
||||||
|
{
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform an optional quoting of the argument, being intelligent with spaces and quotes as needed.
|
||||||
|
*
|
||||||
|
* @param arg
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String quote(String arg)
|
||||||
|
{
|
||||||
|
boolean needsQuoting = arg.indexOf(' ') >= 0 || arg.indexOf('"') >= 0;
|
||||||
|
if (!needsQuoting)
|
||||||
|
{
|
||||||
|
return arg;
|
||||||
|
}
|
||||||
|
StringBuilder buf = new StringBuilder();
|
||||||
|
// buf.append('"');
|
||||||
|
boolean escaped = false;
|
||||||
|
for (char c : arg.toCharArray())
|
||||||
|
{
|
||||||
|
if (!escaped && ((c == '"') || (c == ' ')))
|
||||||
|
{
|
||||||
|
buf.append("\\");
|
||||||
|
}
|
||||||
|
escaped = (c == '\\');
|
||||||
|
buf.append(c);
|
||||||
|
}
|
||||||
|
// buf.append('"');
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
StringBuilder buf = new StringBuilder();
|
||||||
|
|
||||||
|
boolean delim = false;
|
||||||
|
for (String arg : args)
|
||||||
|
{
|
||||||
|
if (delim)
|
||||||
|
{
|
||||||
|
buf.append(' ');
|
||||||
|
}
|
||||||
|
buf.append(arg);
|
||||||
|
delim = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -24,10 +24,7 @@ import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.lang.reflect.Constructor;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.security.Policy;
|
|
||||||
import java.text.CollationKey;
|
import java.text.CollationKey;
|
||||||
import java.text.Collator;
|
import java.text.Collator;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -148,13 +145,23 @@ public class Config
|
||||||
public static final String DEFAULT_SECTION = "";
|
public static final String DEFAULT_SECTION = "";
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
Package pkg = Config.class.getPackage();
|
String ver = System.getProperty("jetty.version", null);
|
||||||
if (pkg != null &&
|
|
||||||
"Eclipse.org - Jetty".equals(pkg.getImplementationVendor()) &&
|
if(ver == null) {
|
||||||
(pkg.getImplementationVersion() != null))
|
Package pkg = Config.class.getPackage();
|
||||||
_version = pkg.getImplementationVersion();
|
if (pkg != null &&
|
||||||
else
|
"Eclipse.org - Jetty".equals(pkg.getImplementationVendor()) &&
|
||||||
_version = System.getProperty("jetty.version","Unknown");
|
(pkg.getImplementationVersion() != null))
|
||||||
|
{
|
||||||
|
ver = pkg.getImplementationVersion();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ver == null)
|
||||||
|
{
|
||||||
|
ver = "Unknown";
|
||||||
|
}
|
||||||
|
_version = ver;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -177,7 +184,6 @@ public class Config
|
||||||
private static final Map<String, String> __properties = new HashMap<String, String>();
|
private static final Map<String, String> __properties = new HashMap<String, String>();
|
||||||
private final Map<String, Classpath> _classpaths = new HashMap<String, Classpath>();
|
private final Map<String, Classpath> _classpaths = new HashMap<String, Classpath>();
|
||||||
private final List<String> _xml = new ArrayList<String>();
|
private final List<String> _xml = new ArrayList<String>();
|
||||||
private String _policyDirectory = null;
|
|
||||||
private String _classname = null;
|
private String _classname = null;
|
||||||
|
|
||||||
private int argCount = 0;
|
private int argCount = 0;
|
||||||
|
|
|
@ -541,29 +541,31 @@ public class Main
|
||||||
// Show Command Line to execute Jetty
|
// Show Command Line to execute Jetty
|
||||||
if (_dryRun)
|
if (_dryRun)
|
||||||
{
|
{
|
||||||
System.out.println(buildCommandLine(classpath,configuredXmls));
|
CommandLineBuilder cmd = buildCommandLine(classpath,configuredXmls);
|
||||||
|
System.out.println(cmd.toString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// execute Jetty in another JVM
|
// execute Jetty in another JVM
|
||||||
if (_exec)
|
if (_exec)
|
||||||
{
|
{
|
||||||
String cmd = buildCommandLine(classpath,configuredXmls);
|
CommandLineBuilder cmd = buildCommandLine(classpath,configuredXmls);
|
||||||
final Process process = Runtime.getRuntime().exec(cmd);
|
ProcessBuilder pbuilder = new ProcessBuilder(cmd.getArgs());
|
||||||
Runtime.getRuntime().addShutdownHook(new Thread()
|
final Process process = pbuilder.start();
|
||||||
|
|
||||||
|
try
|
||||||
{
|
{
|
||||||
@Override
|
copyInThread(process.getErrorStream(),System.err);
|
||||||
public void run()
|
copyInThread(process.getInputStream(),System.out);
|
||||||
{
|
copyInThread(System.in,process.getOutputStream());
|
||||||
Config.debug("Destroying " + process);
|
monitor.setProcess(process);
|
||||||
process.destroy();
|
process.waitFor();
|
||||||
}
|
}
|
||||||
});
|
finally
|
||||||
copyInThread(process.getErrorStream(),System.err);
|
{
|
||||||
copyInThread(process.getInputStream(),System.out);
|
Config.debug("Destroying " + process);
|
||||||
copyInThread(System.in,process.getOutputStream());
|
process.destroy();
|
||||||
monitor.setProcess(process);
|
}
|
||||||
process.waitFor();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -659,23 +661,23 @@ public class Main
|
||||||
throw new FileNotFoundException("Unable to find XML Config: " + xmlFilename);
|
throw new FileNotFoundException("Unable to find XML Config: " + xmlFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String buildCommandLine(Classpath classpath, List<String> xmls) throws IOException
|
CommandLineBuilder buildCommandLine(Classpath classpath, List<String> xmls) throws IOException
|
||||||
{
|
{
|
||||||
StringBuilder cmd = new StringBuilder();
|
CommandLineBuilder cmd = new CommandLineBuilder(findJavaBin());
|
||||||
cmd.append(findJavaBin());
|
|
||||||
for (String x : _jvmArgs) {
|
for (String x : _jvmArgs)
|
||||||
cmd.append(x);
|
{
|
||||||
|
cmd.addArg(x);
|
||||||
}
|
}
|
||||||
cmd.append(" -Djetty.home=").append(escapeSpaces(_jettyHome));
|
cmd.addRawArg("-Djetty.home=" + _jettyHome);
|
||||||
for (String p : _sysProps)
|
for (String p : _sysProps)
|
||||||
{
|
{
|
||||||
cmd.append(" -D").append(p);
|
|
||||||
String v = System.getProperty(p);
|
String v = System.getProperty(p);
|
||||||
if (v != null && v.length() > 0)
|
cmd.addEqualsArg("-D" + p,v);
|
||||||
cmd.append("=").append(escapeSpaces(v));
|
|
||||||
}
|
}
|
||||||
cmd.append(" -cp ").append(classpath.toString());
|
cmd.addArg("-cp");
|
||||||
cmd.append(" ").append(_config.getMainClassname());
|
cmd.addRawArg(classpath.toString());
|
||||||
|
cmd.addRawArg(_config.getMainClassname());
|
||||||
|
|
||||||
// Check if we need to pass properties as a file
|
// Check if we need to pass properties as a file
|
||||||
Properties properties = Config.getProperties();
|
Properties properties = Config.getProperties();
|
||||||
|
@ -685,18 +687,14 @@ public class Main
|
||||||
if (!_dryRun)
|
if (!_dryRun)
|
||||||
prop_file.deleteOnExit();
|
prop_file.deleteOnExit();
|
||||||
properties.store(new FileOutputStream(prop_file),"start.jar properties");
|
properties.store(new FileOutputStream(prop_file),"start.jar properties");
|
||||||
cmd.append(" ").append(escapeSpaces(prop_file.getAbsolutePath()));
|
cmd.addArg(prop_file.getAbsolutePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
for (String xml : xmls)
|
for (String xml : xmls)
|
||||||
cmd.append(" ").append(escapeSpaces(xml));
|
{
|
||||||
|
cmd.addRawArg(xml);
|
||||||
return cmd.toString();
|
}
|
||||||
}
|
return cmd;
|
||||||
|
|
||||||
private static String escapeSpaces(String s)
|
|
||||||
{
|
|
||||||
return s.replace(" ","\\ ");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String findJavaBin()
|
private String findJavaBin()
|
||||||
|
@ -1094,4 +1092,9 @@ public class Main
|
||||||
|
|
||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void addJvmArgs(List<String> jvmArgs)
|
||||||
|
{
|
||||||
|
_jvmArgs.addAll(jvmArgs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
package org.eclipse.jetty.start;
|
||||||
|
|
||||||
|
import static org.hamcrest.Matchers.*;
|
||||||
|
import org.junit.Assert;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
public class CommandLineBuilderTest
|
||||||
|
{
|
||||||
|
@Test
|
||||||
|
public void testSimpleCommandline()
|
||||||
|
{
|
||||||
|
CommandLineBuilder cmd = new CommandLineBuilder("java");
|
||||||
|
cmd.addEqualsArg("-Djava.io.tmpdir","/home/java/temp dir/");
|
||||||
|
cmd.addArg("--version");
|
||||||
|
|
||||||
|
Assert.assertThat(cmd.toString(), is("java -Djava.io.tmpdir=/home/java/temp\\ dir/ --version"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testQuotingSimple()
|
||||||
|
{
|
||||||
|
assertQuoting("/opt/jetty","/opt/jetty");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testQuotingSpaceInPath()
|
||||||
|
{
|
||||||
|
assertQuoting("/opt/jetty 7/home","/opt/jetty\\ 7/home");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testQuotingSpaceAndQuotesInPath()
|
||||||
|
{
|
||||||
|
assertQuoting("/opt/jetty 7 \"special\"/home","/opt/jetty\\ 7\\ \\\"special\\\"/home");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void assertQuoting(String raw, String expected)
|
||||||
|
{
|
||||||
|
String actual = CommandLineBuilder.quote(raw);
|
||||||
|
Assert.assertThat("Quoted version of [" + raw + "]",actual,is(expected));
|
||||||
|
}
|
||||||
|
}
|
|
@ -13,13 +13,19 @@
|
||||||
|
|
||||||
package org.eclipse.jetty.start;
|
package org.eclipse.jetty.start;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.hamcrest.Matchers.containsString;
|
||||||
|
import static org.hamcrest.Matchers.notNullValue;
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Vector;
|
||||||
|
|
||||||
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
|
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
|
||||||
|
import org.junit.Assert;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -53,18 +59,18 @@ public class MainTest
|
||||||
public void testExpandCommandLine() throws Exception
|
public void testExpandCommandLine() throws Exception
|
||||||
{
|
{
|
||||||
Main main = new Main();
|
Main main = new Main();
|
||||||
List<String> args = main.expandCommandLine(new String[]{});
|
List<String> args = main.expandCommandLine(new String[] {});
|
||||||
assertEquals("start.ini OPTIONS","OPTIONS=Server,jsp,resources,websocket,ext",args.get(0));
|
assertEquals("start.ini OPTIONS","OPTIONS=Server,jsp,resources,websocket,ext",args.get(0));
|
||||||
assertEquals("start.d/jmx OPTIONS","OPTIONS=jmx",args.get(5));
|
assertEquals("start.d/jmx OPTIONS","OPTIONS=jmx",args.get(5));
|
||||||
assertEquals("start.d/jmx XML","--pre=etc/jetty-jmx.xml",args.get(6));
|
assertEquals("start.d/jmx XML","--pre=etc/jetty-jmx.xml",args.get(6));
|
||||||
assertEquals("start.d/websocket OPTIONS","OPTIONS=websocket",args.get(7));
|
assertEquals("start.d/websocket OPTIONS","OPTIONS=websocket",args.get(7));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testProcessCommandLine() throws Exception
|
public void testProcessCommandLine() throws Exception
|
||||||
{
|
{
|
||||||
Main main = new Main();
|
Main main = new Main();
|
||||||
List<String> args = main.expandCommandLine(new String[]{});
|
List<String> args = main.expandCommandLine(new String[] {});
|
||||||
List<String> xmls = main.processCommandLine(args);
|
List<String> xmls = main.processCommandLine(args);
|
||||||
|
|
||||||
assertEquals("jmx --pre","etc/jetty-jmx.xml",xmls.get(0));
|
assertEquals("jmx --pre","etc/jetty-jmx.xml",xmls.get(0));
|
||||||
|
@ -72,4 +78,46 @@ public class MainTest
|
||||||
assertEquals("start.d","etc/jetty-testrealm.xml",xmls.get(5));
|
assertEquals("start.d","etc/jetty-testrealm.xml",xmls.get(5));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testBuildCommandLine() throws IOException, NoSuchFieldException, IllegalAccessException
|
||||||
|
{
|
||||||
|
List<String> jvmArgs = new ArrayList<String>();
|
||||||
|
jvmArgs.add("--exec");
|
||||||
|
jvmArgs.add("-Xms1024m");
|
||||||
|
jvmArgs.add("-Xmx1024m");
|
||||||
|
|
||||||
|
List<String> xmls = new ArrayList<String>();
|
||||||
|
xmls.add("jetty.xml");
|
||||||
|
xmls.add("jetty-jmx.xml");
|
||||||
|
xmls.add("jetty-logging.xml");
|
||||||
|
|
||||||
|
Main main = new Main();
|
||||||
|
main.addJvmArgs(jvmArgs);
|
||||||
|
|
||||||
|
Classpath classpath = nastyWayToCreateAClasspathObject("/jetty/home with spaces/");
|
||||||
|
CommandLineBuilder cmd = main.buildCommandLine(classpath,xmls);
|
||||||
|
Assert.assertThat("CommandLineBuilder shouldn't be null",cmd,notNullValue());
|
||||||
|
String commandLine = cmd.toString();
|
||||||
|
Assert.assertThat("CommandLine shouldn't be null",commandLine,notNullValue());
|
||||||
|
Assert.assertThat("Classpath should be correctly quoted and match expected value",commandLine,
|
||||||
|
containsString("-cp /jetty/home with spaces/somejar.jar:/jetty/home with spaces/someotherjar.jar"));
|
||||||
|
Assert.assertThat("CommandLine should contain jvmArgs",commandLine,containsString("--exec -Xms1024m -Xmx1024m"));
|
||||||
|
Assert.assertThat("CommandLine should contain xmls",commandLine,containsString("jetty.xml jetty-jmx.xml jetty-logging.xml"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private Classpath nastyWayToCreateAClasspathObject(String jettyHome) throws NoSuchFieldException, IllegalAccessException
|
||||||
|
{
|
||||||
|
Classpath classpath = new Classpath();
|
||||||
|
Field classpathElements = Classpath.class.getDeclaredField("_elements");
|
||||||
|
classpathElements.setAccessible(true);
|
||||||
|
File file = new File(jettyHome + "somejar.jar");
|
||||||
|
File file2 = new File(jettyHome + "someotherjar.jar");
|
||||||
|
Vector<File> elements = new Vector<File>();
|
||||||
|
elements.add(file);
|
||||||
|
elements.add(file2);
|
||||||
|
classpathElements.set(classpath,elements);
|
||||||
|
return classpath;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,16 +74,6 @@
|
||||||
<artifactId>jetty-test-helper</artifactId>
|
<artifactId>jetty-test-helper</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>javax.servlet</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
133
pom.xml
133
pom.xml
|
@ -11,19 +11,12 @@
|
||||||
<url>${jetty.url}</url>
|
<url>${jetty.url}</url>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<properties>
|
<properties>
|
||||||
<javax-activation-version>1.1</javax-activation-version>
|
|
||||||
<javax-mail-version>1.4.1</javax-mail-version>
|
|
||||||
<javax-transaction-version>1.1.1</javax-transaction-version>
|
|
||||||
<jetty.url>http://www.eclipse.org/jetty</jetty.url>
|
|
||||||
<junit-version>4.8.1</junit-version>
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<slf4j-version>1.6.1</slf4j-version>
|
<jetty.url>http://www.eclipse.org/jetty</jetty.url>
|
||||||
<servlet.spec.groupId>org.mortbay.jetty</servlet.spec.groupId>
|
<orbit-servlet-api-version>2.5.0.v201103041518</orbit-servlet-api-version>
|
||||||
<servlet.spec.artifactId>servlet-api</servlet.spec.artifactId>
|
|
||||||
<servlet.spec.version>3.0.20100224</servlet.spec.version>
|
|
||||||
<build-support-version>1.1</build-support-version>
|
<build-support-version>1.1</build-support-version>
|
||||||
<jetty.test.helper>1.6</jetty.test.helper>
|
<slf4j-version>1.6.1</slf4j-version>
|
||||||
<jetty.test.policy>1.2</jetty.test.policy>
|
<jetty-test-policy-version>1.2</jetty-test-policy-version>
|
||||||
</properties>
|
</properties>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:http://git.eclipse.org/gitroot/jetty/org.eclipse.jetty.project.git</connection>
|
<connection>scm:git:http://git.eclipse.org/gitroot/jetty/org.eclipse.jetty.project.git</connection>
|
||||||
|
@ -140,7 +133,29 @@
|
||||||
<versionOsgiRule implementation="org.eclipse.jetty.toolchain.enforcer.rules.RequireOsgiCompatibleVersionRule" />
|
<versionOsgiRule implementation="org.eclipse.jetty.toolchain.enforcer.rules.RequireOsgiCompatibleVersionRule" />
|
||||||
<versionRedhatRule implementation="org.eclipse.jetty.toolchain.enforcer.rules.RequireRedhatCompatibleVersionRule" />
|
<versionRedhatRule implementation="org.eclipse.jetty.toolchain.enforcer.rules.RequireRedhatCompatibleVersionRule" />
|
||||||
<versionDebianRule implementation="org.eclipse.jetty.toolchain.enforcer.rules.RequireDebianCompatibleVersionRule" />
|
<versionDebianRule implementation="org.eclipse.jetty.toolchain.enforcer.rules.RequireDebianCompatibleVersionRule" />
|
||||||
|
</rules>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>enforce-orbit-deps</id>
|
||||||
|
<goals>
|
||||||
|
<goal>enforce</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<rules>
|
||||||
|
<!-- Banned Dependencies (should use Orbit based versions now) -->
|
||||||
|
<bannedDependencies>
|
||||||
|
<includes>
|
||||||
|
<include>javax.servlet</include>
|
||||||
|
<include>org.apache.geronimo.specs</include>
|
||||||
|
<include>javax.mail</include>
|
||||||
|
<include>javax.activation</include>
|
||||||
|
</includes>
|
||||||
|
<searchTransitive>true</searchTransitive>
|
||||||
|
<message>This dependency is banned, use the ORBIT provided dependency instead.</message>
|
||||||
|
</bannedDependencies>
|
||||||
</rules>
|
</rules>
|
||||||
|
<fail>true</fail>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
@ -354,6 +369,7 @@
|
||||||
<module>jetty-osgi</module>
|
<module>jetty-osgi</module>
|
||||||
<module>jetty-nosql</module>
|
<module>jetty-nosql</module>
|
||||||
<module>jetty-http-spi</module>
|
<module>jetty-http-spi</module>
|
||||||
|
<module>jetty-jsp</module>
|
||||||
<module>jetty-distribution</module>
|
<module>jetty-distribution</module>
|
||||||
<module>test-continuation</module>
|
<module>test-continuation</module>
|
||||||
<!--module>test-continuation-jetty6</module-->
|
<!--module>test-continuation-jetty6</module-->
|
||||||
|
@ -366,11 +382,81 @@
|
||||||
</modules>
|
</modules>
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!-- Orbit Deps -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>servlet-api</artifactId>
|
||||||
<version>${servlet.spec.version}</version>
|
<version>2.5</version>
|
||||||
</dependency>
|
</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.security.auth.message</artifactId>
|
||||||
|
<version>1.0.0.v201108011116</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>javax.el</artifactId>
|
||||||
|
<version>2.1.0.v201105211819</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>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven</groupId>
|
||||||
<artifactId>maven-plugin-tools-api</artifactId>
|
<artifactId>maven-plugin-tools-api</artifactId>
|
||||||
|
@ -379,7 +465,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||||
<artifactId>jetty-test-helper</artifactId>
|
<artifactId>jetty-test-helper</artifactId>
|
||||||
<version>${jetty.test.helper}</version>
|
<version>1.6.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
|
@ -396,25 +482,10 @@
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
<version>${slf4j-version}</version>
|
<version>${slf4j-version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
|
||||||
<artifactId>geronimo-jta_1.1_spec</artifactId>
|
|
||||||
<version>${javax-transaction-version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax.mail</groupId>
|
|
||||||
<artifactId>mail</artifactId>
|
|
||||||
<version>${javax-mail-version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax.activation</groupId>
|
|
||||||
<artifactId>activation</artifactId>
|
|
||||||
<version>${javax-activation-version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<version>${junit-version}</version>
|
<version>4.8.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mockito</groupId>
|
<groupId>org.mockito</groupId>
|
||||||
|
|
|
@ -9,10 +9,6 @@
|
||||||
<artifactId>test-jetty-nested</artifactId>
|
<artifactId>test-jetty-nested</artifactId>
|
||||||
<name>Jetty :: Nested Test</name>
|
<name>Jetty :: Nested Test</name>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
|
|
@ -42,9 +42,9 @@
|
||||||
<descriptors>
|
<descriptors>
|
||||||
<descriptor>src/main/assembly/web-bundle.xml</descriptor>
|
<descriptor>src/main/assembly/web-bundle.xml</descriptor>
|
||||||
</descriptors>
|
</descriptors>
|
||||||
<archive>
|
<archive>
|
||||||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
||||||
</archive>
|
</archive>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
@ -63,10 +63,10 @@
|
||||||
<artifactId>maven-bundle-plugin</artifactId>
|
<artifactId>maven-bundle-plugin</artifactId>
|
||||||
<extensions>true</extensions>
|
<extensions>true</extensions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<supportedProjectTypes>
|
<supportedProjectTypes>
|
||||||
<supportedProjectType>war</supportedProjectType>
|
<supportedProjectType>war</supportedProjectType>
|
||||||
</supportedProjectTypes>
|
</supportedProjectTypes>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>bundle-manifest</id>
|
<id>bundle-manifest</id>
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<instructions>
|
<instructions>
|
||||||
<Bundle-SymbolicName>org.eclipse.jetty.test-jetty-webapp</Bundle-SymbolicName>
|
<Bundle-SymbolicName>org.eclipse.jetty.test-jetty-webapp</Bundle-SymbolicName>
|
||||||
<Import-Package>javax.servlet.jsp.*;version="2.2.0",javax.servlet.*;version="2.6.0",org.eclipse.jetty.servlets,*</Import-Package>
|
<Import-Package>javax.servlet,org.eclipse.jetty.servlets,*</Import-Package>
|
||||||
<Export-Package>!com.acme*</Export-Package>
|
<Export-Package>!com.acme*</Export-Package>
|
||||||
<!-- the test webapp is configured via a jetty xml file
|
<!-- the test webapp is configured via a jetty xml file
|
||||||
in order to add the security handler. -->
|
in order to add the security handler. -->
|
||||||
|
@ -162,11 +162,11 @@
|
||||||
<artifactId>jetty-servlets</artifactId>
|
<artifactId>jetty-servlets</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>javax.servlet</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-websocket</artifactId>
|
<artifactId>jetty-websocket</artifactId>
|
||||||
|
|
|
@ -13,11 +13,15 @@
|
||||||
|
|
||||||
package org.eclipse.jetty.test.monitor;
|
package org.eclipse.jetty.test.monitor;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicLong;
|
import java.util.concurrent.atomic.AtomicLong;
|
||||||
|
|
||||||
|
import javax.management.MBeanServerConnection;
|
||||||
|
|
||||||
import org.eclipse.jetty.client.ContentExchange;
|
import org.eclipse.jetty.client.ContentExchange;
|
||||||
import org.eclipse.jetty.client.HttpClient;
|
import org.eclipse.jetty.client.HttpClient;
|
||||||
import org.eclipse.jetty.http.HttpMethods;
|
import org.eclipse.jetty.http.HttpMethods;
|
||||||
|
@ -31,6 +35,7 @@ import org.eclipse.jetty.monitor.jmx.MonitorAction;
|
||||||
import org.eclipse.jetty.monitor.triggers.GreaterThanAttrEventTrigger;
|
import org.eclipse.jetty.monitor.triggers.GreaterThanAttrEventTrigger;
|
||||||
import org.eclipse.jetty.monitor.triggers.LessThanOrEqualToAttrEventTrigger;
|
import org.eclipse.jetty.monitor.triggers.LessThanOrEqualToAttrEventTrigger;
|
||||||
import org.eclipse.jetty.monitor.triggers.OrEventTrigger;
|
import org.eclipse.jetty.monitor.triggers.OrEventTrigger;
|
||||||
|
import org.eclipse.jetty.toolchain.jmx.JmxServiceConnection;
|
||||||
import org.eclipse.jetty.toolchain.test.JettyDistro;
|
import org.eclipse.jetty.toolchain.test.JettyDistro;
|
||||||
import org.eclipse.jetty.util.log.Log;
|
import org.eclipse.jetty.util.log.Log;
|
||||||
import org.eclipse.jetty.util.log.Logger;
|
import org.eclipse.jetty.util.log.Logger;
|
||||||
|
@ -93,7 +98,7 @@ public class ProgramConfigTest
|
||||||
@Override
|
@Override
|
||||||
public void execute(EventTrigger trigger, EventState<?> state, long timestamp)
|
public void execute(EventTrigger trigger, EventState<?> state, long timestamp)
|
||||||
{
|
{
|
||||||
counter.incrementAndGet();
|
System.out.println(counter.incrementAndGet());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
JMXMonitor.addMonitorActions(action);
|
JMXMonitor.addMonitorActions(action);
|
||||||
|
@ -116,6 +121,7 @@ public class ProgramConfigTest
|
||||||
}
|
}
|
||||||
gate.await();
|
gate.await();
|
||||||
JMXMonitor.removeMonitorActions(action);
|
JMXMonitor.removeMonitorActions(action);
|
||||||
|
assertTrue(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void runTest(String requestUrl, long count)
|
protected static void runTest(String requestUrl, long count)
|
||||||
|
|
|
@ -40,13 +40,13 @@
|
||||||
</build>
|
</build>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-servlets</artifactId>
|
<artifactId>jetty-servlets</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${servlet.spec.groupId}</groupId>
|
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||||
<artifactId>${servlet.spec.artifactId}</artifactId>
|
<artifactId>javax.servlet</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
Loading…
Reference in New Issue