pom.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <packaging>war</packaging>
  6. <groupId>com.liangjian</groupId>
  7. <artifactId>ljlucene</artifactId>
  8. <version>0.0.1-SNAPSHOT</version>
  9. <name>LJLucene</name>
  10. <description>亮剑搜索引擎</description>
  11. <properties>
  12. <maven.compiler.target>1.8</maven.compiler.target>
  13. <maven.compiler.source>1.8</maven.compiler.source>
  14. <tomcat.version>8.5.5</tomcat.version>
  15. </properties>
  16. <dependencies>
  17. <!-- 百度aip -->
  18. <dependency>
  19. <groupId>com.baidu.aip</groupId>
  20. <artifactId>java-sdk</artifactId>
  21. <version>4.1.1</version>
  22. </dependency>
  23. <!-- base64 -->
  24. <dependency>
  25. <groupId>net.iharder</groupId>
  26. <artifactId>base64</artifactId>
  27. <version>2.3.7</version>
  28. </dependency>
  29. <!-- commons-beanutils -->
  30. <dependency>
  31. <groupId>commons-beanutils</groupId>
  32. <artifactId>commons-beanutils</artifactId>
  33. <version>1.7.0</version>
  34. </dependency>
  35. <!-- commons-codec -->
  36. <dependency>
  37. <groupId>commons-codec</groupId>
  38. <artifactId>commons-codec</artifactId>
  39. <version>1.8</version>
  40. </dependency>
  41. <!-- commons-collections4 (原来的是collections-3.2.1) -->
  42. <dependency>
  43. <groupId>org.apache.commons</groupId>
  44. <artifactId>commons-collections4</artifactId>
  45. <version>4.4</version>
  46. </dependency>
  47. <!-- commons-fileupload -->
  48. <dependency>
  49. <groupId>commons-fileupload</groupId>
  50. <artifactId>commons-fileupload</artifactId>
  51. <version>1.3</version>
  52. </dependency>
  53. <!-- commons-httpclient -->
  54. <dependency>
  55. <groupId>commons-httpclient</groupId>
  56. <artifactId>commons-httpclient</artifactId>
  57. <version>3.1</version>
  58. </dependency>
  59. <!-- commons-io -->
  60. <dependency>
  61. <groupId>commons-io</groupId>
  62. <artifactId>commons-io</artifactId>
  63. <version>1.2</version>
  64. </dependency>
  65. <!-- commons-lang -->
  66. <dependency>
  67. <groupId>commons-lang</groupId>
  68. <artifactId>commons-lang</artifactId>
  69. <version>2.3</version>
  70. </dependency>
  71. <!-- commons-logging -->
  72. <dependency>
  73. <groupId>commons-logging</groupId>
  74. <artifactId>commons-logging</artifactId>
  75. <version>1.1.1</version>
  76. </dependency>
  77. <!-- hamcrest-core -->
  78. <dependency>
  79. <groupId>org.hamcrest</groupId>
  80. <artifactId>hamcrest-core</artifactId>
  81. <version>1.3</version>
  82. <scope>test</scope>
  83. </dependency>
  84. <!-- ezmorph -->
  85. <dependency>
  86. <groupId>net.sf.ezmorph</groupId>
  87. <artifactId>ezmorph</artifactId>
  88. <version>1.0.3</version>
  89. </dependency>
  90. <!-- httpclient -->
  91. <dependency>
  92. <groupId>org.apache.httpcomponents</groupId>
  93. <artifactId>httpclient</artifactId>
  94. <version>4.5</version>
  95. </dependency>
  96. <!-- httpcore -->
  97. <dependency>
  98. <groupId>org.apache.httpcomponents</groupId>
  99. <artifactId>httpcore</artifactId>
  100. <version>4.4.1</version>
  101. </dependency>
  102. <!-- ik-analyzer(原来是IKAnalzer6.5.0, maven仓库中找不到该依赖,而且GitHub项目已经归档,故选择maven仓库上有的。) -->
  103. <dependency>
  104. <groupId>com.github.magese</groupId>
  105. <artifactId>ik-analyzer</artifactId>
  106. <version>7.4.0</version>
  107. </dependency>
  108. <!-- javax.servlet-api -->
  109. <dependency>
  110. <groupId>javax.servlet</groupId>
  111. <artifactId>javax.servlet-api</artifactId>
  112. <version>3.1.0</version>
  113. <scope>provided</scope>
  114. </dependency>
  115. <!-- javax.websocket-api -->
  116. <dependency>
  117. <groupId>javax.websocket</groupId>
  118. <artifactId>javax.websocket-api</artifactId>
  119. <version>1.1</version>
  120. <scope>provided</scope>
  121. </dependency>
  122. <!-- org.json/json -->
  123. <dependency>
  124. <groupId>org.json</groupId>
  125. <artifactId>json</artifactId>
  126. <version>20160810</version>
  127. </dependency>
  128. <!-- net.sf.json-lib/json-lib -->
  129. <dependency>
  130. <groupId>net.sf.json-lib</groupId>
  131. <artifactId>json-lib</artifactId>
  132. <version>2.4</version>
  133. <classifier>jdk15</classifier>
  134. </dependency>
  135. <!-- https://mvnrepository.com/artifact/junit/junit -->
  136. <dependency>
  137. <groupId>junit</groupId>
  138. <artifactId>junit</artifactId>
  139. <version>4.12</version>
  140. <scope>test</scope>
  141. </dependency>
  142. <!-- log4j/log4j -->
  143. <dependency>
  144. <groupId>log4j</groupId>
  145. <artifactId>log4j</artifactId>
  146. <version>1.2.17</version>
  147. </dependency>
  148. <!-- lucene-core -->
  149. <dependency>
  150. <groupId>org.apache.lucene</groupId>
  151. <artifactId>lucene-analyzers-common</artifactId>
  152. <version>5.3.1</version>
  153. </dependency>
  154. <dependency>
  155. <groupId>org.apache.lucene</groupId>
  156. <artifactId>lucene-analyzers-smartcn</artifactId>
  157. <version>5.3.1</version>
  158. </dependency>
  159. <dependency>
  160. <groupId>org.apache.lucene</groupId>
  161. <artifactId>lucene-core</artifactId>
  162. <version>5.3.1</version>
  163. </dependency>
  164. <dependency>
  165. <groupId>org.apache.lucene</groupId>
  166. <artifactId>lucene-highlighter</artifactId>
  167. <version>5.3.1</version>
  168. </dependency>
  169. <dependency>
  170. <groupId>org.apache.lucene</groupId>
  171. <artifactId>lucene-join</artifactId>
  172. <version>5.3.1</version>
  173. </dependency>
  174. <dependency>
  175. <groupId>org.apache.lucene</groupId>
  176. <artifactId>lucene-memory</artifactId>
  177. <version>5.3.1</version>
  178. </dependency>
  179. <dependency>
  180. <groupId>org.apache.lucene</groupId>
  181. <artifactId>lucene-queries</artifactId>
  182. <version>5.3.1</version>
  183. </dependency>
  184. <dependency>
  185. <groupId>org.apache.lucene</groupId>
  186. <artifactId>lucene-queryparser</artifactId>
  187. <version>5.3.1</version>
  188. </dependency>
  189. <dependency>
  190. <groupId>org.apache.lucene</groupId>
  191. <artifactId>lucene-sandbox</artifactId>
  192. <version>5.3.1</version>
  193. </dependency>
  194. <!-- mp3spi -->
  195. <dependency>
  196. <groupId>com.googlecode.soundlibs</groupId>
  197. <artifactId>mp3spi</artifactId>
  198. <version>1.9.5-1</version>
  199. </dependency>
  200. <!-- 科大讯飞的包,在maven中实在找不到,读本地包 -->
  201. <dependency>
  202. <groupId>com.iflytek</groupId>
  203. <artifactId>MSC</artifactId>
  204. <scope>system</scope>
  205. <systemPath>${project.basedir}/lib/Msc.jar</systemPath>
  206. <version>1.0</version>
  207. </dependency>
  208. <!-- nlp-lang -->
  209. <dependency>
  210. <groupId>org.nlpcn</groupId>
  211. <artifactId>nlp-lang</artifactId>
  212. <version>1.7.7</version>
  213. </dependency>
  214. <!-- pinyin4j -->
  215. <dependency>
  216. <groupId>com.belerweb</groupId>
  217. <artifactId>pinyin4j</artifactId>
  218. <version>2.5.0</version>
  219. </dependency>
  220. <!-- solr的拼音分词包? 在maven中也是找不到,直接读本地包 -->
  221. <dependency>
  222. <groupId>utn.index</groupId>
  223. <artifactId>pinyinAnaylyzer</artifactId>
  224. <scope>system</scope>
  225. <systemPath>${project.basedir}/lib/pinyinAnaylyzer.jar</systemPath>
  226. <version>1.0</version>
  227. </dependency>
  228. <!-- mssql-jdbc -->
  229. <dependency>
  230. <groupId>com.microsoft.sqlserver</groupId>
  231. <artifactId>mssql-jdbc</artifactId>
  232. <version>7.4.1.jre8</version>
  233. </dependency>
  234. </dependencies>
  235. <build>
  236. <!-- 把resource文件也打包进classes -->
  237. <resources>
  238. <resource>
  239. <directory>${project.basedir}/src/main/resource</directory>
  240. <includes>
  241. <include>**/*.*</include>
  242. </includes>
  243. <excludes>
  244. <!-- 这个web配置在war配置里配置了 -->
  245. <exclude>WEB-INF/web.xml</exclude>
  246. </excludes>
  247. <filtering>false</filtering>
  248. </resource>
  249. </resources>
  250. <plugins>
  251. <plugin>
  252. <groupId>org.apache.maven.plugins</groupId>
  253. <artifactId>maven-compiler-plugin</artifactId>
  254. <version>3.6.1</version>
  255. <configuration>
  256. <source>1.8</source>
  257. <target>1.8</target>
  258. </configuration>
  259. </plugin>
  260. <!-- war打包插件 -->
  261. <plugin>
  262. <groupId>org.apache.maven.plugins</groupId>
  263. <artifactId>maven-war-plugin</artifactId>
  264. <version>2.1.1</version>
  265. <configuration>
  266. <webResources>
  267. <resource>
  268. <!-- this is relative to the pom.xml directory -->
  269. <directory>src/main/resource</directory>
  270. </resource>
  271. </webResources>
  272. </configuration>
  273. </plugin>
  274. <!-- cargo 插件运行tomcat -->
  275. <plugin>
  276. <groupId>org.codehaus.cargo</groupId>
  277. <artifactId>cargo-maven2-plugin</artifactId>
  278. <configuration>
  279. <container>
  280. <containerId>tomcat8x</containerId>
  281. <artifactInstaller>
  282. <groupId>org.apache.tomcat</groupId>
  283. <artifactId>tomcat</artifactId>
  284. <version>${tomcat.version}</version>
  285. </artifactInstaller>
  286. </container>
  287. <configuration>
  288. <type>standalone</type>
  289. <home>
  290. ${project.build.directory}/apache-tomcat-${tomcat.version}
  291. </home>
  292. <properties>
  293. <cargo.servlet.port>8080</cargo.servlet.port>
  294. <cargo.tomcat.uriencoding>UTF-8</cargo.tomcat.uriencoding>
  295. <cargo.logging>high</cargo.logging>
  296. <!-- 开启debug,上生产时可以注释掉,不注释也行,只是监听5005端口 -->
  297. <cargo.jvmargs>
  298. -Xmx2048m
  299. -Xms512m
  300. -Xdebug
  301. -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
  302. -Xnoagent
  303. -Djava.compiler=NONE
  304. </cargo.jvmargs>
  305. </properties>
  306. </configuration>
  307. <deployables>
  308. <deployable>
  309. <groupId>${project.groupId}</groupId>
  310. <artifactId>${project.artifactId}</artifactId>
  311. <type>war</type>
  312. <properties>
  313. <context>/</context>
  314. </properties>
  315. </deployable>
  316. </deployables>
  317. </configuration>
  318. </plugin>
  319. </plugins>
  320. </build>
  321. </project>