Add build-war maven profile

The profile builds a .war file with no embedded tomcat, so it can be
deployed on a standalone tomcat instance
This commit is contained in:
2019-03-11 21:58:33 +01:00
parent a27d26596b
commit 0d83ea75b2

23
pom.xml
View File

@@ -14,7 +14,7 @@
<groupId>de.77zzcx7</groupId>
<artifactId>financer</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<packaging>${packaging.type}</packaging>
<name>financer</name>
@@ -23,6 +23,7 @@
<maven.compiler.source>1.9</maven.compiler.source>
<maven.compiler.target>1.9</maven.compiler.target>
<java.version>1.9</java.version>
<packaging.type>jar</packaging.type>
</properties>
<dependencies>
@@ -58,7 +59,6 @@
<artifactId>jollyday</artifactId>
<version>0.5.7</version>
</dependency>
<!-- TODO maybe set scope to provided when running in tomcat -->
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
@@ -154,5 +154,24 @@
</plugins>
</build>
</profile>
<profile>
<id>build-war</id>
<properties>
<packaging.type>war</packaging.type>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</profile>
</profiles>
</project>