Merge pull request #15 from aasaru/FINCN-177
FINCN-177 catch actual exception and detect problem by error message
diff --git a/README.md b/README.md
index fdc997a..0a3ccc6 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
-# Apache Fineract CN Rhythm [![Build Status](https://api.travis-ci.com/apache/fineract-cn-rhythm.svg?branch=develop)](https://travis-ci.com/apache/fineract-cn-rhythm)
+# Apache Fineract CN Rhythm [![Build Status](https://api.travis-ci.com/apache/fineract-cn-rhythm.svg?branch=develop)](https://travis-ci.com/apache/fineract-cn-rhythm) [![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/apache/fineract-cn-rhythm)](https://hub.docker.com/r/apache/fineract-cn-rhythm/builds)
This project provides a heart beatPublish for other services which need to start jobs to be executed once and only once at a defined time.
+[Read more](https://cwiki.apache.org/confluence/display/FINERACT/Fineract+CN+Project+Structure#FineractCNProjectStructure-rhythm).
## Abstract
Apache Fineract CN is an application framework for digital financial services, a system to support nationwide and cross-national financial transactions and help to level and speed the creation of an inclusive, interconnected digital economy for every nation in the world.
diff --git a/api/build.gradle b/api/build.gradle
index a11f487..2edca5c 100644
--- a/api/build.gradle
+++ b/api/build.gradle
@@ -19,16 +19,15 @@
repositories {
jcenter()
}
-
- dependencies {
- classpath 'io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE'
- }
}
plugins {
id "com.github.hierynomus.license" version "0.13.1"
id("org.nosphere.apache.rat") version "0.3.1"
id "com.jfrog.artifactory" version "4.9.5"
+ id "io.spring.dependency-management" version "1.0.8.RELEASE"
+ id 'maven-publish'
+ id 'java'
}
apply from: '../shared.gradle'
diff --git a/build.gradle b/build.gradle
index 362938b..9e934dc 100644
--- a/build.gradle
+++ b/build.gradle
@@ -55,6 +55,14 @@
dependsOn gradle.includedBuild('component-test').task(':artifactoryPublish')
}
+task clean {
+ group 'all'
+ dependsOn gradle.includedBuild('api').task(':clean')
+ dependsOn gradle.includedBuild('spi').task(':clean')
+ dependsOn gradle.includedBuild('service').task(':clean')
+ dependsOn gradle.includedBuild('component-test').task(':clean')
+}
+
task prepareForTest {
group 'all'
dependsOn publishToMavenLocal
diff --git a/component-test/build.gradle b/component-test/build.gradle
index 1b76ae6..b113c3d 100644
--- a/component-test/build.gradle
+++ b/component-test/build.gradle
@@ -25,7 +25,6 @@
}
dependencies {
- classpath ("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.asciidoctor:asciidoctor-gradle-plugin:1.5.3")
}
}
@@ -34,10 +33,17 @@
id "com.github.hierynomus.license" version "0.13.1"
id("org.nosphere.apache.rat") version "0.3.1"
id "com.jfrog.artifactory" version "4.9.5"
+ id "org.springframework.boot" version "1.4.3.RELEASE"
+ id 'maven-publish'
+ id 'java'
}
apply from: '../shared.gradle'
apply plugin: 'org.asciidoctor.convert'
+bootRepackage {
+ enabled = false
+}
+
dependencies {
compile(
[group: 'org.apache.fineract.cn.rhythm', name: 'api', version: project.version],
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index eadb743..94336fc 100644
--- a/gradle/wrapper/gradle-wrapper.jar
+++ b/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 0378e08..290541c 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
-#Fri Apr 13 17:03:25 CEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-bin.zip
diff --git a/gradlew b/gradlew
index 4453cce..cccdd3d 100755
--- a/gradlew
+++ b/gradlew
@@ -33,11 +33,11 @@
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
-warn ( ) {
+warn () {
echo "$*"
}
-die ( ) {
+die () {
echo
echo "$*"
echo
@@ -155,7 +155,7 @@
fi
# Escape application args
-save ( ) {
+save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
diff --git a/service/build.gradle b/service/build.gradle
index 31a07c7..2e91004 100644
--- a/service/build.gradle
+++ b/service/build.gradle
@@ -23,24 +23,23 @@
repositories {
jcenter()
}
-
- dependencies {
- classpath ("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
- }
}
plugins {
id "com.github.hierynomus.license" version "0.13.1"
id("org.nosphere.apache.rat") version "0.3.1"
id "com.jfrog.artifactory" version "4.9.5"
+ id "org.springframework.boot" version "1.4.3.RELEASE"
+ id 'maven'
+ id 'maven-publish'
+ id 'java'
+ id 'idea'
}
apply from: '../shared.gradle'
-apply plugin: 'spring-boot'
-
-springBoot {
- executable = true
+bootRepackage {
+ enabled = true
classifier = 'boot'
}
@@ -66,7 +65,9 @@
)
}
-publishToMavenLocal.dependsOn bootRepackage
+tasks.withType(PublishToMavenLocal) { task ->
+ task.dependsOn 'bootRepackage'
+}
publishing {
publications {
@@ -78,7 +79,7 @@
}
bootService(MavenPublication) {
// "boot" jar
- artifact ("$buildDir/libs/$project.name-$version-boot.jar")
+ artifact(file("$buildDir/libs/$project.name-$project.version-${bootRepackage.classifier}.jar"))
groupId project.group
artifactId ("$project.name-boot")
version project.findProperty('externalVersion') ?: project.version
diff --git a/service/src/main/resources/application.yml b/service/src/main/resources/application.yml
index d466603..f33393a 100644
--- a/service/src/main/resources/application.yml
+++ b/service/src/main/resources/application.yml
@@ -36,7 +36,7 @@
defaultZone: http://localhost:8761/eureka/
server:
- port: 8081
+ port: 2022
contextPath: /rhythm/v1/*
cassandra:
diff --git a/service/src/main/resources/banner.txt b/service/src/main/resources/banner.txt
new file mode 100644
index 0000000..4945968
--- /dev/null
+++ b/service/src/main/resources/banner.txt
@@ -0,0 +1,11 @@
+ _____ _ _ ____ _ _
+ | ___(_)_ __ ___ _ __ __ _ ___| |_ / ___| \ | |
+ | |_ | | '_ \ / _ \ '__/ _` |/ __| __|____| | | \| |
+ | _| | | | | | __/ | | (_| | (__| ||_____| |___| |\ |
+ |_| |_|_| |_|\___|_| \__,_|\___|\__| \____|_| \_|
+ ____ _ _ _
+ | _ \| |__ _ _| |_| |__ _ __ ___
+ | |_) | '_ \| | | | __| '_ \| '_ ` _ \
+ | _ <| | | | |_| | |_| | | | | | | | |
+ |_| \_\_| |_|\__, |\__|_| |_|_| |_| |_|
+ |___/
diff --git a/shared.gradle b/shared.gradle
index ab5ef82..d0b6b57 100644
--- a/shared.gradle
+++ b/shared.gradle
@@ -32,11 +32,6 @@
validator : '5.3.0.Final'
]
-apply plugin: 'java'
-apply plugin: 'idea'
-apply plugin: 'maven-publish'
-apply plugin: 'io.spring.dependency-management'
-
tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
@@ -73,7 +68,7 @@
}
jar {
- from sourceSets.main.allSource
+ from sourceSets.main.java
}
artifactory {
@@ -115,7 +110,10 @@
"gradlew",
"gradlew.bat",
"README.md",
- "**/.dockerignore/**"
+ "**/.dockerignore/**",
+ "**/target/**",
+ "**/*.log",
+ "**/banner.txt"
]
plainOutput = true
}
diff --git a/spi/build.gradle b/spi/build.gradle
index aecd058..11701f3 100644
--- a/spi/build.gradle
+++ b/spi/build.gradle
@@ -19,16 +19,15 @@
repositories {
jcenter()
}
-
- dependencies {
- classpath 'io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE'
- }
}
plugins {
id "com.github.hierynomus.license" version "0.13.1"
id("org.nosphere.apache.rat") version "0.3.1"
id "com.jfrog.artifactory" version "4.9.5"
+ id "io.spring.dependency-management" version "1.0.8.RELEASE"
+ id 'maven-publish'
+ id 'java'
}
apply from: '../shared.gradle'