Commit bfa1fe6b by James Burton Committed by Johannes Stelzer

add sample for war-file deployment

parent db769e2a
......@@ -8,56 +8,46 @@
<version>1.2.5.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin</artifactId>
<version>1.3.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Spring Boot Admin</name>
<description>Spring Boot Admin</description>
<url>https://github.com/codecentric/spring-boot-admin/</url>
<properties>
<java.version>1.7</java.version>
<main.basedir>${basedir}</main.basedir>
<passphrase>${gpg.passphrase}</passphrase>
<spring-boot.version>1.2.5.RELEASE</spring-boot.version>
<hazelcast.version>3.3.3</hazelcast.version>
<commons-lang3.version>3.3.2</commons-lang3.version>
<spring-cloud.version>Angel.SR3</spring-cloud.version>
<build-plugin.jacoco.version>0.7.3.201502191951</build-plugin.jacoco.version>
<build-plugin.coveralls.version>3.0.1</build-plugin.coveralls.version>
<build-plugin.gpg.version>1.5</build-plugin.gpg.version>
</properties>
<modules>
<module>spring-boot-admin-server</module>
<module>spring-boot-admin-server-ui</module>
<module>spring-boot-admin-samples</module>
<module>spring-boot-admin-starter-client</module>
</modules>
<organization>
<name>codecentric AG</name>
<url>http://www.codecentric.de</url>
</organization>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>
<scm>
<connection>scm:git:git://github.com/codecentric/spring-boot-admin.git</connection>
<developerConnection>scm:git:ssh://git@github.com/codecentric/spring-boot-admin.git</developerConnection>
<url>https://github.com/codecentric/spring-boot-admin</url>
</scm>
<developers>
<developer>
<name>Thomas Bosch</name>
......@@ -70,7 +60,6 @@
<organization>codecentric AG</organization>
</developer>
</developers>
<build>
<plugins>
<plugin>
......@@ -180,7 +169,6 @@
</build>
</profile>
</profiles>
<distributionManagement>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
......@@ -193,7 +181,6 @@
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<dependencyManagement>
<dependencies>
<dependency>
......@@ -216,13 +203,11 @@
<artifactId>spring-boot-admin-example</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${spring-boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-parent</artifactId>
......@@ -230,7 +215,6 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast</artifactId>
......@@ -241,7 +225,6 @@
<artifactId>hazelcast-spring</artifactId>
<version>${hazelcast.version}</version>
</dependency>
<!-- Test -->
<dependency>
<groupId>org.springframework</groupId>
......@@ -251,7 +234,6 @@
</dependency>
</dependencies>
</dependencyManagement>
<repositories>
<repository>
<id>spring-release</id>
......
......@@ -14,12 +14,12 @@
<name>Spring Boot Admin Samples</name>
<description>Spring Boot Admin Samples</description>
<url>https://github.com/codecentric/spring-boot-admin/</url>
<properties>
<main.basedir>${basedir}/..</main.basedir>
</properties>
<modules>
<module>spring-boot-admin-sample</module>
<module>spring-boot-admin-sample-war</module>
<module>spring-boot-admin-sample-discovery</module>
<module>spring-boot-admin-sample-hazelcast</module>
</modules>
......
......@@ -26,10 +26,6 @@
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
......
......@@ -30,10 +30,6 @@
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
......
<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>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-sample-war</artifactId>
<version>1.3.0-SNAPSHOT</version>
<packaging>war</packaging>
<parent>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-samples</artifactId>
<version>1.3.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server</artifactId>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server-ui</artifactId>
</dependency>
<!-- FIX for missing dependency -->
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<addResources>false</addResources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<wtpversion>2.0</wtpversion>
<jeeversion>6.0</jeeversion>
</configuration>
</plugin>
</plugins>
</build>
</project>
package de.codecentric.boot.admin;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.context.annotation.Configuration;
import de.codecentric.boot.admin.config.EnableAdminServer;
@Configuration
@EnableAutoConfiguration
@EnableAdminServer
public class SpringBootAdminApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application;
}
public static void main(String[] args) throws Exception {
SpringApplication.run(SpringBootAdminApplication.class, args);
}
}
info:
version: @pom.version@
stage: test
spring:
application:
name: @pom.artifactId@
boot:
admin:
url: http://localhost:8080
cloud:
config:
enabled: false
jackson:
serialization:
indent_output: true
endpoints:
health:
sensitive: false
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml"/>
<jmxConfigurator/>
</configuration>
\ No newline at end of file
......@@ -22,10 +22,6 @@
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
......
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