当前位置:   article > 正文

JetLinks开源物联网平台社区版部署教程

JetLinks开源物联网平台社区版部署教程

1.上github搜素jetlinks

2.找到源代码,并且下载到本地。

3.项目下载完成之后,还需要另外下载三个核心依赖模块。在github找到jetlinks。

4.点击进去下载,下载完成之后,你会发现里面有三个文件夹是空白的,先不用理会,把它复制到jetlinks-commnity目录下,并且在pom.xml添加jetlinks模块。

5.pom.xml代码依赖

  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>org.jetlinks.community</groupId>
  7. <artifactId>jetlinks-community</artifactId>
  8. <version>2.2.0-SNAPSHOT</version>
  9. <modules>
  10. <module>jetlinks-components</module>
  11. <module>jetlinks-manager</module>
  12. <module>jetlinks-standalone</module>
  13. <module>jetlinks</module>
  14. </modules>
  15. <packaging>pom</packaging>
  16. <properties>
  17. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  18. <project.build.locales>zh_CN</project.build.locales>
  19. <spring.boot.version>2.7.18</spring.boot.version>
  20. <java.version>1.8</java.version>
  21. <project.build.jdk>${java.version}</project.build.jdk>
  22. <!-- 基础通用模块依赖,快照版本表示正在持续迭代.发布后将同步到maven中央仓库 -->
  23. <!-- https://github.com/hs-web/hsweb-framework -->
  24. <hsweb.framework.version>4.0.17-SNAPSHOT</hsweb.framework.version>
  25. <!-- https://github.com/hs-web/hsweb-easy-orm -->
  26. <easyorm.version>4.1.2-SNAPSHOT</easyorm.version>
  27. <!-- https://github.com/jetlinks/jetlinks -->
  28. <jetlinks.version>1.2.2-SNAPSHOT</jetlinks.version>
  29. <!-- https://github.com/hs-web/reactor-excel -->
  30. <reactor.excel.version>1.0.6-SNAPSHOT</reactor.excel.version>
  31. <!-- https://github.com/jetlinks/reactor-ql -->
  32. <reactor.ql.version>1.0.16</reactor.ql.version>
  33. <!-- https://github.com/jetlinks/jetlinks-plugin -->
  34. <jetlinks.plugin.version>1.0.1</jetlinks.plugin.version>
  35. <!-- 第三方依赖版本 -->
  36. <r2dbc.version>Borca-SR2</r2dbc.version>
  37. <hsweb.expands.version>3.0.2</hsweb.expands.version>
  38. <netty.version>4.1.104.Final</netty.version>
  39. <elasticsearch.version>7.17.13</elasticsearch.version>
  40. <californium.version>3.7.0</californium.version>
  41. <fastjson.version>1.2.83</fastjson.version>
  42. <reactor.version>2020.0.38</reactor.version>
  43. <vertx.version>4.3.8</vertx.version>
  44. <log4j.version>2.18.0</log4j.version>
  45. <logback.version>1.2.11</logback.version>
  46. <springdoc.version>1.6.11</springdoc.version>
  47. <jackson.version>2.14.3</jackson.version>
  48. <gson.version>2.9.1</gson.version>
  49. <opentelemetry.version>1.26.0</opentelemetry.version>
  50. <swagger.version>2.2.8</swagger.version>
  51. <jna.version>5.12.1</jna.version>
  52. <aliyun.sdk.core>4.5.2</aliyun.sdk.core>
  53. <jsonata.version>2.4.1</jsonata.version>
  54. <spring.cloud.version>2021.0.3</spring.cloud.version>
  55. <fst.version>2.57</fst.version>
  56. <grpc.version>1.53.0</grpc.version>
  57. <rsocket.version>1.1.4</rsocket.version>
  58. <micrometer.version>1.11.8</micrometer.version>
  59. </properties>
  60. <profiles>
  61. <profile>
  62. <id>build</id>
  63. <repositories>
  64. <repository>
  65. <id>maven-central</id>
  66. <name>central</name>
  67. <url>https://repo1.maven.org/maven2/</url>
  68. </repository>
  69. </repositories>
  70. </profile>
  71. </profiles>
  72. <build>
  73. <finalName>${project.artifactId}</finalName>
  74. <resources>
  75. <resource>
  76. <directory>src/main/resources</directory>
  77. <filtering>true</filtering>
  78. </resource>
  79. </resources>
  80. <pluginManagement>
  81. <plugins>
  82. <plugin>
  83. <groupId>org.apache.maven.plugins</groupId>
  84. <artifactId>maven-install-plugin</artifactId>
  85. <version>2.4</version>
  86. </plugin>
  87. <plugin>
  88. <groupId>org.springframework.boot</groupId>
  89. <artifactId>spring-boot-maven-plugin</artifactId>
  90. <version>${spring.boot.version}</version>
  91. </plugin>
  92. <plugin>
  93. <groupId>org.apache.maven.plugins</groupId>
  94. <artifactId>maven-deploy-plugin</artifactId>
  95. <version>2.8.2</version>
  96. </plugin>
  97. </plugins>
  98. </pluginManagement>
  99. <plugins>
  100. <plugin>
  101. <groupId>org.apache.maven.plugins</groupId>
  102. <artifactId>maven-compiler-plugin</artifactId>
  103. <version>3.1</version>
  104. <configuration>
  105. <source>${project.build.jdk}</source>
  106. <target>${project.build.jdk}</target>
  107. <encoding>${project.build.sourceEncoding}</encoding>
  108. </configuration>
  109. </plugin>
  110. <plugin>
  111. <groupId>org.jacoco</groupId>
  112. <artifactId>jacoco-maven-plugin</artifactId>
  113. <version>0.8.7</version>
  114. <executions>
  115. <execution>
  116. <goals>
  117. <goal>prepare-agent</goal>
  118. </goals>
  119. <configuration>
  120. <propertyName>jacocoArgLine</propertyName>
  121. </configuration>
  122. </execution>
  123. <execution>
  124. <id>report</id>
  125. <phase>test</phase>
  126. <goals>
  127. <goal>report</goal>
  128. </goals>
  129. </execution>
  130. </executions>
  131. </plugin>
  132. <plugin>
  133. <groupId>org.apache.maven.plugins</groupId>
  134. <artifactId>maven-source-plugin</artifactId>
  135. <version>2.4</version>
  136. <executions>
  137. <execution>
  138. <id>attach-sources</id>
  139. <goals>
  140. <goal>jar-no-fork</goal>
  141. </goals>
  142. </execution>
  143. </executions>
  144. </plugin>
  145. <plugin>
  146. <groupId>org.codehaus.gmavenplus</groupId>
  147. <artifactId>gmavenplus-plugin</artifactId>
  148. <version>1.6.1</version>
  149. <executions>
  150. <execution>
  151. <goals>
  152. <goal>addTestSources</goal>
  153. <goal>compile</goal>
  154. <goal>compileTests</goal>
  155. </goals>
  156. </execution>
  157. </executions>
  158. <dependencies>
  159. <dependency>
  160. <groupId>org.codehaus.groovy</groupId>
  161. <artifactId>groovy</artifactId>
  162. <version>2.5.14</version>
  163. </dependency>
  164. </dependencies>
  165. </plugin>
  166. <plugin>
  167. <groupId>org.apache.maven.plugins</groupId>
  168. <artifactId>maven-surefire-plugin</artifactId>
  169. <version>2.22.0</version>
  170. <configuration>
  171. <includes>
  172. <include>**/*Test.java</include>
  173. <include>**/*Tests.java</include>
  174. <include>**/*TestCase.java</include>
  175. </includes>
  176. <argLine>-Dfile.encoding=UTF-8 ${jacocoArgLine}</argLine>
  177. </configuration>
  178. </plugin>
  179. </plugins>
  180. </build>
  181. <dependencyManagement>
  182. <dependencies>
  183. <dependency>
  184. <groupId>io.micrometer</groupId>
  185. <artifactId>micrometer-bom</artifactId>
  186. <version>${micrometer.version}</version>
  187. <scope>import</scope>
  188. <type>pom</type>
  189. </dependency>
  190. <dependency>
  191. <groupId>io.rsocket</groupId>
  192. <artifactId>rsocket-bom</artifactId>
  193. <version>${rsocket.version}</version>
  194. <scope>import</scope>
  195. <type>pom</type>
  196. </dependency>
  197. <dependency>
  198. <groupId>io.asyncer</groupId>
  199. <artifactId>r2dbc-mysql</artifactId>
  200. <version>0.9.3</version>
  201. </dependency>
  202. <dependency>
  203. <groupId>de.ruedigermoeller</groupId>
  204. <artifactId>fst</artifactId>
  205. <version>${fst.version}</version>
  206. </dependency>
  207. <dependency>
  208. <groupId>net.java.dev.jna</groupId>
  209. <artifactId>jna</artifactId>
  210. <version>${jna.version}</version>
  211. </dependency>
  212. <dependency>
  213. <groupId>net.java.dev.jna</groupId>
  214. <artifactId>jna-platform</artifactId>
  215. <version>${jna.version}</version>
  216. </dependency>
  217. <dependency>
  218. <groupId>org.yaml</groupId>
  219. <artifactId>snakeyaml</artifactId>
  220. <version>2.0</version>
  221. </dependency>
  222. <dependency>
  223. <groupId>org.json</groupId>
  224. <artifactId>json</artifactId>
  225. <version>20231013</version>
  226. </dependency>
  227. <dependency>
  228. <groupId>org.jsoup</groupId>
  229. <artifactId>jsoup</artifactId>
  230. <version>1.15.3</version>
  231. </dependency>
  232. <dependency>
  233. <groupId>com.h2database</groupId>
  234. <artifactId>h2</artifactId>
  235. <version>2.2.224</version>
  236. </dependency>
  237. <dependency>
  238. <groupId>com.h2database</groupId>
  239. <artifactId>h2-mvstore</artifactId>
  240. <version>2.1.214</version>
  241. </dependency>
  242. <dependency>
  243. <groupId>org.springdoc</groupId>
  244. <artifactId>springdoc-openapi-common</artifactId>
  245. <version>${springdoc.version}</version>
  246. </dependency>
  247. <dependency>
  248. <groupId>org.springdoc</groupId>
  249. <artifactId>springdoc-openapi-webflux-core</artifactId>
  250. <version>${springdoc.version}</version>
  251. </dependency>
  252. <dependency>
  253. <groupId>org.springdoc</groupId>
  254. <artifactId>springdoc-openapi-webflux-ui</artifactId>
  255. <version>${springdoc.version}</version>
  256. </dependency>
  257. <dependency>
  258. <groupId>org.apache.logging.log4j</groupId>
  259. <artifactId>log4j-to-slf4j</artifactId>
  260. <version>${log4j.version}</version>
  261. </dependency>
  262. <dependency>
  263. <groupId>org.apache.logging.log4j</groupId>
  264. <artifactId>log4j-api</artifactId>
  265. <version>${log4j.version}</version>
  266. </dependency>
  267. <dependency>
  268. <groupId>org.apache.logging.log4j</groupId>
  269. <artifactId>log4j-core</artifactId>
  270. <version>${log4j.version}</version>
  271. </dependency>
  272. <!-- https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk18on -->
  273. <dependency>
  274. <groupId>org.bouncycastle</groupId>
  275. <artifactId>bcprov-jdk18on</artifactId>
  276. <version>1.78.1</version>
  277. </dependency>
  278. <dependency>
  279. <groupId>org.bouncycastle</groupId>
  280. <artifactId>bcpkix-jdk18on</artifactId>
  281. <version>1.78.1</version>
  282. </dependency>
  283. <dependency>
  284. <groupId>org.bouncycastle</groupId>
  285. <artifactId>bctls-jdk18on</artifactId>
  286. <version>1.78.1</version>
  287. </dependency>
  288. <dependency>
  289. <groupId>org.bouncycastle</groupId>
  290. <artifactId>bcpkix-jdk15on</artifactId>
  291. <version>1.70</version>
  292. </dependency>
  293. <dependency>
  294. <groupId>com.fasterxml.jackson</groupId>
  295. <artifactId>jackson-bom</artifactId>
  296. <version>${jackson.version}</version>
  297. <type>pom</type>
  298. <scope>import</scope>
  299. </dependency>
  300. <dependency>
  301. <groupId>commons-codec</groupId>
  302. <artifactId>commons-codec</artifactId>
  303. <version>1.15</version>
  304. </dependency>
  305. <dependency>
  306. <groupId>io.netty</groupId>
  307. <artifactId>netty-bom</artifactId>
  308. <version>${netty.version}</version>
  309. <type>pom</type>
  310. <scope>import</scope>
  311. </dependency>
  312. <dependency>
  313. <groupId>io.projectreactor</groupId>
  314. <artifactId>reactor-bom</artifactId>
  315. <version>${reactor.version}</version>
  316. <type>pom</type>
  317. <scope>import</scope>
  318. </dependency>
  319. <dependency>
  320. <groupId>io.vertx</groupId>
  321. <artifactId>vertx-dependencies</artifactId>
  322. <version>${vertx.version}</version>
  323. <type>pom</type>
  324. <scope>import</scope>
  325. </dependency>
  326. <dependency>
  327. <groupId>org.eclipse.californium</groupId>
  328. <artifactId>californium-core</artifactId>
  329. <version>${californium.version}</version>
  330. </dependency>
  331. <dependency>
  332. <groupId>org.eclipse.californium</groupId>
  333. <artifactId>scandium</artifactId>
  334. <version>${californium.version}</version>
  335. </dependency>
  336. <dependency>
  337. <groupId>org.jetlinks</groupId>
  338. <artifactId>reactor-ql</artifactId>
  339. <version>${reactor.ql.version}</version>
  340. </dependency>
  341. <dependency>
  342. <groupId>org.hswebframework</groupId>
  343. <artifactId>reactor-excel</artifactId>
  344. <version>${reactor.excel.version}</version>
  345. </dependency>
  346. <dependency>
  347. <groupId>io.vavr</groupId>
  348. <artifactId>vavr</artifactId>
  349. <version>0.9.2</version>
  350. </dependency>
  351. <dependency>
  352. <groupId>ch.qos.logback</groupId>
  353. <artifactId>logback-classic</artifactId>
  354. <version>${logback.version}</version>
  355. </dependency>
  356. <dependency>
  357. <groupId>ch.qos.logback</groupId>
  358. <artifactId>logback-core</artifactId>
  359. <version>${logback.version}</version>
  360. </dependency>
  361. <dependency>
  362. <groupId>com.alibaba</groupId>
  363. <artifactId>fastjson</artifactId>
  364. <version>${fastjson.version}</version>
  365. </dependency>
  366. <dependency>
  367. <groupId>io.opentelemetry</groupId>
  368. <artifactId>opentelemetry-bom</artifactId>
  369. <version>${opentelemetry.version}</version>
  370. <type>pom</type>
  371. <scope>import</scope>
  372. </dependency>
  373. <dependency>
  374. <groupId>io.opentelemetry</groupId>
  375. <artifactId>opentelemetry-semconv</artifactId>
  376. <version>${opentelemetry.version}-alpha</version>
  377. </dependency>
  378. <dependency>
  379. <groupId>io.r2dbc</groupId>
  380. <artifactId>r2dbc-bom</artifactId>
  381. <version>${r2dbc.version}</version>
  382. <type>pom</type>
  383. <scope>import</scope>
  384. </dependency>
  385. <dependency>
  386. <groupId>org.springframework.boot</groupId>
  387. <artifactId>spring-boot-dependencies</artifactId>
  388. <version>${spring.boot.version}</version>
  389. <type>pom</type>
  390. <scope>import</scope>
  391. </dependency>
  392. <dependency>
  393. <groupId>org.hswebframework.web</groupId>
  394. <artifactId>hsweb-framework</artifactId>
  395. <version>${hsweb.framework.version}</version>
  396. <type>pom</type>
  397. <scope>import</scope>
  398. <exclusions>
  399. <exclusion>
  400. <groupId>io.r2dbc</groupId>
  401. <artifactId>r2dbc-bom</artifactId>
  402. </exclusion>
  403. <exclusion>
  404. <groupId>org.springframework.boot</groupId>
  405. <artifactId>spring-boot-dependencies</artifactId>
  406. </exclusion>
  407. </exclusions>
  408. </dependency>
  409. <dependency>
  410. <groupId>org.hswebframework.web</groupId>
  411. <artifactId>hsweb-core</artifactId>
  412. <version>${hsweb.framework.version}</version>
  413. </dependency>
  414. <dependency>
  415. <groupId>org.jetlinks</groupId>
  416. <artifactId>rule-engine-support</artifactId>
  417. <version>${jetlinks.version}</version>
  418. </dependency>
  419. <dependency>
  420. <groupId>org.jetlinks</groupId>
  421. <artifactId>jetlinks-supports</artifactId>
  422. <version>${jetlinks.version}</version>
  423. </dependency>
  424. <dependency>
  425. <groupId>com.google.guava</groupId>
  426. <artifactId>guava</artifactId>
  427. <version>32.1.2-jre</version>
  428. </dependency>
  429. <dependency>
  430. <groupId>org.elasticsearch.client</groupId>
  431. <artifactId>elasticsearch-rest-high-level-client</artifactId>
  432. <version>${elasticsearch.version}</version>
  433. </dependency>
  434. <dependency>
  435. <groupId>org.elasticsearch</groupId>
  436. <artifactId>elasticsearch</artifactId>
  437. <version>${elasticsearch.version}</version>
  438. </dependency>
  439. <dependency>
  440. <groupId>org.elasticsearch.client</groupId>
  441. <artifactId>elasticsearch-rest-client</artifactId>
  442. <version>${elasticsearch.version}</version>
  443. </dependency>
  444. <dependency>
  445. <groupId>org.elasticsearch.plugin</groupId>
  446. <artifactId>transport-netty4-client</artifactId>
  447. <version>${elasticsearch.version}</version>
  448. </dependency>
  449. <dependency>
  450. <groupId>org.hswebframework</groupId>
  451. <artifactId>hsweb-easy-orm-core</artifactId>
  452. <version>${easyorm.version}</version>
  453. </dependency>
  454. <dependency>
  455. <groupId>org.hswebframework</groupId>
  456. <artifactId>hsweb-easy-orm-rdb</artifactId>
  457. <version>${easyorm.version}</version>
  458. <exclusions>
  459. <exclusion>
  460. <groupId>io.r2dbc</groupId>
  461. <artifactId>r2dbc-bom</artifactId>
  462. </exclusion>
  463. </exclusions>
  464. </dependency>
  465. <dependency>
  466. <groupId>io.swagger.core.v3</groupId>
  467. <artifactId>swagger-annotations</artifactId>
  468. <version>${swagger.version}</version>
  469. </dependency>
  470. <dependency>
  471. <groupId>org.apache.commons</groupId>
  472. <artifactId>commons-text</artifactId>
  473. <version>1.10.0</version>
  474. </dependency>
  475. <dependency>
  476. <groupId>com.aliyun</groupId>
  477. <artifactId>aliyun-java-sdk-core</artifactId>
  478. <version>${aliyun.sdk.core}</version>
  479. </dependency>
  480. <dependency>
  481. <groupId>io.grpc</groupId>
  482. <artifactId>grpc-protobuf</artifactId>
  483. <version>${grpc.version}</version>
  484. </dependency>
  485. <dependency>
  486. <groupId>io.grpc</groupId>
  487. <artifactId>grpc-netty</artifactId>
  488. <version>${grpc.version}</version>
  489. </dependency>
  490. <dependency>
  491. <groupId>io.grpc</groupId>
  492. <artifactId>grpc-netty-shaded</artifactId>
  493. <version>${grpc.version}</version>
  494. <exclusions>
  495. <exclusion>
  496. <groupId>io.netty</groupId>
  497. <artifactId>*</artifactId>
  498. </exclusion>
  499. </exclusions>
  500. </dependency>
  501. </dependencies>
  502. </dependencyManagement>
  503. <dependencies>
  504. <dependency>
  505. <groupId>org.apache.commons</groupId>
  506. <artifactId>commons-text</artifactId>
  507. </dependency>
  508. <dependency>
  509. <groupId>commons-lang</groupId>
  510. <artifactId>commons-lang</artifactId>
  511. <version>2.6</version>
  512. </dependency>
  513. <dependency>
  514. <groupId>org.springframework.boot</groupId>
  515. <artifactId>spring-boot-starter-test</artifactId>
  516. <scope>test</scope>
  517. </dependency>
  518. <dependency>
  519. <groupId>org.junit.jupiter</groupId>
  520. <artifactId>junit-jupiter-api</artifactId>
  521. <scope>test</scope>
  522. </dependency>
  523. <dependency>
  524. <groupId>org.junit.jupiter</groupId>
  525. <artifactId>junit-jupiter-params</artifactId>
  526. <scope>test</scope>
  527. </dependency>
  528. <dependency>
  529. <groupId>org.junit.jupiter</groupId>
  530. <artifactId>junit-jupiter-engine</artifactId>
  531. <scope>test</scope>
  532. </dependency>
  533. <dependency>
  534. <groupId>org.testcontainers</groupId>
  535. <artifactId>testcontainers</artifactId>
  536. <version>1.17.4</version>
  537. <scope>test</scope>
  538. </dependency>
  539. <dependency>
  540. <groupId>org.testcontainers</groupId>
  541. <artifactId>junit-jupiter</artifactId>
  542. <version>1.17.4</version>
  543. <scope>test</scope>
  544. </dependency>
  545. <dependency>
  546. <groupId>io.projectreactor</groupId>
  547. <artifactId>reactor-test</artifactId>
  548. <scope>test</scope>
  549. </dependency>
  550. <dependency>
  551. <groupId>org.springframework</groupId>
  552. <artifactId>spring-context-indexer</artifactId>
  553. </dependency>
  554. <dependency>
  555. <groupId>io.projectreactor</groupId>
  556. <artifactId>reactor-core</artifactId>
  557. </dependency>
  558. <dependency>
  559. <groupId>org.codehaus.groovy</groupId>
  560. <artifactId>groovy</artifactId>
  561. </dependency>
  562. <dependency>
  563. <groupId>junit</groupId>
  564. <artifactId>junit</artifactId>
  565. <scope>test</scope>
  566. </dependency>
  567. <dependency>
  568. <groupId>org.slf4j</groupId>
  569. <artifactId>slf4j-api</artifactId>
  570. </dependency>
  571. <dependency>
  572. <groupId>ch.qos.logback</groupId>
  573. <artifactId>logback-classic</artifactId>
  574. </dependency>
  575. <dependency>
  576. <groupId>org.projectlombok</groupId>
  577. <artifactId>lombok</artifactId>
  578. <scope>provided</scope>
  579. </dependency>
  580. <dependency>
  581. <groupId>org.springframework.boot</groupId>
  582. <artifactId>spring-boot-configuration-processor</artifactId>
  583. <optional>true</optional>
  584. </dependency>
  585. </dependencies>
  586. <repositories>
  587. <repository>
  588. <id>aliyun-nexus</id>
  589. <name>aliyun</name>
  590. <url>https://maven.aliyun.com/nexus/content/groups/public/</url>
  591. <snapshots>
  592. <enabled>false</enabled>
  593. </snapshots>
  594. </repository>
  595. <repository>
  596. <id>hsweb-nexus</id>
  597. <name>Nexus Release Repository</name>
  598. <url>https://nexus.jetlinks.cn/content/groups/public/</url>
  599. <releases>
  600. <enabled>false</enabled>
  601. </releases>
  602. <snapshots>
  603. <enabled>true</enabled>
  604. <updatePolicy>always</updatePolicy>
  605. </snapshots>
  606. </repository>
  607. </repositories>
  608. <distributionManagement>
  609. <repository>
  610. <id>releases</id>
  611. <name>Nexus Release Repository</name>
  612. <url>https://nexus.jetlinks.cn/content/repositories/releases/</url>
  613. </repository>
  614. <snapshotRepository>
  615. <id>snapshots</id>
  616. <name>Nexus Snapshot Repository</name>
  617. <url>https://nexus.jetlinks.cn/content/repositories/snapshots/</url>
  618. </snapshotRepository>
  619. </distributionManagement>
  620. <pluginRepositories>
  621. <pluginRepository>
  622. <id>aliyun-nexus</id>
  623. <name>aliyun</name>
  624. <url>https://maven.aliyun.com/nexus/content/groups/public/</url>
  625. </pluginRepository>
  626. </pluginRepositories>
  627. </project>

6.分别单独下载jetlinks模块里面的三个空文件夹,单独下载另外三个模块,重命名,然后进行替换。

7.然后配置maven镜像下载地址,在setting.xml文件中加上jetlinks下载地址。

8.maven的setting.xml配置,(如果懒得配置直接copy替换,但是注意仓库地址记得改一下)

  1. <?xml version="1.0" encoding="UTF-8"?>
  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. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing,
  12. software distributed under the License is distributed on an
  13. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. KIND, either express or implied. See the License for the
  15. specific language governing permissions and limitations
  16. under the License.
  17. -->
  18. <!--
  19. | This is the configuration file for Maven. It can be specified at two levels:
  20. |
  21. | 1. User Level. This settings.xml file provides configuration for a single user,
  22. | and is normally provided in ${user.home}/.m2/settings.xml.
  23. |
  24. | NOTE: This location can be overridden with the CLI option:
  25. |
  26. | -s /path/to/user/settings.xml
  27. |
  28. | 2. Global Level. This settings.xml file provides configuration for all Maven
  29. | users on a machine (assuming they're all using the same Maven
  30. | installation). It's normally provided in
  31. | ${maven.conf}/settings.xml.
  32. |
  33. | NOTE: This location can be overridden with the CLI option:
  34. |
  35. | -gs /path/to/global/settings.xml
  36. |
  37. | The sections in this sample file are intended to give you a running start at
  38. | getting the most out of your Maven installation. Where appropriate, the default
  39. | values (values used when the setting is not specified) are provided.
  40. |
  41. |-->
  42. <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  43. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  44. xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  45. <!-- localRepository
  46. | The path to the local repository maven will use to store artifacts.
  47. |
  48. | Default: ${user.home}/.m2/repository
  49. <localRepository>/path/to/local/repo</localRepository>
  50. -->
  51. <localRepository>D:/apache-maven-3.5.4/repository</localRepository>
  52. <!-- interactiveMode
  53. | This will determine whether maven prompts you when it needs input. If set to false,
  54. | maven will use a sensible default value, perhaps based on some other setting, for
  55. | the parameter in question.
  56. |
  57. | Default: true
  58. <interactiveMode>true</interactiveMode>
  59. -->
  60. <!-- offline
  61. | Determines whether maven should attempt to connect to the network when executing a build.
  62. | This will have an effect on artifact downloads, artifact deployment, and others.
  63. |
  64. | Default: false
  65. <offline>false</offline>
  66. -->
  67. <!-- pluginGroups
  68. | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
  69. | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
  70. | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
  71. |-->
  72. <pluginGroups>
  73. <!-- pluginGroup
  74. | Specifies a further group identifier to use for plugin lookup.
  75. <pluginGroup>com.your.plugins</pluginGroup>
  76. -->
  77. </pluginGroups>
  78. <!-- proxies
  79. | This is a list of proxies which can be used on this machine to connect to the network.
  80. | Unless otherwise specified (by system property or command-line switch), the first proxy
  81. | specification in this list marked as active will be used.
  82. |-->
  83. <proxies>
  84. <!-- proxy
  85. | Specification for one proxy, to be used in connecting to the network.
  86. |
  87. <proxy>
  88. <id>optional</id>
  89. <active>true</active>
  90. <protocol>http</protocol>
  91. <username>proxyuser</username>
  92. <password>proxypass</password>
  93. <host>proxy.host.net</host>
  94. <port>80</port>
  95. <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
  96. </proxy>
  97. -->
  98. </proxies>
  99. <!-- servers
  100. | This is a list of authentication profiles, keyed by the server-id used within the system.
  101. | Authentication profiles can be used whenever maven must make a connection to a remote server.
  102. |-->
  103. <servers>
  104. <!-- server
  105. | Specifies the authentication information to use when connecting to a particular server, identified by
  106. | a unique name within the system (referred to by the 'id' attribute below).
  107. |
  108. | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are
  109. | used together.
  110. |
  111. <server>
  112. <id>deploymentRepo</id>
  113. <username>repouser</username>
  114. <password>repopwd</password>
  115. </server>
  116. -->
  117. <!-- Another sample, using keys to authenticate.
  118. <server>
  119. <id>siteServer</id>
  120. <privateKey>/path/to/private/key</privateKey>
  121. <passphrase>optional; leave empty if not used.</passphrase>
  122. </server>
  123. -->
  124. </servers>
  125. <!-- mirrors
  126. | This is a list of mirrors to be used in downloading artifacts from remote repositories.
  127. |
  128. | It works like this: a POM may declare a repository to use in resolving certain artifacts.
  129. | However, this repository may have problems with heavy traffic at times, so people have mirrored
  130. | it to several places.
  131. |
  132. | That repository definition will have a unique id, so we can create a mirror reference for that
  133. | repository, to be used as an alternate download site. The mirror site will be the preferred
  134. | server for that repository.
  135. |-->
  136. <mirrors>
  137. <!-- mirror
  138. | Specifies a repository mirror site to use instead of a given repository. The repository that
  139. | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
  140. | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
  141. |
  142. -->
  143. <mirror>
  144. <id>hsweb-nexus</id>
  145. <name>Nexus Release Repository</name>
  146. <mirrorOf>central</mirrorOf>
  147. <url>https://nexus.jetlinks.cn/content/groups/public</url>
  148. </mirror>
  149. <!--
  150. <mirror>
  151. <id>nexus-aliyun</id>
  152. <mirrorOf>central</mirrorOf>
  153. <name>Nexus aliyun</name>
  154. <url>http://maven.aliyun.com/nexus/content/groups/public</url>
  155. </mirror>
  156. -->
  157. </mirrors>
  158. <!-- 阿里云镜像2 -->
  159. <!-- profiles
  160. | This is a list of profiles which can be activated in a variety of ways, and which can modify
  161. | the build process. Profiles provided in the settings.xml are intended to provide local machine-
  162. | specific paths and repository locations which allow the build to work in the local environment.
  163. |
  164. | For example, if you have an integration testing plugin - like cactus - that needs to know where
  165. | your Tomcat instance is installed, you can provide a variable here such that the variable is
  166. | dereferenced during the build process to configure the cactus plugin.
  167. |
  168. | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
  169. | section of this document (settings.xml) - will be discussed later. Another way essentially
  170. | relies on the detection of a system property, either matching a particular value for the property,
  171. | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a
  172. | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
  173. | Finally, the list of active profiles can be specified directly from the command line.
  174. |
  175. | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
  176. | repositories, plugin repositories, and free-form properties to be used as configuration
  177. | variables for plugins in the POM.
  178. |
  179. |-->
  180. <profiles>
  181. <!-- profile
  182. | Specifies a set of introductions to the build process, to be activated using one or more of the
  183. | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
  184. | or the command line, profiles have to have an ID that is unique.
  185. |
  186. | An encouraged best practice for profile identification is to use a consistent naming convention
  187. | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
  188. | This will make it more intuitive to understand what the set of introduced profiles is attempting
  189. | to accomplish, particularly when you only have a list of profile id's for debug.
  190. |
  191. | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
  192. <profile>
  193. <id>jdk-1.4</id>
  194. <activation>
  195. <jdk>1.4</jdk>
  196. </activation>
  197. <repositories>
  198. <repository>
  199. <id>jdk14</id>
  200. <name>Repository for JDK 1.4 builds</name>
  201. <url>http://www.myhost.com/maven/jdk14</url>
  202. <layout>default</layout>
  203. <snapshotPolicy>always</snapshotPolicy>
  204. </repository>
  205. </repositories>
  206. </profile>
  207. -->
  208. <!--
  209. | Here is another profile, activated by the system property 'target-env' with a value of 'dev',
  210. | which provides a specific path to the Tomcat instance. To use this, your plugin configuration
  211. | might hypothetically look like:
  212. |
  213. | ...
  214. | <plugin>
  215. | <groupId>org.myco.myplugins</groupId>
  216. | <artifactId>myplugin</artifactId>
  217. |
  218. | <configuration>
  219. | <tomcatLocation>${tomcatPath}</tomcatLocation>
  220. | </configuration>
  221. | </plugin>
  222. | ...
  223. |
  224. | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
  225. | anything, you could just leave off the <value/> inside the activation-property.
  226. |
  227. <profile>
  228. <id>env-dev</id>
  229. <activation>
  230. <property>
  231. <name>target-env</name>
  232. <value>dev</value>
  233. </property>
  234. </activation>
  235. <properties>
  236. <tomcatPath>/path/to/tomcat/instance</tomcatPath>
  237. </properties>
  238. </profile>
  239. -->
  240. </profiles>
  241. <!-- activeProfiles
  242. | List of profiles that are active for all builds.
  243. |
  244. <activeProfiles>
  245. <activeProfile>alwaysActiveProfile</activeProfile>
  246. <activeProfile>anotherAlwaysActiveProfile</activeProfile>
  247. </activeProfiles>
  248. -->
  249. </settings>

9.顺便配置一下maven环境,如图所示:

10.配置完系统的maven环境之后,建议重启电脑,方可在idea内部的terminal命令生效。

11.上述操作完成之后,就用idea打开jetlinks项目,然后完成maven包的下载。

12.安装项目需要的软件如postgreSQL,redis ,elasticsearch,emqx。

13.elasticsearch的安装

  13.1到elasticsearch官网Download Elasticsearch | Elastic,按照如图所示选择, 一般选择7.x版本为佳。

14.下载emqx,postgreSQL,redis步骤省略。。。。。。。。。

15.另外次博文附加maven,elasticsearch,emqx,postgreSQL,redis项目所需软件,有需要的自行在绑定资源下载。

注意事项:在启动项目之前,必须先在postgreSQL创建jetlinks数据库,不然就会报错,就没办法创建表以及数据。

16.maven包下载完之后,启动项目所需软件,然后启动项目。

17.通过mvn package -DskipTests命令可以打包成linux平台部署的包。

18.maven包太大,无法上传,可在百度网盘链接下载。链接:https://pan.baidu.com/s/1qqtm_bTvn8ohh8uUCGBAhw 
提取码:1234 
--来自百度网盘超级会员V7的分享

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号