Skip to content

Commit 74b9d2d

Browse files
cloudstack: WIP embedded jetty support
Changes adapted from PR apache#372 Signed-off-by: Rohit Yadav <[email protected]>
1 parent 45c2252 commit 74b9d2d

File tree

4 files changed

+116
-4
lines changed

4 files changed

+116
-4
lines changed

client/jetty/pom.xml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<!--
2+
3+
Licensed to the Apache Software Foundation (ASF) under one
4+
or more contributor license agreements. See the NOTICE file
5+
distributed with this work for additional information
6+
regarding copyright ownership. The ASF licenses this file
7+
to you under the Apache License, Version 2.0 (the
8+
"License"); you may not use this file except in compliance
9+
with the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing,
14+
software distributed under the License is distributed on an
15+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
KIND, either express or implied. See the License for the
17+
specific language governing permissions and limitations
18+
under the License.
19+
20+
-->
21+
<project xmlns="http://maven.apache.org/POM/4.0.0"
22+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24+
<modelVersion>4.0.0</modelVersion>
25+
<groupId>org.apache.cloudstack</groupId>
26+
<artifactId>cloudstack-jetty</artifactId>
27+
<parent>
28+
<groupId>org.apache.cloudstack</groupId>
29+
<artifactId>cloudstack</artifactId>
30+
<version>4.9.0-SNAPSHOT</version>
31+
<relativePath>../../pom.xml</relativePath>
32+
</parent>
33+
<name>Apache CloudStack Jetty</name>
34+
<properties>
35+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
37+
</properties>
38+
<dependencies>
39+
<dependency>
40+
<groupId>org.eclipse.jetty</groupId>
41+
<artifactId>jetty-runner</artifactId>
42+
<version>${cs.jetty.version}</version>
43+
<scope>runtime</scope>
44+
</dependency>
45+
</dependencies>
46+
<build>
47+
<finalName>${project.artifactId}</finalName>
48+
<plugins>
49+
<plugin>
50+
<groupId>org.apache.maven.plugins</groupId>
51+
<artifactId>maven-checkstyle-plugin</artifactId>
52+
<executions>
53+
<execution>
54+
<id>cloudstack-checkstyle</id>
55+
<phase>none</phase>
56+
<inherited>false</inherited>
57+
</execution>
58+
</executions>
59+
</plugin>
60+
<plugin>
61+
<artifactId>maven-assembly-plugin</artifactId>
62+
<configuration>
63+
<descriptors>
64+
<descriptor>standalone.xml</descriptor>
65+
</descriptors>
66+
</configuration>
67+
<executions>
68+
<execution>
69+
<id>make-assembly</id>
70+
<phase>package</phase>
71+
<goals>
72+
<goal>single</goal>
73+
</goals>
74+
</execution>
75+
</executions>
76+
</plugin>
77+
</plugins>
78+
</build>
79+
</project>

client/jetty/standalone.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<assembly>
3+
<id>standalone</id>
4+
<formats>
5+
<format>dir</format>
6+
</formats>
7+
<includeBaseDirectory>true</includeBaseDirectory>
8+
<baseDirectory></baseDirectory>
9+
<fileSets>
10+
<fileSet>
11+
<directory>src/main/jetty/bin</directory>
12+
<outputDirectory>/bin</outputDirectory>
13+
<fileMode>755</fileMode>
14+
</fileSet>
15+
</fileSets>
16+
<dependencySets>
17+
<dependencySet>
18+
<useProjectArtifact>false</useProjectArtifact>
19+
<outputDirectory>/lib</outputDirectory>
20+
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
21+
</dependencySet>
22+
<dependencySet>
23+
<useProjectArtifact>true</useProjectArtifact>
24+
<scope>runtime</scope>
25+
<includes>
26+
<include>org.eclipse.jetty:jetty-start:*</include>
27+
</includes>
28+
<outputDirectory>/bin</outputDirectory>
29+
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
30+
</dependencySet>
31+
</dependencySets>
32+
</assembly>

client/pom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
<version>${project.version}</version>
198198
<exclusions>
199199
<exclusion>
200-
<groupId>org.mortbay.jetty</groupId>
200+
<groupId>org.eclipse.jetty</groupId>
201201
<artifactId>servlet-api</artifactId>
202202
</exclusion>
203203
</exclusions>
@@ -456,7 +456,7 @@
456456
<stopPort>9966</stopPort>
457457
<stopKey>stop-jetty</stopKey>
458458
<connectors>
459-
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
459+
<connector implementation="org.eclipse.jetty.nio.SelectChannelConnector">
460460
<port>8080</port>
461461
<maxIdleTime>60000</maxIdleTime>
462462
</connector>
@@ -465,9 +465,8 @@
465465
<webAppSourceDirectory>${project.build.directory}/generated-webapp</webAppSourceDirectory>
466466
<webAppConfig>
467467
<contextPath>/client</contextPath>
468-
<extraClasspath>${project.build.directory}/utilities/scripts/db/;${project.build.directory}/utilities/scripts/db/db/</extraClasspath>
468+
<extraClasspath>${project.build.directory}/conf;${project.build.directory}/../../setup/db/;${project.build.directory}/../../setup/db/db/</extraClasspath>
469469
</webAppConfig>
470-
471470
<systemProperties>
472471
<systemProperty>
473472
<name>log4j.configuration</name>

pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@
214214
<module>plugins</module>
215215
<module>framework</module>
216216
<module>client</module>
217+
<module>client/jetty</module>
217218
<module>services</module>
218219
<module>maven-standard</module>
219220
<module>quickcloud</module>
@@ -831,6 +832,7 @@
831832
<exclude>**/.vagrant</exclude>
832833
<exclude>**/*.json</exclude>
833834
<exclude>build/build.number</exclude>
835+
<exclude>client/jetty/standalone.xml</exclude>
834836
<exclude>services/console-proxy/server/js/jquery.js</exclude>
835837
<exclude>debian/compat</exclude>
836838
<exclude>debian/control</exclude>

0 commit comments

Comments
 (0)