forked from p81075629/datagear
276 lines
8.4 KiB
XML
276 lines
8.4 KiB
XML
<?xml version="1.0"?>
|
||
<project
|
||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||
<modelVersion>4.0.0</modelVersion>
|
||
<parent>
|
||
<groupId>org.datagear</groupId>
|
||
<artifactId>datagear</artifactId>
|
||
<version>2.9.0</version>
|
||
</parent>
|
||
|
||
<artifactId>datagear-web</artifactId>
|
||
<name>datagear-web</name>
|
||
<packaging>war</packaging>
|
||
|
||
<properties>
|
||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||
<productName>datagear-${project.version}</productName>
|
||
<productNameJar>${productName}.jar</productNameJar>
|
||
<productNameWar>${productName}.war</productNameWar>
|
||
<dist.target.dir>${project.build.directory}/${productName}-bin/${productName}</dist.target.dir>
|
||
<dist.package.target.dir>${project.build.directory}/${productName}-packages</dist.package.target.dir>
|
||
</properties>
|
||
|
||
<dependencies>
|
||
<dependency>
|
||
<groupId>org.datagear</groupId>
|
||
<artifactId>datagear-persistence</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.datagear</groupId>
|
||
<artifactId>datagear-management</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.datagear</groupId>
|
||
<artifactId>datagear-dataexchange</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.datagear</groupId>
|
||
<artifactId>datagear-analysis</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.datagear</groupId>
|
||
<artifactId>datagear-util</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>javax.servlet</groupId>
|
||
<artifactId>javax.servlet-api</artifactId>
|
||
<scope>provided</scope>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-web</artifactId>
|
||
<exclusions>
|
||
<!-- 后面重新引入并设为provided,避免war包中包含内嵌Server库 -->
|
||
<exclusion>
|
||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||
<groupId>org.springframework.boot</groupId>
|
||
</exclusion>
|
||
</exclusions>
|
||
</dependency>
|
||
<dependency>
|
||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<scope>provided</scope>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-freemarker</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-security</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-validation</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>com.github.ben-manes.caffeine</groupId>
|
||
<artifactId>caffeine</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.springframework</groupId>
|
||
<artifactId>spring-jdbc</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.aspectj</groupId>
|
||
<artifactId>aspectjweaver</artifactId>
|
||
<scope>runtime</scope>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>com.fasterxml.jackson.core</groupId>
|
||
<artifactId>jackson-databind</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.apache.derby</groupId>
|
||
<artifactId>derby</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.apache.commons</groupId>
|
||
<artifactId>commons-dbcp2</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>commons-fileupload</groupId>
|
||
<artifactId>commons-fileupload</artifactId>
|
||
<version>${commons-fileupload.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.quartz-scheduler</groupId>
|
||
<artifactId>quartz</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-devtools</artifactId>
|
||
<optional>true</optional>
|
||
</dependency>
|
||
</dependencies>
|
||
|
||
<build>
|
||
<finalName>${productName}</finalName>
|
||
|
||
<plugins>
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-war-plugin</artifactId>
|
||
<configuration>
|
||
<archive>
|
||
<manifestEntries>
|
||
<Built-By>datagear.tech</Built-By>
|
||
</manifestEntries>
|
||
</archive>
|
||
</configuration>
|
||
</plugin>
|
||
<plugin>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||
<executions>
|
||
<execution>
|
||
<goals>
|
||
<goal>repackage</goal>
|
||
</goals>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-antrun-plugin</artifactId>
|
||
<version>${maven-antrun-plugin.version}</version>
|
||
<executions>
|
||
<execution>
|
||
<id>clearDistDirectory</id>
|
||
<phase>prepare-package</phase>
|
||
<goals>
|
||
<goal>run</goal>
|
||
</goals>
|
||
<configuration>
|
||
<tasks>
|
||
<delete dir="${dist.target.dir}" includeEmptyDirs="true" />
|
||
<mkdir dir="${dist.target.dir}"/>
|
||
<delete dir="${dist.package.target.dir}" includeEmptyDirs="true" />
|
||
<mkdir dir="${dist.package.target.dir}" />
|
||
</tasks>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-resources-plugin</artifactId>
|
||
<executions>
|
||
<execution>
|
||
<id>prepareWarResources</id>
|
||
<phase>prepare-package</phase>
|
||
<goals>
|
||
<goal>copy-resources</goal>
|
||
</goals>
|
||
<configuration>
|
||
<outputDirectory>${project.build.directory}/${productName}/</outputDirectory>
|
||
<resources>
|
||
<resource>
|
||
<directory>dist/war</directory>
|
||
<filtering>true</filtering>
|
||
<includes>
|
||
<include>readme.txt</include>
|
||
</includes>
|
||
</resource>
|
||
</resources>
|
||
</configuration>
|
||
</execution>
|
||
|
||
<execution>
|
||
<id>prepareDistResources</id>
|
||
<phase>prepare-package</phase>
|
||
<goals>
|
||
<goal>copy-resources</goal>
|
||
</goals>
|
||
<configuration>
|
||
<outputDirectory>${dist.target.dir}/</outputDirectory>
|
||
<resources>
|
||
<resource>
|
||
<directory>dist/bin</directory>
|
||
<filtering>false</filtering>
|
||
<includes>
|
||
<include>config/**/*</include>
|
||
</includes>
|
||
</resource>
|
||
<resource>
|
||
<directory>dist/bin</directory>
|
||
<filtering>true</filtering>
|
||
<includes>
|
||
<include>readme.txt</include>
|
||
<include>shutdown.sh</include>
|
||
<include>startup.bat</include>
|
||
<include>startup.sh</include>
|
||
</includes>
|
||
</resource>
|
||
</resources>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-antrun-plugin</artifactId>
|
||
<version>${maven-antrun-plugin.version}</version>
|
||
<executions>
|
||
<execution>
|
||
<id>prepareWarLICENSE</id>
|
||
<phase>prepare-package</phase>
|
||
<goals>
|
||
<goal>run</goal>
|
||
</goals>
|
||
<configuration>
|
||
<tasks>
|
||
<copy file="../LICENSE" todir="${project.build.directory}/${productName}" />
|
||
</tasks>
|
||
</configuration>
|
||
</execution>
|
||
|
||
<execution>
|
||
<id>buildDistPackage</id>
|
||
<phase>package</phase>
|
||
<goals>
|
||
<goal>run</goal>
|
||
</goals>
|
||
<configuration>
|
||
<tasks>
|
||
<copy file="${project.build.directory}/${productName}.war" tofile="${dist.target.dir}/${productNameJar}" />
|
||
<mkdir dir="${dist.target.dir}/logs"/>
|
||
<copy file="../LICENSE" todir="${dist.target.dir}" />
|
||
|
||
<zip destfile="${dist.package.target.dir}/${productName}.zip" basedir="${project.build.directory}/${productName}-bin" includes="${productName}/**/*" />
|
||
<copy file="${project.build.directory}/${productNameWar}.original" tofile="${dist.package.target.dir}/${productNameWar}" />
|
||
</tasks>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
|
||
</plugins>
|
||
</build>
|
||
</project>
|