Skip to content

Commit

Permalink
added readme notes reg. required dependencies for a full-featured bro…
Browse files Browse the repository at this point in the history
…ker, gradle(w)-2.13, build cleanup
  • Loading branch information
zyro23 committed Apr 26, 2016
1 parent e0c7d43 commit cab124f
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 43 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -10,3 +10,7 @@
/web-app/WEB-INF/tld
/bin
/build
/grails-spring-websocket.iws
/grails-spring-websocket.ipr
/.idea
/out
12 changes: 12 additions & 0 deletions README.md
Expand Up @@ -164,6 +164,18 @@ beans = {

From there, check the Spring docs/apis/samples for the available configuration options.

### Full-Featured Broker

To use a full-featured (e.g. RabbitMQ, ActiveMQ, etc.) instead of the default simple broker, please refer to the Spring docs regarding configuration.
Additionally, add two dependencies for TCP connection management.

compile "io.projectreactor:reactor-net"
compile "io.netty:netty-all:4.0.33.Final"

Both are optional dependencies and as such have to be added explicitly.
The version can be omitted for `reactor-net` because it is included in the Spring Boot BOM.
A sensible default for the version of `netty-all` is the one that your current version of `spring-messaging` declares as dependency.

## User Destinations

To send messages to specific users, you can (among other ways) annotate message handler methods with `@SendToUser` and/or use the `SimpMessagingTemplate.convertAndSendToUser(...)` methods.
Expand Down
15 changes: 4 additions & 11 deletions build.gradle
Expand Up @@ -35,10 +35,10 @@ dependencyManagement {
}

dependencies {
provided "javax.servlet:javax.servlet-api:3.1.0"
provided "org.grails:grails-plugin-async"
compileOnly "javax.servlet:javax.servlet-api"
compileOnly "org.grails:grails-plugin-async"

compile "com.fasterxml.jackson.core:jackson-databind:2.6.3"
compile "com.fasterxml.jackson.core:jackson-databind:2.6.4"
compile "org.springframework:spring-messaging:${springVersion}"
compile "org.springframework:spring-websocket:${springVersion}"

Expand All @@ -54,11 +54,4 @@ grailsPublish {
developers = [zyro: "zyro"]
}

eclipse {
project {
buildCommand "org.springframework.ide.eclipse.core.springbuilder"
natures "org.springframework.ide.eclipse.core.springnature"
}
}

wrapper.gradleVersion = "2.10"
wrapper.gradleVersion = "2.13"
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Sun Dec 06 09:18:21 CET 2015
#Tue Apr 26 22:45:32 CEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-bin.zip
52 changes: 26 additions & 26 deletions gradlew
Expand Up @@ -6,12 +6,30 @@
##
##############################################################################

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

Expand All @@ -30,6 +48,7 @@ die ( ) {
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
Expand All @@ -40,31 +59,11 @@ case "`uname`" in
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac

# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
Expand All @@ -90,7 +89,7 @@ location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
Expand All @@ -114,6 +113,7 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
Expand Down
8 changes: 4 additions & 4 deletions gradlew.bat
Expand Up @@ -8,14 +8,14 @@
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

Expand Down Expand Up @@ -46,7 +46,7 @@ echo location of your Java installation.
goto fail

:init
@rem Get command-line arguments, handling Windowz variants
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
Expand Down

0 comments on commit cab124f

Please sign in to comment.