pom.xml 10.3 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>portal-manager</artifactId>
	<packaging>jar</packaging>
	<description>一体化政务门户管理平台</description>

	<properties>
		<!-- 默认值 -->
		<profiles.server.debug></profiles.server.debug>
		<profiles.server.port>17212</profiles.server.port>
		<profiles.log.path>/home/mortals/app/logs</profiles.log.path>
		<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
		<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
		<profiles.log.level>info</profiles.log.level>
		<profiles.publish.path>/home/publish</profiles.publish.path>
		<profiles.filepath>/mortals/app/data</profiles.filepath>
		<profiles.req.json.check>false</profiles.req.json.check>
		<profiles.trustedReferer></profiles.trustedReferer>
		<package.environment>build</package.environment>
		<skipUi>true</skipUi>
	</properties>


	<profiles>
		<profile>
			<id>develop</id>
			<properties>
				<profiles.active>develop</profiles.active>
				<profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
				<package.environment>test</package.environment>
			</properties>
		</profile>
		<profile>
			<id>test</id>
			<properties>
				<profiles.active>test</profiles.active>
				<profiles.nacos.server-addr>192.168.0.252:8848</profiles.nacos.server-addr>
				<profiles.server.debug>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5518</profiles.server.debug>
				<profiles.trustedReferer>192.168.0.98,localhost,192.168.0.252</profiles.trustedReferer>
				<profiles.sms.smsSendUrl>http://sms.wx3.com.cn</profiles.sms.smsSendUrl>
				<profiles.sms.apiId>ADsUXLrS81vZDU95</profiles.sms.apiId>
			</properties>
		</profile>

		<profile>
			<id>product</id>
			<properties>
				<profiles.active>product</profiles.active>
				<profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
				<profiles.sms.smsSendUrl>http://sms.wx3.com.cn</profiles.sms.smsSendUrl>
				<profiles.sms.apiId>ADsUXLrS81vZDU95</profiles.sms.apiId>
			</properties>
		</profile>
		<profile>
			<id>yibin</id>
			<properties>
				<profiles.active>yibin</profiles.active>
				<profiles.nacos.server-addr>172.15.28.120:8848</profiles.nacos.server-addr>
			</properties>
		</profile>

		<profile>
			<id>sngx</id>
			<properties>
				<profiles.active>sngx</profiles.active>
				<profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
				<package.environment>yibin</package.environment>
			</properties>
		</profile>

		<profile>
			<id>reg</id>
			<properties>
				<profiles.active>reg</profiles.active>
				<profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
			</properties>
		</profile>

		<profile>
			<id>qiling</id>
			<properties>
				<profiles.active>qiling</profiles.active>
				<profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
			</properties>
		</profile>

		<profile>
			<id>yanyuan</id>
			<properties>
				<profiles.active>yanyuan</profiles.active>
				<profiles.nacos.server-addr>172.16.30.245:8848</profiles.nacos.server-addr>
				<profiles.trustedReferer>127.0.0.1,localhost,10.233.82.175,172.16.30.245,172.16.30.246,172.16.30.247,172.16.30.248</profiles.trustedReferer>
			</properties>
		</profile>

		<profile>
			<id>pengxi</id>
			<properties>
				<profiles.active>pengxi</profiles.active>
				<profiles.nacos.server-addr>192.168.106.6:8848</profiles.nacos.server-addr>
			</properties>
		</profile>

		<profile>
			<id>bzjkq</id>
			<properties>
				<profiles.active>bzjkq</profiles.active>
				<profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
			</properties>
		</profile>

		<profile>
			<id>qionglai</id>
			<properties>
				<profiles.active>qionglai</profiles.active>
				<profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
				<profiles.sms.smsSendUrl>http://sms.wx3.com.cn</profiles.sms.smsSendUrl>
				<profiles.sms.apiId>ADsUXLrS81vZDU95</profiles.sms.apiId>
			</properties>
		</profile>

	</profiles>


	<dependencies>
		<dependency>
			<groupId>com.mortals.xhx</groupId>
			<artifactId>common-lib</artifactId>
		</dependency>

		<!-- 引入 SpringMVC 相关依赖,并实现对其的自动配置 -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>

		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>druid-spring-boot-starter</artifactId>
		</dependency>

		<dependency>
			<groupId>org.mybatis.spring.boot</groupId>
			<artifactId>mybatis-spring-boot-starter</artifactId>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
		</dependency>

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

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-websocket</artifactId>
			<version>2.5.2</version>
		</dependency>

		<dependency>
			<groupId>org.freemarker</groupId>
			<artifactId>freemarker</artifactId>
			<version>2.3.31</version>
		</dependency>

		<dependency>
			<groupId>com.github.xiaoymin</groupId>
			<artifactId>knife4j-spring-boot-starter</artifactId>
		</dependency>

		<dependency>
			<groupId>com.github.javaparser</groupId>
			<artifactId>javaparser-core</artifactId>
			<version>3.25.6</version>
		</dependency>

		<!--Token生成与解析-->
		<dependency>
			<groupId>io.jsonwebtoken</groupId>
			<artifactId>jjwt</artifactId>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<!-- 达梦数据库驱动-->
		<dependency>
			<groupId>com.dameng</groupId>
			<artifactId>DmJdbcDriver18</artifactId>
			<version>8.1.1.193</version>
		</dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
    </dependencies>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</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-compiler-plugin</artifactId>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
					<encoding>${project.build.sourceEncoding}</encoding>
				</configuration>
			</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>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>1.6.0</version>
				<configuration>
					<skip>${skipUi}</skip>
				</configuration>
				<executions>
					<execution>
						<id>exec-npm-install</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>exec</goal>
						</goals>
						<configuration>
							<executable>yarn</executable>
							<arguments>
								<argument></argument>
							</arguments>
							<workingDirectory>${project.parent.basedir}/${project.artifactId}-ui/admin</workingDirectory>
						</configuration>
					</execution>

					<execution>
						<id>exec-npm-run-build</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>exec</goal>
						</goals>
						<configuration>
							<executable>yarn</executable>
							<arguments>
								<argument>run</argument>
								<arguments>${package.environment}</arguments>
							</arguments>
							<workingDirectory>${project.parent.basedir}/${project.artifactId}-ui/admin</workingDirectory>
						</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>${project.artifactId}</finalName>
							<appendAssemblyId>false</appendAssemblyId>
							<descriptors>
								<descriptor>./assembly/assembly.xml</descriptor>
							</descriptors>
							<outputDirectory>${project.parent.basedir}/dist/${project.artifactId}</outputDirectory>
						</configuration>
					</execution>
					<execution>
						<id>make-assembly-ui</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<skipAssembly>${skipUi}</skipAssembly>
							<finalName>${project.artifactId}-ui</finalName>
							<appendAssemblyId>false</appendAssemblyId>
							<descriptors>
								<descriptor>./assembly/assembly-manager-ui.xml</descriptor>
							</descriptors>
							<outputDirectory>${project.parent.basedir}/dist/${project.artifactId}</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

</project>