2024-12-04 10:33:45 +08:00

147 lines
5.6 KiB
XML

<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.niu</groupId>
<artifactId>niucloud-admin-java</artifactId>
<version>1.0</version>
</parent>
<groupId>com.niu.app</groupId>
<artifactId>niucloud-web-app</artifactId>
<version>1.0</version>
<name>niucloud-web-app</name>
<description>niucloud-web-app</description>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>com.niu</groupId>
<artifactId>niucloud-core</artifactId>
<version>1.0</version>
</dependency>
<!-- 开发时热启动 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<finalName>web-app</finalName>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.3.10.RELEASE</version>
<configuration>
<mainClass>com.niu.app.WebAppApplication</mainClass>
<classifier>exec</classifier>
<includeSystemScope>false</includeSystemScope>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<!--
<plugin>
<groupId>com.jsecode.springboot</groupId>
<artifactId>ecode-springboot-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<executable>true</executable>
<allInOne>false</allInOne>
<classifier>exec</classifier>
<mainClass>com.niu.app.WebAppApplication</mainClass>
<distDir>../../../webroot/jar/lib</distDir>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<copy overwrite="true" file="target/web-app-exec.jar"
tofile="../webroot/jar/web-app-exec.jar"/>
<!--
<copy overwrite="true" file="target/classes/application.yml"
tofile="../webroot/jar/application.yml"/>
<copy overwrite="true" file="target/classes/application-prod.yml"
tofile="../webroot/jar/application-prod.yml"/>
-->
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>com.niu.app.common.tools.ProjectCompileAndBuildTools</argument>
<!-- -->
<argument>compile</argument>
<argument>build</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>