youlai-mall/youlai-gateway/pom.xml

169 lines
6.2 KiB
XML
Raw Normal View History

2020-06-24 18:20:09 +08:00
<?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>
2020-06-24 18:20:09 +08:00
<parent>
<artifactId>youlai-mall</artifactId>
<groupId>com.youlai</groupId>
2021-01-27 20:17:15 +08:00
<version>1.0.0</version>
2020-06-24 18:20:09 +08:00
</parent>
2020-06-28 23:40:56 +08:00
<artifactId>youlai-gateway</artifactId>
<packaging>jar</packaging>
2020-06-28 23:40:56 +08:00
<properties>
2021-01-27 20:17:15 +08:00
<youlai.version>1.0.0</youlai.version>
</properties>
2020-06-24 18:20:09 +08:00
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
2020-06-24 18:20:09 +08:00
<dependency>
<groupId>org.springframework.cloud</groupId>
2020-08-23 14:26:47 +08:00
<artifactId>spring-cloud-starter-gateway</artifactId>
2020-06-24 18:20:09 +08:00
</dependency>
2020-06-24 18:20:09 +08:00
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
2020-06-24 18:20:09 +08:00
</dependency>
2020-08-23 14:26:47 +08:00
2020-06-24 18:20:09 +08:00
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-resource-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-jose</artifactId>
</dependency>
<dependency>
<groupId>com.youlai</groupId>
<artifactId>common-core</artifactId>
<version>${youlai.version}</version>
</dependency>
<dependency>
<groupId>com.youlai</groupId>
<artifactId>common-redis</artifactId>
<version>${youlai.version}</version>
</dependency>
2021-01-27 15:45:03 +08:00
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
</dependency>
2020-06-24 18:20:09 +08:00
</dependencies>
2020-12-04 23:53:01 +08:00
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!-- Jib插件构建镜像上传至阿里云镜像仓库 -->
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>2.7.1</version>
<configuration>
<from>
<image>openjdk:8-jdk-alpine</image>
</from>
<to>
<!-- 阿里云镜像仓库公网地址-->
<image>registry.cn-shanghai.aliyuncs.com/youlai/youlai-gateway</image>
<!-- 镜像版本号 -->
<tags>
<tag>latest</tag>
</tags>
<auth>
<username>1490493387@qq.com</username>
<password>hxr1006111026</password>
</auth>
</to>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- docker-maven-plugin 构建镜像上传至云服务器 -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<!--执行mvn package,即执行 mvn clean package docker:build-->
<execution>
<id>build-image</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
2020-12-04 23:53:01 +08:00
<configuration>
<!-- 镜像名称 -->
<imageName>${project.artifactId}</imageName>
<!-- 指定标签 -->
<imageTags>
<imageTag>latest</imageTag>
</imageTags>
<!-- 基础镜像-->
<baseImage>openjdk:8-jdk-alpine</baseImage>
<!-- 切换到容器工作目录-->
<workdir>/</workdir>
<entryPoint>["java","-jar","${project.build.finalName}.jar"]</entryPoint>
<!-- 指定远程 Docker API地址 -->
2020-12-06 23:54:52 +08:00
<dockerHost>https://a.youlai.store:2376</dockerHost>
<!-- 指定tls证书的目录 -->
2021-02-11 23:43:25 +08:00
<dockerCertPath>C:\cert\docker\a.youlai.store</dockerCertPath>
<!-- 复制 jar包到docker容器指定目录-->
<resources>
<resource>
<targetPath>/</targetPath>
<!-- 用于指定需要复制的根目录,${project.build.directory}表示target目录 -->
<directory>${project.build.directory}</directory>
<!-- 用于指定需要复制的文件,${project.build.finalName}.jar就是打包后的target目录下的jar包名称 -->
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
2020-12-04 23:53:01 +08:00
</configuration>
</plugin>
</plugins>
</build>
2020-08-23 14:26:47 +08:00
</project>