Commit bfa1fe6b by James Burton Committed by Johannes Stelzer

add sample for war-file deployment

parent db769e2a
...@@ -8,56 +8,46 @@ ...@@ -8,56 +8,46 @@
<version>1.2.5.RELEASE</version> <version>1.2.5.RELEASE</version>
<relativePath /> <!-- lookup parent from repository --> <relativePath /> <!-- lookup parent from repository -->
</parent> </parent>
<groupId>de.codecentric</groupId> <groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin</artifactId> <artifactId>spring-boot-admin</artifactId>
<version>1.3.0-SNAPSHOT</version> <version>1.3.0-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Spring Boot Admin</name> <name>Spring Boot Admin</name>
<description>Spring Boot Admin</description> <description>Spring Boot Admin</description>
<url>https://github.com/codecentric/spring-boot-admin/</url> <url>https://github.com/codecentric/spring-boot-admin/</url>
<properties> <properties>
<java.version>1.7</java.version> <java.version>1.7</java.version>
<main.basedir>${basedir}</main.basedir> <main.basedir>${basedir}</main.basedir>
<passphrase>${gpg.passphrase}</passphrase> <passphrase>${gpg.passphrase}</passphrase>
<spring-boot.version>1.2.5.RELEASE</spring-boot.version> <spring-boot.version>1.2.5.RELEASE</spring-boot.version>
<hazelcast.version>3.3.3</hazelcast.version> <hazelcast.version>3.3.3</hazelcast.version>
<commons-lang3.version>3.3.2</commons-lang3.version> <commons-lang3.version>3.3.2</commons-lang3.version>
<spring-cloud.version>Angel.SR3</spring-cloud.version> <spring-cloud.version>Angel.SR3</spring-cloud.version>
<build-plugin.jacoco.version>0.7.3.201502191951</build-plugin.jacoco.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.coveralls.version>3.0.1</build-plugin.coveralls.version>
<build-plugin.gpg.version>1.5</build-plugin.gpg.version> <build-plugin.gpg.version>1.5</build-plugin.gpg.version>
</properties> </properties>
<modules> <modules>
<module>spring-boot-admin-server</module> <module>spring-boot-admin-server</module>
<module>spring-boot-admin-server-ui</module> <module>spring-boot-admin-server-ui</module>
<module>spring-boot-admin-samples</module> <module>spring-boot-admin-samples</module>
<module>spring-boot-admin-starter-client</module> <module>spring-boot-admin-starter-client</module>
</modules> </modules>
<organization> <organization>
<name>codecentric AG</name> <name>codecentric AG</name>
<url>http://www.codecentric.de</url> <url>http://www.codecentric.de</url>
</organization> </organization>
<licenses> <licenses>
<license> <license>
<name>Apache License, Version 2.0</name> <name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url> <url>http://www.apache.org/licenses/LICENSE-2.0</url>
</license> </license>
</licenses> </licenses>
<scm> <scm>
<connection>scm:git:git://github.com/codecentric/spring-boot-admin.git</connection> <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> <developerConnection>scm:git:ssh://git@github.com/codecentric/spring-boot-admin.git</developerConnection>
<url>https://github.com/codecentric/spring-boot-admin</url> <url>https://github.com/codecentric/spring-boot-admin</url>
</scm> </scm>
<developers> <developers>
<developer> <developer>
<name>Thomas Bosch</name> <name>Thomas Bosch</name>
...@@ -70,7 +60,6 @@ ...@@ -70,7 +60,6 @@
<organization>codecentric AG</organization> <organization>codecentric AG</organization>
</developer> </developer>
</developers> </developers>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
...@@ -180,7 +169,6 @@ ...@@ -180,7 +169,6 @@
</build> </build>
</profile> </profile>
</profiles> </profiles>
<distributionManagement> <distributionManagement>
<snapshotRepository> <snapshotRepository>
<id>sonatype-nexus-snapshots</id> <id>sonatype-nexus-snapshots</id>
...@@ -193,7 +181,6 @@ ...@@ -193,7 +181,6 @@
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository> </repository>
</distributionManagement> </distributionManagement>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>
...@@ -216,13 +203,11 @@ ...@@ -216,13 +203,11 @@
<artifactId>spring-boot-admin-example</artifactId> <artifactId>spring-boot-admin-example</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
<version>${spring-boot.version}</version> <version>${spring-boot.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-parent</artifactId> <artifactId>spring-cloud-starter-parent</artifactId>
...@@ -230,7 +215,6 @@ ...@@ -230,7 +215,6 @@
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.hazelcast</groupId> <groupId>com.hazelcast</groupId>
<artifactId>hazelcast</artifactId> <artifactId>hazelcast</artifactId>
...@@ -241,7 +225,6 @@ ...@@ -241,7 +225,6 @@
<artifactId>hazelcast-spring</artifactId> <artifactId>hazelcast-spring</artifactId>
<version>${hazelcast.version}</version> <version>${hazelcast.version}</version>
</dependency> </dependency>
<!-- Test --> <!-- Test -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
...@@ -251,7 +234,6 @@ ...@@ -251,7 +234,6 @@
</dependency> </dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<repositories> <repositories>
<repository> <repository>
<id>spring-release</id> <id>spring-release</id>
......
<?xml version="1.0" encoding="UTF-8"?> <?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" <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"> 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> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>de.codecentric</groupId> <groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin</artifactId> <artifactId>spring-boot-admin</artifactId>
<version>1.3.0-SNAPSHOT</version> <version>1.3.0-SNAPSHOT</version>
<relativePath>..</relativePath> <relativePath>..</relativePath>
</parent> </parent>
<groupId>de.codecentric</groupId> <groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-samples</artifactId> <artifactId>spring-boot-admin-samples</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Spring Boot Admin Samples</name> <name>Spring Boot Admin Samples</name>
<description>Spring Boot Admin Samples</description> <description>Spring Boot Admin Samples</description>
<url>https://github.com/codecentric/spring-boot-admin/</url> <url>https://github.com/codecentric/spring-boot-admin/</url>
<properties>
<properties> <main.basedir>${basedir}/..</main.basedir>
<main.basedir>${basedir}/..</main.basedir> </properties>
</properties> <modules>
<modules> <module>spring-boot-admin-sample</module>
<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-discovery</module>
<module>spring-boot-admin-sample-hazelcast</module> <module>spring-boot-admin-sample-hazelcast</module>
</modules> </modules>
</project> </project>
...@@ -26,10 +26,6 @@ ...@@ -26,10 +26,6 @@
<finalName>${project.artifactId}</finalName> <finalName>${project.artifactId}</finalName>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<executions> <executions>
......
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> 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> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>de.codecentric</groupId> <groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-samples</artifactId> <artifactId>spring-boot-admin-samples</artifactId>
<version>1.3.0-SNAPSHOT</version> <version>1.3.0-SNAPSHOT</version>
<relativePath>..</relativePath> <relativePath>..</relativePath>
</parent> </parent>
<artifactId>spring-boot-admin-sample-hazelcast</artifactId> <artifactId>spring-boot-admin-sample-hazelcast</artifactId>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>de.codecentric</groupId> <groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server</artifactId> <artifactId>spring-boot-admin-server</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>de.codecentric</groupId> <groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server-ui</artifactId> <artifactId>spring-boot-admin-server-ui</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.hazelcast</groupId> <groupId>com.hazelcast</groupId>
<artifactId>hazelcast</artifactId> <artifactId>hazelcast</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.hazelcast</groupId> <groupId>com.hazelcast</groupId>
<artifactId>hazelcast-spring</artifactId> <artifactId>hazelcast-spring</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<finalName>${project.artifactId}</finalName> <finalName>${project.artifactId}</finalName>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
</plugin> <executions>
<plugin> <execution>
<groupId>org.springframework.boot</groupId> <goals>
<artifactId>spring-boot-maven-plugin</artifactId> <goal>repackage</goal>
<executions> </goals>
<execution> </execution>
<goals> </executions>
<goal>repackage</goal> <configuration>
</goals> <mainClass>de.codecentric.boot.admin.SpringBootAdminApplication</mainClass>
</execution>
</executions>
<configuration>
<mainClass>de.codecentric.boot.admin.SpringBootAdminApplication</mainClass>
<addResources>false</addResources> <addResources>false</addResources>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</project> </project>
<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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> 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> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>de.codecentric</groupId> <groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-samples</artifactId> <artifactId>spring-boot-admin-samples</artifactId>
<version>1.3.0-SNAPSHOT</version> <version>1.3.0-SNAPSHOT</version>
<relativePath>..</relativePath> <relativePath>..</relativePath>
</parent> </parent>
<artifactId>spring-boot-admin-sample</artifactId> <artifactId>spring-boot-admin-sample</artifactId>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>de.codecentric</groupId> <groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server</artifactId> <artifactId>spring-boot-admin-server</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>de.codecentric</groupId> <groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server-ui</artifactId> <artifactId>spring-boot-admin-server-ui</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<finalName>${project.artifactId}</finalName> <finalName>${project.artifactId}</finalName>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
</plugin> <executions>
<plugin> <execution>
<groupId>org.springframework.boot</groupId> <goals>
<artifactId>spring-boot-maven-plugin</artifactId> <goal>repackage</goal>
<executions> </goals>
<execution> </execution>
<goals> </executions>
<goal>repackage</goal> <configuration>
</goals> <mainClass>de.codecentric.boot.admin.SpringBootAdminApplication</mainClass>
</execution>
</executions>
<configuration>
<mainClass>de.codecentric.boot.admin.SpringBootAdminApplication</mainClass>
<addResources>false</addResources> <addResources>false</addResources>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</project> </project>
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