Skip to content

Commit 61002fb

Browse files
authored
Merge pull request #33 from AtlasOfLivingAustralia/Grails3
Merging Grails3 into master
2 parents 5e28c99 + abb502e commit 61002fb

File tree

124 files changed

+5033
-16872
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+5033
-16872
lines changed

.gitignore

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
.slcache
2-
target/*
1+
Thumbs.db
2+
.DS_Store
3+
.gradle
4+
build/
5+
.idea
36
*.iml
4-
.idea/*
7+
*.ipr
8+
*.iws
9+
.project
10+
.settings
11+
.classpath
12+
out

.travis.yml

+20-13
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
1-
21
language: groovy
32
jdk:
4-
- oraclejdk7
3+
- oraclejdk8
54
sudo: false
65
branches:
76
only:
8-
- master
9-
- hotfix
10-
before_install:
11-
- wget -q https://raw.githubusercontent.com/AtlasOfLivingAustralia/travis-build-configuration/master/ala_common.sh
12-
- chmod +x ala_common.sh
13-
- source ./ala_common.sh
14-
- ala_travis_grails_setup_env
15-
script:
16-
- grails clean && grails refresh-dependencies --non-interactive && grails test-app --stacktrace --non-interactive && grails prod war --non-interactive && grails prod maven-deploy --repository=$MAVEN_REPO --non-interactive --stacktrace
7+
- master
8+
- hotfix
9+
- Grails3
10+
11+
before_cache:
12+
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
13+
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
14+
15+
cache:
16+
directories:
17+
- $HOME/.m2
18+
- $HOME/.gradle/caches/
19+
- $HOME/.gradle/wrapper/
20+
#install:
21+
# - ./gradlew assemble --refresh-dependencies
22+
after_success:
23+
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && travis_retry ./gradlew publish'
1724
env:
1825
global:
19-
- secure: OqyYLYoeTw2ifeopsXEQnLDF8DA5j12iSH9mKGXjE6abkrhXCghWOtb+jGstRvJr/ZrpJfFK3VOkistgkf6y8/RYxB7a0MJsr+1GUXtdHhtPbUcShJDybj6AlbgPCI2J4VdIQSB+ey2XZKOMOO3+XwbsczrTHBh5KpBHdI7Tw8I=
20-
- secure: XvAZn/Iv/HVBcR3DiDrNhOvMy4LVvrH0eM7jims9Kyhwb6YvZc8aD2MpgfR9pEcKpyy5zSx/EKYKbB6rf5tzjjEOSgCCrYfoqNB2e1/pqNnzMsblEpRC3IsHOYs7bQwckKOclQ1pP/6BzjxSKzZNQG+dQT+KhfPPmWj4Ky+hmN0=
26+
- secure: OqyYLYoeTw2ifeopsXEQnLDF8DA5j12iSH9mKGXjE6abkrhXCghWOtb+jGstRvJr/ZrpJfFK3VOkistgkf6y8/RYxB7a0MJsr+1GUXtdHhtPbUcShJDybj6AlbgPCI2J4VdIQSB+ey2XZKOMOO3+XwbsczrTHBh5KpBHdI7Tw8I=
27+
- secure: XvAZn/Iv/HVBcR3DiDrNhOvMy4LVvrH0eM7jims9Kyhwb6YvZc8aD2MpgfR9pEcKpyy5zSx/EKYKbB6rf5tzjjEOSgCCrYfoqNB2e1/pqNnzMsblEpRC3IsHOYs7bQwckKOclQ1pP/6BzjxSKzZNQG+dQT+KhfPPmWj4Ky+hmN0=

LICENSE.txt

+469
Large diffs are not rendered by default.

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Alerts
1+
# ALA Alerts
22

3-
This is a small app responsible for sending email alerts when there are changes within the system.
3+
This is a small app responsible for sending email alerts when there are changes detected to endpoint web services (subscriptions).
44

55
# Build status
66

@@ -14,4 +14,4 @@ This is a small app responsible for sending email alerts when there are changes
1414
1. ```grant all privileges on *.* to 'alerts_user'@'localhost';```
1515
1. ```create database alerts```
1616
1. Create /data/alerts/config/alerts-config.properties
17-
1. Use the template in ala-install to get the necessary values
17+
1. Use the template in ala-install to get the necessary values

application.properties

-6
This file was deleted.

build.gradle

+118
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
/*
2+
* Copyright (C) 2017 Atlas of Living Australia
3+
* All Rights Reserved.
4+
* The contents of this file are subject to the Mozilla Public
5+
* License Version 1.1 (the "License"); you may not use this file
6+
* except in compliance with the License. You may obtain a copy of
7+
* the License at http://www.mozilla.org/MPL/
8+
* Software distributed under the License is distributed on an "AS
9+
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
10+
* implied. See the License for the specific language governing
11+
* rights and limitations under the License.
12+
*/
13+
14+
buildscript {
15+
repositories {
16+
mavenLocal()
17+
maven { url "https://nexus.ala.org.au/content/groups/public/" }
18+
maven { url "https://repo.grails.org/grails/core" }
19+
}
20+
dependencies {
21+
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
22+
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.14.1"
23+
classpath "org.grails.plugins:hibernate5:${gormVersion-".RELEASE"}"
24+
}
25+
}
26+
27+
plugins {
28+
id "com.gorylenko.gradle-git-properties" version "1.4.17"
29+
}
30+
31+
version "1.4-SNAPSHOT"
32+
group "au.org.ala"
33+
34+
apply plugin:"eclipse"
35+
apply plugin:"idea"
36+
apply plugin:"war"
37+
apply plugin:"org.grails.grails-web"
38+
apply plugin:"org.grails.grails-gsp"
39+
apply plugin:"asset-pipeline"
40+
41+
apply from: 'https://raw.githubusercontent.com/AtlasOfLivingAustralia/travis-build-configuration/master/travis_grails_publish.gradle'
42+
43+
sourceCompatibility = 1.8
44+
targetCompatibility = 1.8
45+
46+
repositories {
47+
mavenLocal()
48+
maven { url "https://nexus.ala.org.au/content/groups/public/" }
49+
maven { url "https://repo.grails.org/grails/core" }
50+
}
51+
52+
grails {
53+
exploded = true
54+
plugins {
55+
//compile project(":ala-admin-plugin") // inline plugin use only
56+
}
57+
}
58+
59+
dependencies {
60+
compile "org.springframework.boot:spring-boot-starter-logging"
61+
compile "org.springframework.boot:spring-boot-autoconfigure"
62+
compile "org.grails:grails-core"
63+
compile "org.springframework.boot:spring-boot-starter-actuator"
64+
compile "org.springframework.boot:spring-boot-starter-tomcat"
65+
compile "org.grails:grails-dependencies"
66+
compile "org.grails:grails-web-boot"
67+
compile "org.grails.plugins:cache"
68+
compile "org.grails.plugins:scaffolding"
69+
compile "org.grails.plugins:hibernate5"
70+
compile "org.hibernate:hibernate-core:5.1.3.Final"
71+
compile "org.hibernate:hibernate-ehcache:5.1.3.Final"
72+
console "org.grails:grails-console"
73+
profile "org.grails.profiles:web"
74+
runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.14.1"
75+
//compile "org.grails.plugins:grails-plugin-converters" // only needed for grails 3.3
76+
testCompile "org.grails:grails-plugin-testing"
77+
testCompile "org.grails.plugins:geb"
78+
testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1"
79+
testRuntime "net.sourceforge.htmlunit:htmlunit:2.18"
80+
81+
// Grails plugin dependencies
82+
runtime "org.grails.plugins:ala-bootstrap3:3.0.0-SNAPSHOT"
83+
compile "org.grails.plugins:ala-ws-security-plugin:2.0-SNAPSHOT"
84+
compile "org.grails.plugins:ala-ws-plugin:2.0-SNAPSHOT"
85+
compile "org.grails.plugins:ala-auth:3.0.2"
86+
compile "org.grails.plugins:ala-admin-plugin:2.1-SNAPSHOT"
87+
88+
compile 'org.grails.plugins:external-config:1.1.1'
89+
compile 'org.grails.plugins:mail:2.0.0.RC6'
90+
compile 'org.grails.plugins:http-builder-helper:1.0.2.ALA'
91+
compile 'org.grails.plugins:schwartz-monitor:2.0.1.ALA-SNAPSHOT'
92+
compile 'org.grails.plugins:quartz:2.0.12'
93+
94+
// regular JAR dependencies
95+
runtime 'mysql:mysql-connector-java:5.1.42'
96+
testRuntime "com.h2database:h2"
97+
runtime 'commons-lang:commons-lang:2.6'
98+
runtime 'org.hamcrest:hamcrest-core:1.3'
99+
runtime 'org.hamcrest:hamcrest-library:1.3'
100+
runtime 'xalan:xalan:2.7.2'
101+
runtime 'org.apache.httpcomponents:httpcore:4.2.2'
102+
runtime 'org.apache.httpcomponents:httpclient:4.2.2'
103+
runtime 'org.apache.httpcomponents:httpcore:4.2.2'
104+
runtime 'org.apache.httpcomponents:httpclient:4.2.2'
105+
compile 'com.jayway.jsonpath:json-path:0.5.6'
106+
compile 'com.jayway.jsonpath:json-path-assert:0.5.6'
107+
}
108+
109+
bootRun {
110+
jvmArgs('-Dspring.output.ansi.enabled=always')
111+
addResources = true
112+
}
113+
114+
115+
assets {
116+
minifyJs = true
117+
minifyCss = true
118+
}

