pom.xml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <groupId>com.techempower</groupId>
  7. <artifactId>jetty-example</artifactId>
  8. <version>0.1</version>
  9. <properties>
  10. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  11. <maven.compiler.source>11</maven.compiler.source>
  12. <maven.compiler.target>11</maven.compiler.target>
  13. <jetty.version>10.0.14</jetty.version>
  14. <main.class>hello.handler.HelloWebServer</main.class>
  15. </properties>
  16. <profiles>
  17. <profile>
  18. <id>handler</id>
  19. <activation>
  20. <activeByDefault>true</activeByDefault>
  21. </activation>
  22. <dependencies>
  23. <dependency>
  24. <groupId>org.eclipse.jetty</groupId>
  25. <artifactId>jetty-server</artifactId>
  26. <version>${jetty.version}</version>
  27. </dependency>
  28. </dependencies>
  29. <build>
  30. <plugins>
  31. <plugin>
  32. <inherited>true</inherited>
  33. <groupId>org.apache.maven.plugins</groupId>
  34. <artifactId>maven-compiler-plugin</artifactId>
  35. <version>3.8.0</version>
  36. <configuration>
  37. <excludes>
  38. <exclude>hello/servlet/**</exclude>
  39. </excludes>
  40. <debug>false</debug>
  41. </configuration>
  42. </plugin>
  43. </plugins>
  44. </build>
  45. </profile>
  46. <profile>
  47. <id>servlet</id>
  48. <properties>
  49. <main.class>hello.servlet.HelloWebServerServlet</main.class>
  50. </properties>
  51. <dependencies>
  52. <dependency>
  53. <groupId>org.eclipse.jetty</groupId>
  54. <artifactId>jetty-servlet</artifactId>
  55. <version>${jetty.version}</version>
  56. </dependency>
  57. <dependency>
  58. <groupId>com.sun.activation</groupId>
  59. <artifactId>jakarta.activation</artifactId>
  60. <version>1.2.1</version>
  61. </dependency>
  62. </dependencies>
  63. <build>
  64. <plugins>
  65. <plugin>
  66. <inherited>true</inherited>
  67. <groupId>org.apache.maven.plugins</groupId>
  68. <artifactId>maven-compiler-plugin</artifactId>
  69. <version>3.8.0</version>
  70. <configuration>
  71. <excludes>
  72. <exclude>hello/handler/**</exclude>
  73. </excludes>
  74. <debug>false</debug>
  75. </configuration>
  76. </plugin>
  77. </plugins>
  78. </build>
  79. </profile>
  80. </profiles>
  81. <dependencies>
  82. <dependency>
  83. <groupId>org.eclipse.jetty</groupId>
  84. <artifactId>jetty-util-ajax</artifactId>
  85. <version>${jetty.version}</version>
  86. </dependency>
  87. </dependencies>
  88. <build>
  89. <plugins>
  90. <plugin>
  91. <artifactId>maven-assembly-plugin</artifactId>
  92. <configuration>
  93. <archive>
  94. <manifest>
  95. <mainClass>${main.class}</mainClass>
  96. </manifest>
  97. </archive>
  98. <descriptorRefs>
  99. <descriptorRef>jar-with-dependencies</descriptorRef>
  100. </descriptorRefs>
  101. </configuration>
  102. <executions>
  103. <execution>
  104. <id>make-assembly</id> <!-- this is used for inheritance merges -->
  105. <phase>package</phase> <!-- bind to the packaging phase -->
  106. <goals>
  107. <goal>single</goal>
  108. </goals>
  109. </execution>
  110. </executions>
  111. </plugin>
  112. </plugins>
  113. </build>
  114. </project>