Commit 15640d65 authored by zhouleilei's avatar zhouleilei

修改utc的打包方式

parent 9955602d
...@@ -3,4 +3,5 @@ utc.dt.service.url=http://127.0.0.1:39002/utc-dt ...@@ -3,4 +3,5 @@ utc.dt.service.url=http://127.0.0.1:39002/utc-dt
utc.hisense.service.url=http://127.0.0.1:39003/utc-hisense utc.hisense.service.url=http://127.0.0.1:39003/utc-hisense
control.url=http://127.0.0.1:32001/web control.url=http://127.0.0.1:32001/web
ehualu.url=http://127.0.0.1:30015 ehualu.url=http://127.0.0.1:30015
inforsuite.license-path=D:\\license inforsuite.license-path=D:\\license
\ No newline at end of file #inforsuite.license-path=/license
\ No newline at end of file
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
<properties> <properties>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<mybatis.generator.version>1.3.2</mybatis.generator.version>
<mysql.connector.version>5.1.41</mysql.connector.version>
</properties> </properties>
<dependencies> <dependencies>
...@@ -191,9 +193,9 @@ ...@@ -191,9 +193,9 @@
</dependency> </dependency>
<!-- 配置类处理器 --> <!-- 配置类处理器 -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId> <artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.el</groupId> <groupId>javax.el</groupId>
...@@ -224,6 +226,26 @@ ...@@ -224,6 +226,26 @@
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>${mybatis.generator.version}</version>
<configuration>
<configurationFile>${basedir}/src/main/resources/mybatis-generator/generatorConfig.xml
</configurationFile>
<verbose>true</verbose>
<overwrite>true</overwrite>
</configuration>
<dependencies>
<!-- 数据库驱动 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.connector.version}</version>
</dependency>
</dependencies>
</plugin>
<!-- swagger 导出配置 --> <!-- swagger 导出配置 -->
<plugin> <plugin>
<groupId>io.github.swagger2markup</groupId> <groupId>io.github.swagger2markup</groupId>
...@@ -258,11 +280,21 @@ ...@@ -258,11 +280,21 @@
<groupId>com.google.cloud.tools</groupId> <groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId> <artifactId>jib-maven-plugin</artifactId>
<version>2.5.2</version> <version>2.5.2</version>
<!-- 将jib与mvn构建的生命周期绑定 -->
<executions>
<execution>
<id>build-image</id>
<phase>install</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
<configuration> <configuration>
<!--from节点用来设置镜像的基础镜像,相当于Docerkfile中的FROM关键字--> <!--from节点用来设置镜像的基础镜像,相当于Docerkfile中的FROM关键字-->
<from> <from>
<!--使用harbor上的openjdk镜像--> <!--使用harbor上的openjdk镜像-->
<image>${harbor.ip.port}/xinkong/openjdk:8</image> <image>${harbor.ip.port}/xinkong/openjdk:8-alpine3.9</image>
<!--harbor服务器的登录信息--> <!--harbor服务器的登录信息-->
<auth> <auth>
<username>admin</username> <username>admin</username>
...@@ -280,7 +312,7 @@ ...@@ -280,7 +312,7 @@
<!--配置jvm虚拟机参数--> <!--配置jvm虚拟机参数-->
<jvmFlags> <jvmFlags>
<jvmFlag>-Xms512m</jvmFlag> <jvmFlag>-Xms512m</jvmFlag>
<jvmFlag>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=15115</jvmFlag> <jvmFlag>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=15119</jvmFlag>
</jvmFlags> </jvmFlags>
<!--配置使用的时区--> <!--配置使用的时区-->
<environment> <environment>
...@@ -300,16 +332,98 @@ ...@@ -300,16 +332,98 @@
<!--可以进行HTTP--> <!--可以进行HTTP-->
<allowInsecureRegistries>true</allowInsecureRegistries> <allowInsecureRegistries>true</allowInsecureRegistries>
</configuration> </configuration>
</plugin>
<!-- maven 打包方式-->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<!--<version>2.6</version>-->
<executions> <executions>
<!--将启动脚本复制到指定目录-->
<execution> <execution>
<phase>install</phase> <id>copy-bin</id>
<phase>package</phase>
<goals> <goals>
<goal>build</goal> <goal>copy-resources</goal>
</goals> </goals>
<configuration>
<outputDirectory>${project.parent.basedir}/assembly/${project.name}/bin</outputDirectory>
<resources>
<resource>
<directory>src/main/bin</directory>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
<!--将配置文件复制到指定目录-->
<execution>
<id>copy-configs</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.parent.basedir}/assembly/${project.name}/resources
</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>**/bin/*</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<!--将依赖jar包复制到lib目录-->
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.parent.basedir}/assembly/${project.name}/lib</outputDirectory>
</configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<!--指定生成jar包目录-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<!--<classpathPrefix>lib/</classpathPrefix>-->
<classpathPrefix></classpathPrefix>
<mainClass>net.wanji.utc.UtcApplication</mainClass>
</manifest>
<manifestEntries>
<Class-Path>../resources/</Class-Path>
</manifestEntries>
</archive>
<excludes>
<exclude>*.**</exclude>
<exclude>*/*.xml</exclude>
<!--<exclude>configs/**/**</exclude>-->
</excludes>
<outputDirectory>${project.parent.basedir}/assembly/${project.name}/lib</outputDirectory>
<classesDirectory>
</classesDirectory>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment