pom.xml 14.5 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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.mortals.xhx</groupId>
        <artifactId>smart-gov-platform</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </parent>

    <artifactId>smart-gateway</artifactId>
    <packaging>jar</packaging>
    <description>一体化政务网关</description>

    <profiles>
        <profile>
            <id>develop</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <profiles.active>develop</profiles.active>
                <profiles.server.port>17214</profiles.server.port>
                <profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost>
                <profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
                <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
                <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
                <profiles.log.path>/mortals/app/logs</profiles.log.path>
                <profiles.publish.path>/home/publish</profiles.publish.path>

            </properties>
        </profile>
        <profile>
            <id>test</id>
            <properties>
                <profiles.active>test</profiles.active>
                <profiles.server.ip>192.168.0.98</profiles.server.ip>
                <profiles.server.port>17214</profiles.server.port>
                <profiles.nginx.port>11078</profiles.nginx.port>
                <profiles.rabbitmq.host>192.168.0.98</profiles.rabbitmq.host>
                <profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
                <profiles.rabbitmq.username>taxi_mq</profiles.rabbitmq.username>
                <profiles.rabbitmq.password>admin@2020</profiles.rabbitmq.password>
                <profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost>
                <profiles.nacos.server-addr>192.168.0.252:8848</profiles.nacos.server-addr>
                <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
                <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
                <profiles.log.level>INFO</profiles.log.level>
                <profiles.log.path>/home/mortals/app/logs</profiles.log.path>
                <profiles.publish.path>/home/publish</profiles.publish.path>

            </properties>
        </profile>

        <profile>
            <id>product</id>
            <properties>
                <profiles.active>yibin</profiles.active>
                <profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host>
                <profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
                <profiles.rabbitmq.username>taxi_mq</profiles.rabbitmq.username>
                <profiles.rabbitmq.password>admin@2020</profiles.rabbitmq.password>
                <profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost>
                <profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
                <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
                <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
                <profiles.log.level>INFO</profiles.log.level>
                <profiles.log.path>/home/mortals/app/logs</profiles.log.path>
                <profiles.publish.path>/home/publish</profiles.publish.path>
            </properties>
        </profile>

        <profile>
            <id>yibin</id>
            <properties>
                <profiles.active>yibin</profiles.active>
                <profiles.server.ip>192.168.2.144</profiles.server.ip>
                <profiles.server.port>17214</profiles.server.port>
                <profiles.nginx.port>11078</profiles.nginx.port>
                <profiles.rabbitmq.host>172.15.28.117</profiles.rabbitmq.host>
                <profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
                <profiles.rabbitmq.username>taxi_mq</profiles.rabbitmq.username>
                <profiles.rabbitmq.password>admin@2020</profiles.rabbitmq.password>
                <profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost>
                <profiles.nacos.server-addr>172.15.28.120:8848</profiles.nacos.server-addr>
                <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
                <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
                <profiles.log.level>INFO</profiles.log.level>
                <profiles.log.path>/home/mortals/app/logs</profiles.log.path>
                <profiles.publish.path>/home/publish</profiles.publish.path>
            </properties>
        </profile>


        <profile>
            <id>sngx</id>
            <properties>
                <profiles.active>sngx</profiles.active>
                <profiles.server.ip>127.0.0.1</profiles.server.ip>
                <profiles.server.port>17214</profiles.server.port>
                <profiles.nginx.port>11078</profiles.nginx.port>
                <profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host>
                <profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
                <profiles.rabbitmq.username>taxi_mq</profiles.rabbitmq.username>
                <profiles.rabbitmq.password>admin@2020</profiles.rabbitmq.password>
                <profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost>
                <profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
                <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
                <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
                <profiles.log.level>INFO</profiles.log.level>
                <profiles.log.path>/home/mortals/app/logs</profiles.log.path>
                <profiles.publish.path>/home/publish</profiles.publish.path>
            </properties>
        </profile>

        <profile>
            <id>regtest</id>
            <properties>
                <profiles.active>regtest</profiles.active>
                <profiles.server.port>17214</profiles.server.port>
                <profiles.publish.path>/home/publish</profiles.publish.path>
                <profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host>
                <profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
                <profiles.rabbitmq.username>taxi_mq</profiles.rabbitmq.username>
                <profiles.rabbitmq.password>admin@2020</profiles.rabbitmq.password>
                <profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost>
                <profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
                <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
                <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
                <profiles.log.path>/home/mortals/app/logs</profiles.log.path>
                <profiles.log.level>info</profiles.log.level>
            </properties>
        </profile>

        <profile>
            <id>reg</id>
            <properties>
                <profiles.active>reg</profiles.active>
                <profiles.server.port>17214</profiles.server.port>
                <profiles.publish.path>/home/publish</profiles.publish.path>
                <profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host>
                <profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
                <profiles.rabbitmq.username>taxi_mq</profiles.rabbitmq.username>
                <profiles.rabbitmq.password>admin@2020</profiles.rabbitmq.password>
                <profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost>
                <profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
                <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
                <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
                <profiles.log.path>/home/mortals/app/logs</profiles.log.path>
                <profiles.log.level>info</profiles.log.level>
            </properties>
        </profile>

        <profile>
            <id>yanyuan</id>
            <properties>
                <profiles.active>yanyuan</profiles.active>
                <profiles.server.port>17214</profiles.server.port>
                <profiles.publish.path>/home/publish</profiles.publish.path>
                <profiles.rabbitmq.host>172.16.30.245</profiles.rabbitmq.host>
                <profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
                <profiles.rabbitmq.username>taxi_mq</profiles.rabbitmq.username>
                <profiles.rabbitmq.password>admin@2020</profiles.rabbitmq.password>
                <profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost>
                <profiles.nacos.server-addr>172.16.30.245:8848</profiles.nacos.server-addr>
                <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
                <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
                <profiles.log.path>/home/mortals/app/logs</profiles.log.path>
                <package.environment>build</package.environment>
                <profiles.log.level>info</profiles.log.level>
            </properties>
        </profile>



    </profiles>

    <properties>
        <!-- 流控 -->
        <sentinel.version>1.8.4</sentinel.version>
        <!-- 分布式事务 -->
        <seata.version>1.5.1</seata.version>
    </properties>

    <dependencies>

        <dependency>
            <groupId>com.mortals.xhx</groupId>
            <artifactId>common-lib</artifactId>
        </dependency>
        <!-- Sa-Token 权限认证(Reactor响应式集成), 在线文档:http://sa-token.dev33.cn/ -->
        <dependency>
            <groupId>cn.dev33</groupId>
            <artifactId>sa-token-reactor-spring-boot-starter</artifactId>
            <version>1.30.0</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-loadbalancer</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-gateway</artifactId>
        </dependency>

        <!-- 引入 SpringMVC 相关依赖,并实现对其的自动配置 -->

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-redis</artifactId>
        </dependency>
    </dependencies>


    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-bin</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <encoding>UTF-8</encoding>
                            <outputDirectory>target/bin
                            </outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/bin/</directory>
                                    <excludes>
                                        <exclude>deploy.sh</exclude>
                                    </excludes>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>

                    <execution>
                        <id>copy-deploy</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <encoding>UTF-8</encoding>
                            <outputDirectory>${project.parent.basedir}/dist/${project.artifactId}/
                            </outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/bin</directory>
                                    <includes>
                                        <include>deploy.sh</include>
                                    </includes>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <finalName>smart-gateway</finalName>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptors>
                                <descriptor>./assembly/assembly.xml</descriptor>
                            </descriptors>
                            <outputDirectory>${project.parent.basedir}/dist/${project.artifactId}</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>