|
@@ -7,40 +7,95 @@
|
|
<artifactId>jetty-example</artifactId>
|
|
<artifactId>jetty-example</artifactId>
|
|
<version>0.1</version>
|
|
<version>0.1</version>
|
|
|
|
|
|
|
|
+ <properties>
|
|
|
|
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
|
|
+ <jetty.version>9.4.6.v20170531</jetty.version>
|
|
|
|
+ <main.class>hello.handler.HelloWebServer</main.class>
|
|
|
|
+ </properties>
|
|
|
|
+
|
|
|
|
+ <profiles>
|
|
|
|
+ <profile>
|
|
|
|
+ <id>handler</id>
|
|
|
|
+ <activation>
|
|
|
|
+ <activeByDefault>true</activeByDefault>
|
|
|
|
+ </activation>
|
|
|
|
+ <dependencies>
|
|
|
|
+ <dependency>
|
|
|
|
+ <groupId>org.eclipse.jetty</groupId>
|
|
|
|
+ <artifactId>jetty-server</artifactId>
|
|
|
|
+ <version>${jetty.version}</version>
|
|
|
|
+ </dependency>
|
|
|
|
+ </dependencies>
|
|
|
|
+ <build>
|
|
|
|
+ <plugins>
|
|
|
|
+ <plugin>
|
|
|
|
+ <inherited>true</inherited>
|
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
|
+ <artifactId>maven-compiler-plugin</artifactId>
|
|
|
|
+ <version>2.3.2</version>
|
|
|
|
+ <configuration>
|
|
|
|
+ <excludes>
|
|
|
|
+ <exclude>hello/servlet/**</exclude>
|
|
|
|
+ </excludes>
|
|
|
|
+ <source>1.8</source>
|
|
|
|
+ <target>1.8</target>
|
|
|
|
+ <optimize>true</optimize>
|
|
|
|
+ <debug>false</debug>
|
|
|
|
+ </configuration>
|
|
|
|
+ </plugin>
|
|
|
|
+ </plugins>
|
|
|
|
+ </build>
|
|
|
|
+ </profile>
|
|
|
|
+ <profile>
|
|
|
|
+ <id>servlet</id>
|
|
|
|
+ <properties>
|
|
|
|
+ <main.class>hello.servlet.HelloWebServerServlet</main.class>
|
|
|
|
+ </properties>
|
|
|
|
+ <dependencies>
|
|
|
|
+ <dependency>
|
|
|
|
+ <groupId>org.eclipse.jetty</groupId>
|
|
|
|
+ <artifactId>jetty-servlet</artifactId>
|
|
|
|
+ <version>${jetty.version}</version>
|
|
|
|
+ </dependency>
|
|
|
|
+ </dependencies>
|
|
|
|
+ <build>
|
|
|
|
+ <plugins>
|
|
|
|
+ <plugin>
|
|
|
|
+ <inherited>true</inherited>
|
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
|
+ <artifactId>maven-compiler-plugin</artifactId>
|
|
|
|
+ <version>2.3.2</version>
|
|
|
|
+ <configuration>
|
|
|
|
+ <excludes>
|
|
|
|
+ <exclude>hello/handler/**</exclude>
|
|
|
|
+ </excludes>
|
|
|
|
+ <source>1.8</source>
|
|
|
|
+ <target>1.8</target>
|
|
|
|
+ <optimize>true</optimize>
|
|
|
|
+ <debug>false</debug>
|
|
|
|
+ </configuration>
|
|
|
|
+ </plugin>
|
|
|
|
+ </plugins>
|
|
|
|
+ </build>
|
|
|
|
+ </profile>
|
|
|
|
+ </profiles>
|
|
|
|
+
|
|
<dependencies>
|
|
<dependencies>
|
|
- <!-- Web server -->
|
|
|
|
- <dependency>
|
|
|
|
- <groupId>org.eclipse.jetty</groupId>
|
|
|
|
- <artifactId>jetty-server</artifactId>
|
|
|
|
- <version>9.3.0.v20150612</version>
|
|
|
|
- </dependency>
|
|
|
|
<dependency>
|
|
<dependency>
|
|
<groupId>org.eclipse.jetty</groupId>
|
|
<groupId>org.eclipse.jetty</groupId>
|
|
<artifactId>jetty-util-ajax</artifactId>
|
|
<artifactId>jetty-util-ajax</artifactId>
|
|
- <version>9.3.0.v20150612</version>
|
|
|
|
|
|
+ <version>${jetty.version}</version>
|
|
</dependency>
|
|
</dependency>
|
|
</dependencies>
|
|
</dependencies>
|
|
|
|
|
|
<build>
|
|
<build>
|
|
<plugins>
|
|
<plugins>
|
|
- <plugin>
|
|
|
|
- <inherited>true</inherited>
|
|
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
|
|
- <artifactId>maven-compiler-plugin</artifactId>
|
|
|
|
- <version>2.3.2</version>
|
|
|
|
- <configuration>
|
|
|
|
- <source>1.8</source>
|
|
|
|
- <target>1.8</target>
|
|
|
|
- <optimize>true</optimize>
|
|
|
|
- <debug>false</debug>
|
|
|
|
- </configuration>
|
|
|
|
- </plugin>
|
|
|
|
<plugin>
|
|
<plugin>
|
|
<artifactId>maven-assembly-plugin</artifactId>
|
|
<artifactId>maven-assembly-plugin</artifactId>
|
|
<configuration>
|
|
<configuration>
|
|
<archive>
|
|
<archive>
|
|
<manifest>
|
|
<manifest>
|
|
- <mainClass>hello.HelloWebServer</mainClass>
|
|
|
|
|
|
+ <mainClass>${main.class}</mainClass>
|
|
</manifest>
|
|
</manifest>
|
|
</archive>
|
|
</archive>
|
|
<descriptorRefs>
|
|
<descriptorRefs>
|