All Downloads are FREE. Search and download functionalities are using the official Maven repository.

archetype-resources.pom.xml Maven / Gradle / Ivy

<?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.pig4cloud</groupId>
		<artifactId>pig-cloud-dependencies-parent</artifactId>
		<version>3.0.3</version>
	</parent>

	<groupId>${groupId}</groupId>
	<artifactId>${artifactId}</artifactId>
	<version>${version}</version>
	<packaging>pom</packaging>
	<name>${artifactId}</name>

	<properties>
		<spring-boot.version>2.4.2</spring-boot.version>
		<spring-cloud.version>2020.0.0</spring-cloud.version>
		<spring-cloud-alibaba.version>2.2.4.RELEASE</spring-cloud-alibaba.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<spring-boot-admin.version>2.3.1</spring-boot-admin.version>
		<mybatis-plus.version>3.4.2</mybatis-plus.version>
		<jasypt.version>2.1.0</jasypt.version>
		<docker.plugin.version>0.32.0</docker.plugin.version>
		<docker.host>http://192.168.0.100:2375</docker.host>
		<docker.registry>192.168.0.100</docker.registry>
		<docker.namespace>pig4cloud</docker.namespace>
		<docker.username>username</docker.username>
		<docker.password>password</docker.password>
	</properties>

	<!--项目子模块-->
	<modules>
		<module>${rootArtifactId}-api</module>
		<module>${rootArtifactId}-biz</module>
	</modules>

	<dependencies>
		<!-- bootstrap 启动器 -->
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-bootstrap</artifactId>
		</dependency>
		<!-- 配置文件处理器 -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-configuration-processor</artifactId>
			<optional>true</optional>
		</dependency>
		<!-- 配置文件加解密 -->
		<dependency>
			<groupId>com.github.ulisesbocchio</groupId>
			<artifactId>jasypt-spring-boot-starter</artifactId>
			<version>${jasypt.version}</version>
		</dependency>
		<!-- spring boot 端点 -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-actuator</artifactId>
		</dependency>
		<!-- 监控客户端 -->
		<dependency>
			<groupId>de.codecentric</groupId>
			<artifactId>spring-boot-admin-starter-client</artifactId>
			<version>${spring-boot-admin.version}</version>
		</dependency>
		<!-- Lombok -->
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<scope>provided</scope>
		</dependency>
		<!-- 测试依赖 -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-dependencies</artifactId>
				<version>${spring-boot.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-dependencies</artifactId>
				<version>${spring-cloud.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<!--spring cloud alibaba-->
			<dependency>
				<groupId>com.alibaba.cloud</groupId>
				<artifactId>spring-cloud-alibaba-dependencies</artifactId>
				<version>${spring-cloud-alibaba.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<repositories>
		<!--阿里云主仓库,代理了maven central和jcenter仓库-->
		<repository>
			<id>aliyun</id>
			<name>aliyun</name>
			<url>https://maven.aliyun.com/repository/public</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
	</repositories>

	<build>
		<finalName>${project.name}</finalName>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.springframework.boot</groupId>
					<artifactId>spring-boot-maven-plugin</artifactId>
					<version>${spring-boot.version}</version>
					<configuration>
						<finalName>${project.build.finalName}</finalName>
						<layers>
							<enabled>true</enabled>
						</layers>
					</configuration>
					<executions>
						<execution>
							<goals>
								<goal>repackage</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>io.fabric8</groupId>
					<artifactId>docker-maven-plugin</artifactId>
					<version>${docker.plugin.version}</version>
					<configuration>
						<!-- Docker Remote Api-->
						<dockerHost>${docker.host}</dockerHost>
						<!-- Docker 镜像私服-->
						<registry>${docker.registry}</registry>
						<!-- 认证信息-->
						<authConfig>
							<push>
								<username>${docker.username}</username>
								<password>${docker.password}</password>
							</push>
						</authConfig>
						<images>
							<image>
								<!-- 镜像名称: 172.17.0.111/library/pig-gateway:2.6.3-->
								<name>${docker.registry}/${docker.namespace}/${project.name}:${project.version}</name>
								<build>
									<dockerFile>${project.basedir}/Dockerfile</dockerFile>
								</build>
							</image>
						</images>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>dev</id>
			<properties>
				<!-- 环境标识,需要与配置文件的名称相对应 -->
				<profiles.active>dev</profiles.active>
			</properties>
			<activation>
				<!-- 默认环境 -->
				<activeByDefault>true</activeByDefault>
			</activation>
		</profile>
	</profiles>
</project>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy