• 修改项目中的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上直接写死,不便于后期的维护。

     

  • 相关阅读:
    用shell脚本监控进程是否存在 不存在则启动的实例
    vue+element-ui+ajax实现一个表格的实例
    c的指针和php中的引用的区别
    mysql or条件查询优化
    Linq查询操作之投影操作
    Linq查询操作之Where筛选
    Linq专题之查询操作
    linq之join子句
    linq之let子句
    linq之into子句
  • 原文地址:https://www.cnblogs.com/dongyaotou/p/12460703.html
Copyright © 2020-2023  润新知