From b9a36a2c020994eed16fbd59b82c453e72c52d0f Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 3 Apr 2018 11:55:56 +0300 Subject: boot: conditional xmpp configuration --- juick-www/build.gradle | 7 +++++++ .../java/com/juick/www/configuration/EmbeddedXMPPConfig.java | 11 +++++++++++ 2 files changed, 18 insertions(+) create mode 100644 juick-www/src/main/java/com/juick/www/configuration/EmbeddedXMPPConfig.java diff --git a/juick-www/build.gradle b/juick-www/build.gradle index d33b6522..19b51be6 100644 --- a/juick-www/build.gradle +++ b/juick-www/build.gradle @@ -22,9 +22,12 @@ apply plugin: 'war' apply plugin: 'org.springframework.boot' dependencies { + compile project(':juick-common') compile project(':juick-server-jdbc') + compile project(':juick-server-xmpp') compile 'com.github.ben-manes.caffeine:caffeine:2.6.2' compile("org.springframework.boot:spring-boot-starter-cache") + compile("org.springframework.boot:spring-boot-starter-web") compile ('org.springframework.boot:spring-boot-starter-security') providedRuntime("org.springframework.boot:spring-boot-starter-tomcat") providedRuntime 'com.h2database:h2:1.4.196' @@ -45,6 +48,10 @@ dependencies { compileFrontend.dependsOn 'yarn' processResources.dependsOn 'compileFrontend' +bootWar { + exclude('**/com/juick/server/**') +} + bootJar { launchScript() } diff --git a/juick-www/src/main/java/com/juick/www/configuration/EmbeddedXMPPConfig.java b/juick-www/src/main/java/com/juick/www/configuration/EmbeddedXMPPConfig.java new file mode 100644 index 00000000..35377dcd --- /dev/null +++ b/juick-www/src/main/java/com/juick/www/configuration/EmbeddedXMPPConfig.java @@ -0,0 +1,11 @@ +package com.juick.www.configuration; + +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; + +@Configuration +@ConditionalOnClass(name = "com.juick.server.xmpp.router.XMPPRouter") +@ComponentScan(basePackages = "com.juick.server") +public class EmbeddedXMPPConfig { +} -- cgit v1.2.3