修改项目中的pom.xml文件,填缺少的jar包
最近修改项目中的pom文件,给项目填缺少的jar包,着也是我们在实际开发过程中会遇到的事情。
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>hfms.server</groupId> <artifactId>hfms-appli</artifactId> <name>hfms-appli</name> <version>1.0.0</version> <parent> <groupId>ins.framework</groupId> <artifactId>ins-framework-parent</artifactId> <version>6.2.2</version> </parent> <properties> <ins-framework.version>6.2.2</ins-framework.version> <httpClient.version>4.1</httpClient.version> <apache.poi.version>3.9</apache.poi.version> </properties> <profiles> <profile> <!-- 测试环境 --> <id>dev</id> <properties> <docker.image.prefix>harbortest.picchealth.com/hb-jczx-tyfwzt</docker.image.prefix> <!--镜像前缀--> </properties> </profile> <profile> <!-- 生产环境 --> <id>pro</id> <properties> <docker.image.prefix>harbortest.picchealth.com/hb-p-jczx-tyfwzt</docker.image.prefix> <!--镜像前缀--> </properties> </profile> </profiles> <dependencies> <!-- Web类型 --> <dependency> <groupId>ins.framework</groupId> <artifactId>ins-framework-web</artifactId> <version>${ins-framework.version}</version> </dependency> <!-- 微服务应用程序 --> <dependency> <groupId>ins.framework</groupId> <artifactId>ins-framework-cloud</artifactId> <version>${ins-framework.version}</version> </dependency> <!-- 代码生成工具 --> <dependency> <groupId>ins.framework</groupId> <artifactId>ins-framework-mybatis-generator</artifactId> <version>${ins-framework.version}</version> <scope>test</scope> </dependency> <!-- 好用的预编译工具lombok --> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpasyncclient</artifactId> <version>${httpClient.version}</version> </dependency> <!-- https://mvnrepository.com/artifact/com.alibaba/fastjson --> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.62</version> </dependency> <!-- https://mvnrepository.com/artifact/org.apache.poi/poi --> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>${apache.poi.version}</version> </dependency> <!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml --> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>${apache.poi.version}</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <addResources>false</addResources> </configuration> </plugin> <plugin> <groupId>com.spotify</groupId> <artifactId>docker-maven-plugin</artifactId> <version>0.4.13</version> <configuration> <imageName>${docker.image.prefix}/${project.artifactId}</imageName> <imageTags> <imageTag>${project.version}</imageTag> </imageTags> <dockerDirectory>src/main/docker</dockerDirectory> <resources> <resource> <targetPath>/</targetPath> <directory>${project.build.directory}</directory> <include>${project.build.finalName}.jar</include> </resource> </resources> </configuration> </plugin> </plugins> <defaultGoal>compile</defaultGoal> </build> </project>
注意版本的话,一定要在上面进行指定,不要再dependency上直接写死,不便于后期的维护。