加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
pom.xml 14.81 KB
一键复制 编辑 原始数据 按行查看 历史
码匠君 提交于 2021-10-28 10:26 . feat: v2.5.6.0
<?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>cn.herodotus.eurynome</groupId>
<artifactId>dependencies</artifactId>
<version>2.5.6.0</version>
<relativePath>dependencies/pom.xml</relativePath>
</parent>
<artifactId>eurynome-cloud</artifactId>
<version>2.5.6.0</version>
<packaging>pom</packaging>
<name>eurynome-cloud</name>
<description>Top Eurynome project pom.xml file</description>
<!-- ${basedir} 项目根目录 -->
<!-- ${project.build.directory} 构建目录,缺省为target -->
<!-- ${project.build.outputDirectory} 构建过程输出目录,缺省为target/classes -->
<!-- ${project.build.finalName} 产出物名称,缺省为${project.artifactId}-${project.version} -->
<!-- ${project.packaging} 打包类型,缺省为jar -->
<!-- ${project.xxx} 当前pom文件的任意节点的内容 如project.artifactId -->
<properties>
<java.version>1.8</java.version>
<resource.delimiter>@</resource.delimiter>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!--配置参数-->
<!--为了便于Docker的构建,减少上下文影响,将所有Docker资源放置在同一个目录中进行构建-->
<docker.build.directory>../../configurations/docker/context/target</docker.build.directory>
<docker.resource.name>${project.build.finalName}.${project.packaging}</docker.resource.name>
<docker.namespace>eurynome.cloud</docker.namespace>
<docker.host>http://192.168.101.10:2375</docker.host>
<docker.registry>192.168.101.10</docker.registry>
<docker.namespace>eurynome.cloud</docker.namespace>
<docker.username>username</docker.username>
<docker.password>password</docker.password>
</properties>
<!-- 所有的子项目默认依赖 -->
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
</dependencies>
<!-- 管理依赖版本号,子项目不会默认依赖 -->
<dependencyManagement>
<dependencies>
</dependencies>
</dependencyManagement>
<modules>
<module>dependencies</module>
<module>packages</module>
<module>services</module>
<module>platform</module>
</modules>
<!-- 环境 -->
<profiles>
<!-- 开发 -->
<profile>
<id>development</id>
<activation>
<!--默认激活配置-->
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!--当前环境-->
<profile.name>development</profile.name>
<database.type>postgresql</database.type>
<!--代码构建控制-->
<!--跳过构建源代码包-->
<skip.build.source.package>false</skip.build.source.package>
<!--不copy代码包到docker构建目录-->
<skip.copy.docker.resource>false</skip.copy.docker.resource>
<!--不执行git commit 构建-->
<skip.build.git.commit.info>false</skip.build.git.commit.info>
<!--Nacos配置中心地址-->
<config.server-addr>192.168.101.10:8848</config.server-addr>
<!--Nacos配置中心命名空间,用于支持多环境.这里必须使用ID,不能使用名称,默认为空-->
<!-- <config.namespace>8fdcc073-2e51-4722-8274-3f5b76362bb8</config.namespace>-->
<config.namespace></config.namespace>
<!--Nacos服务发现地址-->
<discovery.server-addr>192.168.101.10:8848</discovery.server-addr>
<sentinel.server-addr>192.168.101.10:8858</sentinel.server-addr>
</properties>
</profile>
<!-- 生产 -->
<profile>
<id>production</id>
<properties>
<!--当前环境-->
<profile.name>production</profile.name>
<database.type>mysql8</database.type>
<!--代码构建控制-->
<!--跳过构建源代码包-->
<skip.build.source.package>false</skip.build.source.package>
<!--不copy代码包到docker构建目录-->
<skip.copy.docker.resource>false</skip.copy.docker.resource>
<!--不执行git commit 构建-->
<skip.build.git.commit.info>false</skip.build.git.commit.info>
<!--Nacos配置中心地址-->
<config.server-addr>192.168.101.10:8848</config.server-addr>
<!--Nacos配置中心命名空间,用于支持多环境.这里必须使用ID,不能使用名称,默认为空-->
<!--<config.namespace>8fdcc073-2e51-4722-8274-3f5b76362bb8</config.namespace>-->
<config.namespace></config.namespace>
<!--Nacos服务发现地址-->
<discovery.server-addr>192.168.101.10:8848</discovery.server-addr>
<sentinel.server-addr>192.168.101.10:8858</sentinel.server-addr>
</properties>
</profile>
<!-- Docker -->
<profile>
<id>docker</id>
<properties>
<!--当前环境-->
<profile.name>docker</profile.name>
<!--数据库类型-->
<database.type>postgresql</database.type>
<!--代码构建控制-->
<!--跳过构建源代码包-->
<skip.build.source.package>false</skip.build.source.package>
<!--不copy代码包到docker构建目录-->
<skip.copy.docker.resource>false</skip.copy.docker.resource>
<!--不执行git commit 构建-->
<skip.build.git.commit.info>false</skip.build.git.commit.info>
<!--Nacos配置中心地址-->
<config.server-addr>192.168.101.10:8848</config.server-addr>
<!--Nacos配置中心命名空间,用于支持多环境.这里必须使用ID,不能使用名称,默认为空-->
<config.namespace></config.namespace>
<!--Nacos服务发现地址-->
<discovery.server-addr>192.168.101.10:8848</discovery.server-addr>
<sentinel.server-addr>192.168.101.10:8858</sentinel.server-addr>
</properties>
</profile>
</profiles>
<build>
<resources>
<!-- 先指定 src/main/resources下所有文件及文件夹为资源文件 -->
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>${maven-antrun-plugin.version}</version>
<executions>
<execution>
<id>delete-jar-file</id>
<phase>pre-clean</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<delete file="${docker.build.directory}/${docker.resource.name}"/>
</target>
</configuration>
</execution>
<execution>
<id>prepare-docker-resource</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!--jar包保存位置 -->
<copy todir="${docker.build.directory}">
<fileset dir="${project.basedir}/target">
<include name="${docker.resource.name}"/>
</fileset>
</copy>
</target>
</configuration>
</execution>
</executions>
</plugin>
<!-- docker打包插件 -->
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker-maven-plugin.version}</version>
<!--全局配置-->
<configuration>
<!--这一部分是为了实现对远程docker容器的控制-->
<!--docker主机地址,用于完成docker各项功能,注意是tcp不是http!-->
<dockerHost>${docker.host}</dockerHost>
<!--docker远程访问所需证书地址,如果docker远程主机没有启用TLS验证则不需要配证书-->
<!--<certPath>${project.basedir}/docker/ssh</certPath>-->
<!--这一部分是为了实现docker镜像的构建和推送-->
<!--registry地址,用于推送,拉取镜像,我这里用的是阿里的registry-->
<registry>${docker.registry}</registry>
<!-- 认证信息-->
<authConfig>
<push>
<username>${docker.username}</username>
<password>${docker.password}</password>
</push>
</authConfig>
<!--镜像相关配置,支持多镜像-->
<images>
<!-- 单个镜像配置 -->
<image>
<!--镜像名(含版本号) 命名空间/仓库名称:镜像版本号-->
<name>命名空间/仓库名称:镜像版本号</name>
<name>${docker.registry}/${docker.namespace}/${project.name}:${project.version}</name>
<!--别名:用于容器命名和在docker-compose.yml文件只能找到对应名字的配置-->
<alias>${project.name}</alias>
<!--镜像build相关配置-->
<build>
<!--使用dockerFile文件-->
<dockerFile>${project.basedir}/Dockerfile</dockerFile>
</build>
</image>
</images>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<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>
<showWarnings>true</showWarnings>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct-processor.version}</version>
</path>
<path>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<version>${spring-boot-dependencies.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
</plugin>
<plugin>
<!--打包跳过测试-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<skipSource>${skip.build.source.package}</skipSource>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<configuration>
<skip>${skip.build.git.commit.info}</skip>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>aliyun-maven</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>aliyun-maven</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化