基于com.ai.abc.persistence-es 的es数据操作服务

pom.xml 9.4KB

    <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.3.4.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.ai.bss.es</groupId> <artifactId>es-manage</artifactId> <version>0.0.1-SNAPSHOT</version> <name>es-manage</name> <description>es manage for Spring Boot</description> <properties> <java.version>1.8</java.version> <!-- 这里必须要填写,因为springboot2.3.2默认的elasticsearch版本为7.6.2,我们使用的是7.4.2,不更改会产生版本不兼容等问题 --> <elasticsearch.version>7.4.2</elasticsearch.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!-- 这里我使用的是elasticsearch的high-level-client 版本要和你的elasticsearch版本对应--> <!-- <dependency>--> <!-- <groupId>org.elasticsearch.client</groupId>--> <!-- <artifactId>elasticsearch-rest-high-level-client</artifactId>--> <!-- <version>7.4.2</version>--> <!-- <exclusions>--> <!-- <exclusion>--> <!-- <groupId>org.elasticsearch</groupId>--> <!-- <artifactId>elasticsearch</artifactId>--> <!-- </exclusion>--> <!-- </exclusions>--> <!-- </dependency>--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> <exclusions> <exclusion> <groupId>org.junit.vintage</groupId> <artifactId>junit-vintage-engine</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.12</version> </dependency> <dependency> <groupId>com.ai.abc</groupId> <artifactId>persistence-es</artifactId> <version>2.0-SNAPSHOT</version> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-log4j2</artifactId> </exclusion> <!-- <exclusion>--> <!-- <groupId>org.elasticsearch</groupId>--> <!-- <artifactId>elasticsearch</artifactId>--> <!-- </exclusion>--> <!-- <exclusion>--> <!-- <groupId>org.elasticsearch.client</groupId>--> <!-- <artifactId>elasticsearch-rest-high-level-client</artifactId>--> <!-- </exclusion>--> <!-- <exclusion>--> <!-- <groupId>org.projectlombok</groupId>--> <!-- <artifactId>lombok</artifactId>--> <!-- </exclusion>--> </exclusions> </dependency> </dependencies> <build> <resources> <resource> <directory>src/main/resources</directory> <excludes> <exclude>environment/dev/**</exclude> <exclude>environment/product/**</exclude> <exclude>environment/test/**</exclude> </excludes> </resource> <resource> <directory>${project.basedir}/src/main/resources/environment/${env}</directory> </resource> </resources> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <executions> <execution> <id>copy-resources</id> <phase>package</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <encoding>UTF-8</encoding> <outputDirectory> ${project.build.directory}/config </outputDirectory> <resources> <resource> <directory>src/main/resources/environment/${env}</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> </resource> </resources> </configuration> </execution> </executions> </plugin>--> <!-- The configuration of maven-jar-plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.4</version> <!-- The configuration of the plugin --> <configuration> <!-- Configuration of the archiver --> <archive> <!--生成的jar中,不要包含pom.xml和pom.properties这两个文件--> <addMavenDescriptor>false</addMavenDescriptor> <!-- Manifest specific configuration --> <manifest> <!--是否要把第三方jar放到manifest的classpath中--> <addClasspath>true</addClasspath> <!--生成的manifest中classpath的前缀,因为要把第三方jar放到lib目录下,所以classpath的前缀是lib/--> <classpathPrefix>lib/</classpathPrefix> <!--应用的main class--> <mainClass>com.ai.bss.es.esmanage.EsManageApplication</mainClass> </manifest> <manifestEntries> <Class-Path>./config/</Class-Path> </manifestEntries> </archive> <!--过滤掉不希望包含在jar中的文件--> <excludes> <exclude>**/*.properties</exclude> <exclude>**/*.xml</exclude> </excludes> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.10</version> <executions> <execution> <id>copy-dependencies</id> <phase>package</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/lib</outputDirectory> </configuration> </execution> </executions> </plugin> <!-- The configuration of maven-assembly-plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.4</version> <!-- The configuration of the plugin --> <configuration> <!-- Specifies the configuration file of the assembly plugin --> <descriptors> <descriptor>${project.basedir}/src/main/assembly/package.xml</descriptor> </descriptors> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <skip>true</skip> </configuration> </plugin> </plugins> </build> </project>