gradle.properties

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
grailsVersion=3.2.11
2+
gormVersion=6.0.12.RELEASE
3+
gradleWrapperVersion=3.4.1

gradle/wrapper/gradle-wrapper.jar

52.9 KB
Binary file not shown.
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Tue Aug 08 11:44:31 AEST 2017
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip

gradlew

+172
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
#!/usr/bin/env sh
2+
3+
##############################################################################
4+
##
5+
## Gradle start up script for UN*X
6+
##
7+
##############################################################################
8+
9+
# Attempt to set APP_HOME
10+
# Resolve links: $0 may be a link
11+
PRG="$0"
12+
# Need this for relative symlinks.
13+
while [ -h "$PRG" ] ; do
14+
ls=`ls -ld "$PRG"`
15+
link=`expr "$ls" : '.*-> \(.*\)$'`
16+
if expr "$link" : '/.*' > /dev/null; then
17+
PRG="$link"
18+
else
19+
PRG=`dirname "$PRG"`"/$link"
20+
fi
21+
done
22+
SAVED="`pwd`"
23+
cd "`dirname \"$PRG\"`/" >/dev/null
24+
APP_HOME="`pwd -P`"
25+
cd "$SAVED" >/dev/null
26+
27+
APP_NAME="Gradle"
28+
APP_BASE_NAME=`basename "$0"`
29+
30+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31+
DEFAULT_JVM_OPTS=""
32+
33+
# Use the maximum available, or set MAX_FD != -1 to use that value.
34+
MAX_FD="maximum"
35+
36+
warn ( ) {
37+
echo "$*"
38+
}
39+
40+
die ( ) {
41+
echo
42+
echo "$*"
43+
echo
44+
exit 1
45+
}
46+
47+
# OS specific support (must be 'true' or 'false').
48+
cygwin=false
49+
msys=false
50+
darwin=false
51+
nonstop=false
52+
case "`uname`" in
53+
CYGWIN* )
54+
cygwin=true
55+
;;
56+
Darwin* )
57+
darwin=true
58+
;;
59+
MINGW* )
60+
msys=true
61+
;;
62+
NONSTOP* )
63+
nonstop=true
64+
;;
65+
esac
66+
67+
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68+
69+
# Determine the Java command to use to start the JVM.
70+
if [ -n "$JAVA_HOME" ] ; then
71+
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72+
# IBM's JDK on AIX uses strange locations for the executables
73+
JAVACMD="$JAVA_HOME/jre/sh/java"
74+
else
75+
JAVACMD="$JAVA_HOME/bin/java"
76+
fi
77+
if [ ! -x "$JAVACMD" ] ; then
78+
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79+
80+
Please set the JAVA_HOME variable in your environment to match the
81+
location of your Java installation."
82+
fi
83+
else
84+
JAVACMD="java"
85+
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86+
87+
Please set the JAVA_HOME variable in your environment to match the
88+
location of your Java installation."
89+
fi
90+
91+
# Increase the maximum file descriptors if we can.
92+
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93+
MAX_FD_LIMIT=`ulimit -H -n`
94+
if [ $? -eq 0 ] ; then
95+
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96+
MAX_FD="$MAX_FD_LIMIT"
97+
fi
98+
ulimit -n $MAX_FD
99+
if [ $? -ne 0 ] ; then
100+
warn "Could not set maximum file descriptor limit: $MAX_FD"
101+
fi
102+
else
103+
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104+
fi
105+
fi
106+
107+
# For Darwin, add options to specify how the application appears in the dock
108+
if $darwin; then
109+
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110+
fi
111+
112+
# For Cygwin, switch paths to Windows format before running java
113+
if $cygwin ; then
114+
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115+
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116+
JAVACMD=`cygpath --unix "$JAVACMD"`
117+
118+
# We build the pattern for arguments to be converted via cygpath
119+
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120+
SEP=""
121+
for dir in $ROOTDIRSRAW ; do
122+
ROOTDIRS="$ROOTDIRS$SEP$dir"
123+
SEP="|"
124+
done
125+
OURCYGPATTERN="(^($ROOTDIRS))"
126+
# Add a user-defined pattern to the cygpath arguments
127+
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128+
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129+
fi
130+
# Now convert the arguments - kludge to limit ourselves to /bin/sh
131+
i=0
132+
for arg in "$@" ; do
133+
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134+
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135+
136+
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137+
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138+
else
139+
eval `echo args$i`="\"$arg\""
140+
fi
141+
i=$((i+1))
142+
done
143+
case $i in
144+
(0) set -- ;;
145+
(1) set -- "$args0" ;;
146+
(2) set -- "$args0" "$args1" ;;
147+
(3) set -- "$args0" "$args1" "$args2" ;;
148+
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149+
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150+
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151+
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152+
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153+
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154+
esac
155+
fi
156+
157+
# Escape application args
158+
save ( ) {
159+
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160+
echo " "
161+
}
162+
APP_ARGS=$(save "$@")
163+
164+
# Collect all arguments for the java command, following the shell quoting and substitution rules
165+
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166+
167+
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168+
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169+
cd "$(dirname "$0")"
170+
fi
171+
172+
exec "$JAVACMD" "$@"

0 commit comments

Comments
 (0)