pom.xml 5.46 KB
<?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">
    <parent>
        <artifactId>huaheng-modules</artifactId>
        <groupId>com.huaheng</groupId>
        <version>3.0.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>huaheng-modules-inventory</artifactId>

    <dependencies>
        <!-- huaheng Common Datascope -->
        <dependency>
            <groupId>com.huaheng</groupId>
            <artifactId>huaheng-common-datascope</artifactId>
        </dependency>
        <!-- huaheng Common Log -->
        <dependency>
            <groupId>com.huaheng</groupId>
            <artifactId>huaheng-common-log</artifactId>
        </dependency>

        <!-- huaheng Common Swagger -->
        <dependency>
            <groupId>com.huaheng</groupId>
            <artifactId>huaheng-common-swagger</artifactId>
        </dependency>

        <dependency>
            <groupId>com.huaheng</groupId>
            <artifactId>huaheng-api-config</artifactId>
            <version>3.0.0</version>
        </dependency>

        <dependency>
            <groupId>com.huaheng</groupId>
            <artifactId>huaheng-api-inventory</artifactId>
            <version>3.0.0</version>
        </dependency>

        <dependency>
            <groupId>com.huaheng</groupId>
            <artifactId>huaheng-api-task</artifactId>
            <version>3.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.huaheng</groupId>
            <artifactId>huaheng-api-cycle</artifactId>
            <version>3.0.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.huaheng</groupId>
            <artifactId>huaheng-api-shipment</artifactId>
            <version>3.0.0</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-alibaba-seata</artifactId>
            <version>2.2.0.RELEASE</version>
            <exclusions>
                <exclusion>
                    <groupId>io.seata</groupId>
                    <artifactId>seata-spring-boot-starter</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>io.seata</groupId>
            <artifactId>seata-spring-boot-starter</artifactId>
            <version>1.4.0</version>
        </dependency>
        <dependency>
            <groupId>com.huaheng</groupId>
            <artifactId>huaheng-modules-config</artifactId>
            <version>3.0.0</version>
            <scope>compile</scope>
        </dependency>

    </dependencies>

    <build>
        <finalName>huaheng-inventory</finalName>
        <!--打包时 排除jar包里面的配置文件,后面会将配置文件打在jar同级的config目录下 -->
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.1.1</version>
                <configuration>
                    <archive>
                        <!--设置jar依赖的第三方jar的目录前缀 和下放的copy-dependency所设置的目录相对应 -->
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>lib</classpathPrefix>
                            <!--配置jar启动类 -->
                            <mainClass>com.huaheng.inventory.HuahengInventoryApplication</mainClass>
                        </manifest>
                        <manifestEntries>
                            <Class-Path>./</Class-Path>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>

            <!--拷贝第三方依赖文件到指定目录-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.1.2</version>
                <executions>
                    <execution>
                        <id>copy-dep</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <!--target/lib是依赖jar包的输出目录-->
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>