Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Upgrade to Gradle Wrapper 1.0-m6, some minor bug fixes. Updated docum…

…entation.
  • Loading branch information...
commit bbec4bb3b126e96b08ab695beda107cb72f5613d 1 parent e53adf5
@bmuschko authored
View
30 README.md
@@ -3,7 +3,8 @@
![Cargo Logo](http://docs.codehaus.org/download/attachments/27913/cargo-banner-left.png)
The plugin provides deployment capabilities for web applications to local and remote containers in any given
-Gradle build by leveraging the [Cargo Ant tasks](http://cargo.codehaus.org/Ant+support). It extends the [War plugin](http://www.gradle.org/war_plugin.html).
+Gradle build by leveraging the [Cargo Ant tasks](http://cargo.codehaus.org/Ant+support). The plugin supports WAR and EAR
+artifacts.
## Usage
@@ -25,15 +26,14 @@ in the library. Please see [CARGO-962](https://jira.codehaus.org/browse/CARGO-96
}
dependencies {
- classpath 'bmuschko:gradle-cargo-plugin:0.3'
+ classpath 'bmuschko:gradle-cargo-plugin:0.4'
}
}
dependencies {
- def cargoVersion = '1.1.1'
+ def cargoVersion = '1.1.3'
cargo "org.codehaus.cargo:cargo-core-uberjar:$cargoVersion",
- "org.codehaus.cargo:cargo-ant:$cargoVersion",
- 'jaxen:jaxen:1.1.1'
+ "org.codehaus.cargo:cargo-ant:$cargoVersion"
}
## Tasks
@@ -58,6 +58,7 @@ The Cargo plugin defines the following convention properties in the `cargo` clos
* `containerId`: The container ID you are targeting. Please see the [list of supported containers](http://cargo.codehaus.org/Home) on the Cargo website.
* `port`: The TCP port the container responds on (defaults to 8080).
* `context`: The URL context the container is handling your web application on (defaults to WAR name).
+* `deployable`: An arbitrary artifact to be deployed to container (defaults to project artifact - WAR or EAR file).
Within `cargo` you can define properties for remote containers in a closure named `remote`:
@@ -68,9 +69,27 @@ Within `cargo` you can define properties for remote containers in a closure name
Within `cargo` you can define properties for local containers in a closure named `local`:
+* `jvmArgs`: The JVM arguments for a local container.
* `logLevel`: The log level to run the container with (optional). The valid levels are `low`, `medium` and `high`.
* `homeDir`: The home directory of your local container.
+Within `cargo` you can define properties for specific local containers. At the moment the following containers are supported
+defined by these closures:
+
+* `jetty`: Jetty
+** `createContextXml`, `sessionPath`, `useFileMappedBuffer`
+* `jonas`: Jonas
+** `jmsPort`, `serverName`, `servicesList`, `domainName`
+* `jrun`: JRun
+** `home`
+* `tomcat`: Tomcat
+** `webappsDir`, `copyWars`, `contextReloadable`, `ajpPort`
+* `weblogic`: WebLogic
+** `adminUser`, `adminPassword`, `beaHome`, `server`
+
+Please refer to the individual configuration properties on the Cargo homepage. All of these properties can be overriden
+by project properties. The name of the project properties is the same as in the Cargo manual.
+
### Example
cargo {
@@ -100,5 +119,6 @@ The convention properties can be overridden by project properties via `gradle.pr
* `cargo.hostname`: Overrides the convention property `hostname`.
* `cargo.username`: Overrides the convention property `username`.
* `cargo.password`: Overrides the convention property `password`.
+* `cargo.jvmargs`: Overrides the convention property `jvmArgs`.
* `cargo.log.level`: Overrides the convention property `logLevel`.
* `cargo.home.dir`: Overrides the convention property `homeDir`.
View
7 RELEASE_NOTES.md
@@ -1,3 +1,10 @@
+### Version 0.4 (November 27, 2011)
+
+* Support for JVM arguments in local containers.
+* Support for configuration properties specific to local container product.
+* The deployable artifact can either be a WAR or an EAR file. _Note:_ This release requires your project to run with Gradle >= [1.0-m4|http://wiki.gradle.org/display/GRADLE/Gradle+1.0-milestone-4+Release+Notes).
+* Upgrade to Gradle Wrapper 1.0-m6.
+
### Version 0.3 (June 26, 2011)
* Exposed local run task introduced in Cargo 1.1.1. The plugin does not favor the [deprecation](http://cargo.codehaus.org/Ant+support)
View
10 build.gradle
@@ -4,7 +4,7 @@ apply plugin: 'idea'
def compatibilityVersion = 1.5
sourceCompatibility = compatibilityVersion
targetCompatibility = compatibilityVersion
-version = '0.3'
+version = '0.4'
repositories {
mavenCentral()
@@ -26,10 +26,10 @@ jar {
}
}
-ideaProject {
- javaVersion = '1.6'
+idea.project {
+ jdkName = '1.6'
- withXml { provider ->
+ ipr.withXml { provider ->
def node = provider.asNode()
// Use GIT
@@ -43,5 +43,5 @@ ideaProject {
}
task wrapper(type: Wrapper) {
- gradleVersion = '1.0-milestone-3'
+ gradleVersion = '1.0-milestone-6'
}
View
BIN  gradle/wrapper/gradle-wrapper.jar
Binary file not shown
View
4 gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Sun Oct 23 08:14:09 EDT 2011
+#Sun Nov 27 11:26:56 EST 2011
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-3-bin.zip
+distributionUrl=http\://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-6-bin.zip
View
107 gradlew
@@ -1,16 +1,16 @@
#!/bin/bash
##############################################################################
-## ##
-## Gradle wrapper script for UN*X ##
-## ##
+##
+## Gradle start up script for UN*X
+##
##############################################################################
-# Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
-# GRADLE_OPTS="$GRADLE_OPTS -Xmx512m"
-# JAVA_OPTS="$JAVA_OPTS -Xmx512m"
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
-GRADLE_APP_NAME=Gradle
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
@@ -42,54 +42,51 @@ case "`uname`" in
;;
esac
-# Attempt to set JAVA_HOME if it's not already set.
-if [ -z "$JAVA_HOME" ] ; then
- if $darwin ; then
- [ -z "$JAVA_HOME" -a -d "/Library/Java/Home" ] && export JAVA_HOME="/Library/Java/Home"
- [ -z "$JAVA_HOME" -a -d "/System/Library/Frameworks/JavaVM.framework/Home" ] && export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
- else
- javaExecutable="`which javac`"
- [ -z "$javaExecutable" -o "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ] && die "JAVA_HOME not set and cannot find javac to deduce location, please set JAVA_HOME."
- # readlink(1) is not available as standard on Solaris 10.
- readLink=`which readlink`
- [ `expr "$readLink" : '\([^ ]*\)'` = "no" ] && die "JAVA_HOME not set and readlink not available, please set JAVA_HOME."
- javaExecutable="`readlink -f \"$javaExecutable\"`"
- javaHome="`dirname \"$javaExecutable\"`"
- javaHome=`expr "$javaHome" : '\(.*\)/bin'`
- export JAVA_HOME="$javaHome"
- fi
-fi
-
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
- [ -n "$JAVACMD" ] && JAVACMD=`cygpath --unix "$JAVACMD"`
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
-STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain
-CLASSPATH=`dirname "$0"`/gradle/wrapper/gradle-wrapper.jar
-WRAPPER_PROPERTIES=`dirname "$0"`/gradle/wrapper/gradle-wrapper.properties
+# 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.
-if [ -z "$JAVACMD" ] ; then
- if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
else
- JAVACMD="java"
+ JAVACMD="$JAVA_HOME/bin/java"
fi
-fi
-if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
-fi
-if [ -z "$JAVA_HOME" ] ; then
- warn "JAVA_HOME environment variable is not set"
fi
# Increase the maximum file descriptors if we can.
@@ -108,15 +105,15 @@ if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
fi
fi
-# For Darwin, add GRADLE_APP_NAME to the JAVA_OPTS as -Xdock:name
+# For Darwin, add APP_NAME to the JAVA_OPTS as -Xdock:name
if $darwin; then
- JAVA_OPTS="$JAVA_OPTS -Xdock:name=$GRADLE_APP_NAME"
+ JAVA_OPTS="$JAVA_OPTS -Xdock:name=$APP_NAME"
# we may also want to set -Xdock:image
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
- JAVA_HOME=`cygpath --path --mixed "$JAVA_HOME"`
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
# We build the pattern for arguments to be converted via cygpath
@@ -143,7 +140,7 @@ if $cygwin ; then
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
- done
+ done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
@@ -158,11 +155,11 @@ if $cygwin ; then
esac
fi
-GRADLE_APP_BASE_NAME=`basename "$0"`
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-exec "$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \
- -classpath "$CLASSPATH" \
- -Dorg.gradle.appname="$GRADLE_APP_BASE_NAME" \
- -Dorg.gradle.wrapper.properties="$WRAPPER_PROPERTIES" \
- $STARTER_MAIN_CLASS \
- "$@"
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
View
52 gradlew.bat
@@ -1,24 +1,37 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
-@rem ##
-@rem Gradle startup script for Windows ##
-@rem ##
+@rem
+@rem Gradle startup script for Windows
+@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
-@rem Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
-@rem set GRADLE_OPTS=%GRADLE_OPTS% -Xmx512m
-@rem set JAVA_OPTS=%JAVA_OPTS% -Xmx512m
+@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=.\
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
set JAVA_EXE=java.exe
-if not defined JAVA_HOME goto init
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+goto fail
+
+:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
@@ -29,14 +42,14 @@ echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
-echo.
-goto end
+
+goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%eval[2+2]" == "4" goto 4NT_args
+if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
@@ -56,27 +69,22 @@ set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
-set STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain
-set CLASSPATH=%DIRNAME%\gradle\wrapper\gradle-wrapper.jar
-set WRAPPER_PROPERTIES=%DIRNAME%\gradle\wrapper\gradle-wrapper.properties
-
-set GRADLE_OPTS=%JAVA_OPTS% %GRADLE_OPTS% -Dorg.gradle.wrapper.properties="%WRAPPER_PROPERTIES%"
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
-"%JAVA_EXE%" %GRADLE_OPTS% -classpath "%CLASSPATH%" %STARTER_MAIN_CLASS% %CMD_LINE_ARGS%
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
-if not "%OS%"=="Windows_NT" echo 1 > nul | choice /n /c:1
-
+:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit "%ERRORLEVEL%"
-exit /b "%ERRORLEVEL%"
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
-:omega
+:omega
View
17 src/main/groovy/org/gradle/api/plugins/cargo/CargoPlugin.groovy
@@ -15,10 +15,12 @@
*/
package org.gradle.api.plugins.cargo
+import org.gradle.api.InvalidUserDataException
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.plugins.WarPlugin
import org.gradle.api.plugins.cargo.convention.CargoPluginConvention
+import org.gradle.plugins.ear.EarPlugin
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.gradle.api.plugins.cargo.property.*
@@ -109,6 +111,9 @@ class CargoPlugin implements Plugin<Project> {
localJettyTask.conventionMapping.map('homeDir') {
CargoProjectProperty.getTypedProperty(project, LocalContainerTaskProperty.HOME_DIR, cargoConvention.local.homeDir)
}
+ localJettyTask.conventionMapping.map('createContextXml') {
+ CargoProjectProperty.getTypedProperty(project, LocalJettyTaskProperty.CREATE_CONTEXT_XML, cargoConvention.local.jetty.createContextXml)
+ }
localJettyTask.conventionMapping.map('sessionPath') {
CargoProjectProperty.getTypedProperty(project, LocalJettyTaskProperty.SESSION_PATH, cargoConvention.local.jetty.sessionPath)
}
@@ -234,6 +239,10 @@ class CargoPlugin implements Plugin<Project> {
private void configureLocalContainer(Project project, CargoPluginConvention cargoConvention, Action action, CargoPluginTask task) {
project.afterEvaluate {
+ if(!cargoConvention.containerId) {
+ throw new InvalidUserDataException('Container ID was not defined.')
+ }
+
LocalContainerTaskMapping mapping = LocalContainerTaskMapping.getLocalContainerTaskMappingForContainerId(cargoConvention.containerId)
switch(mapping) {
@@ -243,9 +252,9 @@ class CargoPlugin implements Plugin<Project> {
break
case LocalContainerTaskMapping.JRUN: setLocalJRunConventionMapping(project, cargoConvention, action)
break
- case LocalContainerTaskMapping.TOMCAT: setLocalWeblogicConventionMapping(project, cargoConvention, action)
+ case LocalContainerTaskMapping.TOMCAT: setLocalTomcatConventionMapping(project, cargoConvention, action)
break
- case LocalContainerTaskMapping.WEBLOGIC: setLocalTomcatConventionMapping(project, cargoConvention, action)
+ case LocalContainerTaskMapping.WEBLOGIC: setLocalWeblogicConventionMapping(project, cargoConvention, action)
break
default: setLocalContainerConventionMapping(project, cargoConvention, action)
}
@@ -268,8 +277,8 @@ class CargoPlugin implements Plugin<Project> {
if(project.plugins.hasPlugin(WarPlugin.WAR_TASK_NAME)) {
return project.tasks.getByName(WarPlugin.WAR_TASK_NAME).archivePath
}
- else if(project.plugins.hasPlugin('ear')) {
- return project.tasks.getByName('ear').archivePath
+ else if(project.plugins.hasPlugin(EarPlugin.EAR_TASK_NAME)) {
+ return project.tasks.getByName(EarPlugin.EAR_TASK_NAME).archivePath
}
}
}
View
8 src/main/groovy/org/gradle/api/plugins/cargo/Container.groovy
@@ -26,8 +26,8 @@ import org.slf4j.LoggerFactory
enum Container {
GERONIMO_1X('geronimo1x', 'Geronimo 1.x'), GERONIMO_2X('geronimo2x', 'Geronimo 2.x'), GERONIMO_3X('geronimo3x', 'Geronimo 3.x'), GERONIMO_4X('geronimo4x', 'Geronimo 4.x'),
GLASSFISH_2X('glassfish2x', 'Glassfish 2.x'), GLASSFISH_3X('glassfish3x', 'Glassfish 3.x'),
- JBOSS_3X('jboss3x', 'JBoss 3.x'), JBOSS_4X('jboss4x', 'JBoss 4.x'), JBOSS_4_2X('jboss42x', 'JBoss 4.2.x'), JBOSS_5X('jboss5x', 'JBoss 5.x'), JBOSS_5_1X('jboss51x', 'JBoss 5.1.x'), JBOSS_6X('jboss6x', 'JBoss 6.x'), JBOSS_7X('jboss7x', 'JBoss 7.x'),
- JETTY_4X('jetty4x', 'Jetty 4.x'), JETTY_5X('jetty5x', 'Jetty 5.x'), JETTY_6X('jetty6x', 'Jetty 6.x'), JETTY_7X('jetty7x', 'Jetty 7.x'),
+ JBOSS_3X('jboss3x', 'JBoss 3.x'), JBOSS_4X('jboss4x', 'JBoss 4.x'), JBOSS_4_2X('jboss42x', 'JBoss 4.2.x'), JBOSS_5X('jboss5x', 'JBoss 5.x'), JBOSS_5_1X('jboss51x', 'JBoss 5.1.x'), JBOSS_6X('jboss6x', 'JBoss 6.x'), JBOSS_6_1X('jboss61x', 'JBoss 6.1.x'), JBOSS_7X('jboss7x', 'JBoss 7.x'), JBOSS_7_1X('jboss71x', 'JBoss 7.1.x'),
+ JETTY_4X('jetty4x', 'Jetty 4.x'), JETTY_5X('jetty5x', 'Jetty 5.x'), JETTY_6X('jetty6x', 'Jetty 6.x'), JETTY_7X('jetty7x', 'Jetty 7.x'), JETTY_8X('jetty8x', 'Jetty 8.x'),
JO_1X('jo1x', 'jo! 1.x'),
JONAS_4x('jonas4x', 'JOnAS 4.x'), JONAS_5x('jonas5x', 'JOnAS 5.x'),
JRUN_4X('jrun4x', 'JRun 4.x'),
@@ -49,8 +49,8 @@ enum Container {
static final EnumSet<Container> GERONIMO = EnumSet.range(GERONIMO_1X, GERONIMO_4X)
static final EnumSet<Container> GLASSFISH = EnumSet.of(GLASSFISH_2X, GLASSFISH_3X)
- static final EnumSet<Container> JBOSS = EnumSet.range(JBOSS_3X, JBOSS_7X)
- static final EnumSet<Container> JETTY = EnumSet.range(JETTY_4X, JETTY_7X)
+ static final EnumSet<Container> JBOSS = EnumSet.range(JBOSS_3X, JBOSS_7_1X)
+ static final EnumSet<Container> JETTY = EnumSet.range(JETTY_4X, JETTY_8X)
static final EnumSet<Container> JO = EnumSet.of(JO_1X)
static final EnumSet<Container> JONAS = EnumSet.of(JONAS_4x, JONAS_5x)
static final EnumSet<Container> JRUN = EnumSet.of(JRUN_4X)
View
7 src/main/groovy/org/gradle/api/plugins/cargo/LocalJettyTask.groovy
@@ -16,6 +16,7 @@
package org.gradle.api.plugins.cargo
import org.gradle.api.plugins.cargo.property.LocalJettyTaskProperty
+import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputDirectory
import org.gradle.api.tasks.Optional
@@ -25,11 +26,15 @@ import org.gradle.api.tasks.Optional
* @author Benjamin Muschko
*/
class LocalJettyTask extends LocalContainerTask {
+ @Input @Optional Boolean createContextXml
@InputDirectory @Optional File sessionPath
- Boolean useFileMappedBuffer
+ @Input @Optional Boolean useFileMappedBuffer
@Override
void setContainerSpecificProperties() {
+ if(getCreateContextXml()) {
+ property(name: LocalJettyTaskProperty.SESSION_PATH, value: getCreateContextXml())
+ }
if(getSessionPath()) {
property(name: LocalJettyTaskProperty.SESSION_PATH, value: getSessionPath())
}
View
10 src/main/groovy/org/gradle/api/plugins/cargo/LocalJonasTask.groovy
@@ -16,6 +16,8 @@
package org.gradle.api.plugins.cargo
import org.gradle.api.plugins.cargo.property.LocalJonasTaskProperty
+import org.gradle.api.tasks.Input
+import org.gradle.api.tasks.Optional
/**
* Deploys WAR to local Jonas container.
@@ -23,10 +25,10 @@ import org.gradle.api.plugins.cargo.property.LocalJonasTaskProperty
* @author Benjamin Muschko
*/
class LocalJonasTask extends LocalContainerTask {
- Integer jmsPort
- String serverName
- String servicesList
- String domainName
+ @Input @Optional Integer jmsPort
+ @Input @Optional String serverName
+ @Input @Optional String servicesList
+ @Input @Optional String domainName
@Override
void setContainerSpecificProperties() {
View
7 src/main/groovy/org/gradle/api/plugins/cargo/LocalTomcatTask.groovy
@@ -16,6 +16,7 @@
package org.gradle.api.plugins.cargo
import org.gradle.api.plugins.cargo.property.LocalTomcatTaskProperty
+import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputDirectory
import org.gradle.api.tasks.Optional
@@ -26,9 +27,9 @@ import org.gradle.api.tasks.Optional
*/
class LocalTomcatTask extends LocalContainerTask {
@InputDirectory @Optional File webappsDir
- Boolean copyWars
- Boolean contextReloadable
- Integer ajpPort
+ @Input @Optional Boolean copyWars
+ @Input @Optional Boolean contextReloadable
+ @Input @Optional Integer ajpPort
@Override
void setContainerSpecificProperties() {
View
9 src/main/groovy/org/gradle/api/plugins/cargo/LocalWeblogicTask.groovy
@@ -15,9 +15,10 @@
*/
package org.gradle.api.plugins.cargo
+import org.gradle.api.plugins.cargo.property.LocalWeblogicTaskProperty
+import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputDirectory
import org.gradle.api.tasks.Optional
-import org.gradle.api.plugins.cargo.property.LocalWeblogicTaskProperty
/**
* Deploys WAR to local Weblogic container.
@@ -25,10 +26,10 @@ import org.gradle.api.plugins.cargo.property.LocalWeblogicTaskProperty
* @author Benjamin Muschko
*/
class LocalWeblogicTask extends LocalContainerTask {
- String adminUser
- String adminPassword
+ @Input @Optional String adminUser
+ @Input @Optional String adminPassword
@InputDirectory @Optional File beaHome
- String server
+ @Input @Optional String server
@Override
void setContainerSpecificProperties() {
View
1  src/main/groovy/org/gradle/api/plugins/cargo/convention/CargoLocalJettyConvention.groovy
@@ -21,6 +21,7 @@ package org.gradle.api.plugins.cargo.convention
* @author Benjamin Muschko
*/
class CargoLocalJettyConvention {
+ Boolean createContextXml
File sessionPath
Boolean useFileMappedBuffer
}
View
1  src/main/groovy/org/gradle/api/plugins/cargo/property/LocalJettyTaskProperty.groovy
@@ -24,6 +24,7 @@ import org.slf4j.LoggerFactory
* @author Benjamin Muschko
*/
enum LocalJettyTaskProperty {
+ CREATE_CONTEXT_XML('cargo.jetty.createContextXml', PropertyDataType.BOOLEAN),
SESSION_PATH('cargo.jetty.session.path', PropertyDataType.FILE),
USE_FILE_MAPPED_BUFFER('cargo.jetty.servlet.default.useFileMappedBuffer', PropertyDataType.BOOLEAN)
Please sign in to comment.
Something went wrong with that request. Please try again.