You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

137 lines
4.6 KiB

1 month ago
  1. <project xmlns="http://maven.apache.org/POM/4.0.0"
  2. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <groupId>com.example</groupId>
  6. <artifactId>es-crawler</artifactId>
  7. <version>1.0-SNAPSHOT</version>
  8. <properties>
  9. <maven.compiler.source>8</maven.compiler.source>
  10. <maven.compiler.target>8</maven.compiler.target>
  11. </properties>
  12. <dependencies>
  13. <!-- Elasticsearch High Level REST Client -->
  14. <dependency>
  15. <groupId>org.elasticsearch.client</groupId>
  16. <artifactId>elasticsearch-rest-high-level-client</artifactId>
  17. <version>7.17.0</version>
  18. </dependency>
  19. <dependency>
  20. <groupId>co.elastic.clients</groupId>
  21. <artifactId>elasticsearch-java</artifactId>
  22. <version>7.17.15</version>
  23. </dependency>
  24. <dependency>
  25. <groupId>com.fasterxml.jackson.core</groupId>
  26. <artifactId>jackson-databind</artifactId>
  27. <version>2.15.0</version>
  28. </dependency>
  29. <!-- Jsoup HTML parser -->
  30. <dependency>
  31. <groupId>org.jsoup</groupId>
  32. <artifactId>jsoup</artifactId>
  33. <version>1.17.2</version>
  34. </dependency>
  35. <!-- OkHttp -->
  36. <dependency>
  37. <groupId>com.squareup.okhttp3</groupId>
  38. <artifactId>okhttp</artifactId>
  39. <version>4.9.3</version>
  40. </dependency>
  41. <!-- Logging -->
  42. <dependency>
  43. <groupId>org.slf4j</groupId>
  44. <artifactId>slf4j-api</artifactId>
  45. <version>1.7.36</version>
  46. </dependency>
  47. <dependency>
  48. <groupId>ch.qos.logback</groupId>
  49. <artifactId>logback-classic</artifactId>
  50. <version>1.2.11</version>
  51. </dependency>
  52. <!-- Kafka 客户端 -->
  53. <dependency>
  54. <groupId>org.apache.kafka</groupId>
  55. <artifactId>kafka-clients</artifactId>
  56. <version>3.9.0</version>
  57. </dependency>
  58. <!-- Selenium Java -->
  59. <dependency>
  60. <groupId>org.seleniumhq.selenium</groupId>
  61. <artifactId>selenium-java</artifactId>
  62. <version>4.10.0</version>
  63. </dependency>
  64. <!-- WebDriver Manager -->
  65. <dependency>
  66. <groupId>io.github.bonigarcia</groupId>
  67. <artifactId>webdrivermanager</artifactId>
  68. <version>5.6.2</version>
  69. </dependency>
  70. <dependency>
  71. <groupId>org.json</groupId>
  72. <artifactId>json</artifactId>
  73. <version>20230227</version>
  74. </dependency>
  75. <dependency>
  76. <groupId>com.google.code.gson</groupId>
  77. <artifactId>gson</artifactId>
  78. <version>2.10.1</version>
  79. </dependency>
  80. <dependency>
  81. <groupId>net.sourceforge.htmlunit</groupId>
  82. <artifactId>htmlunit</artifactId>
  83. <version>2.61.0</version>
  84. </dependency>
  85. </dependencies>
  86. <build>
  87. <plugins>
  88. <!-- 编译插件,保持 Java 8 配置 -->
  89. <plugin>
  90. <groupId>org.apache.maven.plugins</groupId>
  91. <artifactId>maven-compiler-plugin</artifactId>
  92. <version>3.8.1</version>
  93. <configuration>
  94. <source>8</source>
  95. <target>8</target>
  96. </configuration>
  97. </plugin>
  98. <!-- Assembly 插件,打包包含依赖的可执行 JAR -->
  99. <plugin>
  100. <groupId>org.apache.maven.plugins</groupId>
  101. <artifactId>maven-assembly-plugin</artifactId>
  102. <version>3.3.0</version>
  103. <configuration>
  104. <archive>
  105. <manifest>
  106. <mainClass>com.example.projTopic</mainClass> <!-- 替换为你的主类全路径 -->
  107. </manifest>
  108. </archive>
  109. <descriptorRefs>
  110. <descriptorRef>jar-with-dependencies</descriptorRef>
  111. </descriptorRefs>
  112. </configuration>
  113. <executions>
  114. <execution>
  115. <id>make-assembly</id>
  116. <phase>package</phase>
  117. <goals>
  118. <goal>single</goal>
  119. </goals>
  120. </execution>
  121. </executions>
  122. </plugin>
  123. </plugins>
  124. </build>
  125. </project>