Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Waibel2017-02-01 09:42:32 -0500
committerFlorian Waibel2017-02-01 14:56:15 -0500
commiteef3fcdbf88fae15cb135e23acc783fb8ae402c8 (patch)
treefdbf7f6d43b5285aeb2b5c92ddf50e1b50be64a6
parent9663d638072e78749dea069bd4816823c9e188b5 (diff)
downloadorg.eclipse.virgo.samples-eef3fcdbf88fae15cb135e23acc783fb8ae402c8.tar.gz
org.eclipse.virgo.samples-eef3fcdbf88fae15cb135e23acc783fb8ae402c8.tar.xz
org.eclipse.virgo.samples-eef3fcdbf88fae15cb135e23acc783fb8ae402c8.zip
Update recipe accessing-data-mongodb in preparation for 3.7.0.RELEASE
-rw-r--r--recipe-accessing-data-mongodb/build.gradle33
-rw-r--r--recipe-accessing-data-mongodb/gradle.properties6
-rw-r--r--recipe-accessing-data-mongodb/gradle/wrapper/gradle-wrapper.jarbin53639 -> 53636 bytes
-rw-r--r--recipe-accessing-data-mongodb/gradle/wrapper/gradle-wrapper.properties4
-rw-r--r--recipe-accessing-data-mongodb/gradlew.bat180
-rw-r--r--recipe-accessing-data-mongodb/org.eclipse.virgo.samples.recipe.data.mongodb/src/main/resources/META-INF/spring/applicationContext.xml16
-rw-r--r--recipe-accessing-data-mongodb/org.eclipse.virgo.samples.recipe.data.mongodb/template.mf15
-rw-r--r--recipe-accessing-data-mongodb/recipe-accessing-data-mongodb-app/build.gradle6
-rw-r--r--recipe-accessing-data-mongodb/recipe-accessing-data-mongodb-runtime/build.gradle6
-rw-r--r--recipe-accessing-data-mongodb/settings.gradle5
-rw-r--r--recipe-accessing-data-mongodb/src/docs/asciidoc/08_dockerize_recipe.adoc6
11 files changed, 135 insertions, 142 deletions
diff --git a/recipe-accessing-data-mongodb/build.gradle b/recipe-accessing-data-mongodb/build.gradle
index 667f628..79799e1 100644
--- a/recipe-accessing-data-mongodb/build.gradle
+++ b/recipe-accessing-data-mongodb/build.gradle
@@ -7,8 +7,8 @@ buildscript {
}
dependencies {
classpath "gradle.plugin.org.eclipse.virgo.bundlor:bundlor-plugin:0.2"
- classpath "gradle.plugin.com.eclipsesource.dockerizor:dockerizor:0.7.0"
- classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3'
+ classpath "gradle.plugin.com.eclipsesource.dockerizor:dockerizor:0.8.1"
+ classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3'
}
}
@@ -25,7 +25,6 @@ ext.dockerProjects = [
configure(virgoProjects + dockerProjects) {
repositories {
- mavenLocal()
mavenCentral()
ivy {
url "http://build.eclipse.org/rt/virgo/ivy/bundles/release/"
@@ -39,13 +38,15 @@ configure(virgoProjects) {
apply plugin: 'eclipse'
apply plugin: 'eclipse-wtp'
- version = '0.1.0.BUILD-SNAPSHOT'
+ version = '0.3.0.BUILD-SNAPSHOT'
- repositories {
- mavenLocal()
+ repositories {
mavenCentral()
}
+ sourceCompatibility = '1.8'
+ targetCompatibility = '1.8'
+
compileJava {
options.encoding = 'utf-8'
options.fork = true
@@ -56,10 +57,6 @@ configure(virgoProjects) {
'-cp',
configurations.ecj.asPath,
'org.eclipse.jdt.internal.compiler.batch.Main',
- '-source',
- '1.8',
- '-target',
- '1.8',
'-warn:-unused'
]
}
@@ -76,10 +73,6 @@ configure(virgoProjects) {
'-cp',
configurations.ecj.asPath,
'org.eclipse.jdt.internal.compiler.batch.Main',
- '-source',
- '1.8',
- '-target',
- '1.8',
'-warn:-unused'
]
}
@@ -110,7 +103,7 @@ configure(virgoProjects) {
configure(virgoProjects) {
apply plugin: 'org.eclipse.virgo.bundlor'
-
+
task('addProjectVersionToGradlePropertiesTask', type: Copy) {
ext.outputDir = new File(buildDir, 'bundlor-properties')
inputs.file project.rootProject.file('gradle.properties')
@@ -137,7 +130,7 @@ configure(virgoProjects) {
manifestTemplatePath = "template.mf"
propertiesPath = new File("${project.buildDir}/bundlor-properties/gradle.properties")
inputPath = ext.bundlorInputPath
- failOnWarnings = false
+ failOnWarnings = true
}
}
@@ -151,14 +144,12 @@ configure(dockerProjects) {
dockerizor {
maintainer = 'Florian Waibel <fwaibel@eclipsesource.com>'
- virgoVersion = 'latest'
- hudsonJobName = 'gradle-build'
-
createLocalCopy = System.properties['local.build'] == 'true'
removeAdminConsole = System.properties['local.build'] != 'true'
+ removeSplash = System.properties['local.build'] != 'true'
virgoFlavour = 'VTS'
- virgoVersion = 'latest'
+ virgoVersion = '3.7.0.M04'
}
dockerize.dependsOn configurations.repositoryExt
@@ -166,5 +157,5 @@ configure(dockerProjects) {
}
task wrapper(type: Wrapper) {
- gradleVersion = '2.10'
+ gradleVersion = '3.1'
}
diff --git a/recipe-accessing-data-mongodb/gradle.properties b/recipe-accessing-data-mongodb/gradle.properties
index 402a039..2ac3083 100644
--- a/recipe-accessing-data-mongodb/gradle.properties
+++ b/recipe-accessing-data-mongodb/gradle.properties
@@ -1,4 +1,4 @@
-springframeworkVersion = 4.2.1.RELEASE
+springframeworkVersion = 4.2.9.RELEASE
# Eclipse Mars.1 bundle from Maven Central provided by Tycho
# org.eclipse.osgi_3.10.101.v20150820-1432.jar
@@ -8,8 +8,8 @@ equinoxVersion = 3.10.101.v20150820-1432
osgiServicesVersion = 3.5.0.v20150519-2006
mongoJavaDriverVersion = 2.13.3
-springDataCommonsVersion = 1.11.2.RELEASE
-springDataMongodbVersion = 1.8.2.RELEASE
+springDataCommonsVersion = 1.11.4.RELEASE
+springDataMongodbVersion = 1.8.4.RELEASE
# test dependencies
junitVersion = 4.12
diff --git a/recipe-accessing-data-mongodb/gradle/wrapper/gradle-wrapper.jar b/recipe-accessing-data-mongodb/gradle/wrapper/gradle-wrapper.jar
index 2c6137b..13372ae 100644
--- a/recipe-accessing-data-mongodb/gradle/wrapper/gradle-wrapper.jar
+++ b/recipe-accessing-data-mongodb/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/recipe-accessing-data-mongodb/gradle/wrapper/gradle-wrapper.properties b/recipe-accessing-data-mongodb/gradle/wrapper/gradle-wrapper.properties
index 6ced50b..3996521 100644
--- a/recipe-accessing-data-mongodb/gradle/wrapper/gradle-wrapper.properties
+++ b/recipe-accessing-data-mongodb/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Thu Apr 14 10:48:19 CEST 2016
+#Wed Feb 01 15:45:43 CET 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-bin.zip
diff --git a/recipe-accessing-data-mongodb/gradlew.bat b/recipe-accessing-data-mongodb/gradlew.bat
index 5f19212..aec9973 100644
--- a/recipe-accessing-data-mongodb/gradlew.bat
+++ b/recipe-accessing-data-mongodb/gradlew.bat
@@ -1,90 +1,90 @@
-@if "%DEBUG%" == "" @echo off
-@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 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 Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%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
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-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.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%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
-
-: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 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
+@if "%DEBUG%" == "" @echo off
+@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 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 Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%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
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+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.
+
+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
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%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
+
+: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 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/recipe-accessing-data-mongodb/org.eclipse.virgo.samples.recipe.data.mongodb/src/main/resources/META-INF/spring/applicationContext.xml b/recipe-accessing-data-mongodb/org.eclipse.virgo.samples.recipe.data.mongodb/src/main/resources/META-INF/spring/applicationContext.xml
index 9e1452d..7464190 100644
--- a/recipe-accessing-data-mongodb/org.eclipse.virgo.samples.recipe.data.mongodb/src/main/resources/META-INF/spring/applicationContext.xml
+++ b/recipe-accessing-data-mongodb/org.eclipse.virgo.samples.recipe.data.mongodb/src/main/resources/META-INF/spring/applicationContext.xml
@@ -9,16 +9,14 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo.xsd" >
-<context:property-placeholder location="classpath:mongodb.properties" />
+ <!-- tag::configuration[] -->
+ <context:property-placeholder location="classpath:mongodb.properties" />
-<!-- tag::configuration[] -->
- <mongo:db-factory dbname="recipes" host="${mongodb.host:localhost}:${mongodb.port:27017}" /><!--1-->
- <mongo:repositories base-package="org.eclipse.virgo.samples.recipe.data.mongodb" /><!--2-->
+ <mongo:db-factory dbname="recipes" host="${mongodb.host:localhost}:${mongodb.port:27017}" /><!--1 -->
+ <mongo:template />
+ <mongo:repositories base-package="org.eclipse.virgo.samples.recipe.data.mongodb" />
- <bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate"><!--3-->
- <constructor-arg ref="mongoDbFactory" />
- </bean>
+ <context:component-scan base-package="org.eclipse.virgo.samples.recipe.data.mongodb" /><!--4 -->
+ <!-- end::configuration[] -->
- <context:component-scan base-package="org.eclipse.virgo.samples.recipe.data.mongodb" /><!--4-->
-<!-- end::configuration[] -->
</beans>
diff --git a/recipe-accessing-data-mongodb/org.eclipse.virgo.samples.recipe.data.mongodb/template.mf b/recipe-accessing-data-mongodb/org.eclipse.virgo.samples.recipe.data.mongodb/template.mf
index 4ecce3c..25a8f87 100644
--- a/recipe-accessing-data-mongodb/org.eclipse.virgo.samples.recipe.data.mongodb/template.mf
+++ b/recipe-accessing-data-mongodb/org.eclipse.virgo.samples.recipe.data.mongodb/template.mf
@@ -1,10 +1,11 @@
Bundle-Version: 0.1
Bundle-Name: Virgo Recipe MongoDB
Bundle-SymbolicName: org.eclipse.virgo.samples.recipe.data.mongodb
-Import-Package: com.mongodb,
- org.springframework.data.domain,
- org.springframework.data.repository.core.support,
- org.springframework.data.mongodb.repository.support,
- org.aopalliance.aop
-Import-Bundle:
- org.springframework.aop
+Import-Bundle: org.springframework.aop,
+ org.springframework.beans,
+ org.springframework.data.core,
+ org.springframework.data.mongodb
+Excluded-Imports: org.springframework.*
+Import-Package: com.mongodb;version="[2.13,3)",
+ javax.annotation;version="0",
+ org.aopalliance.aop;version="1"
diff --git a/recipe-accessing-data-mongodb/recipe-accessing-data-mongodb-app/build.gradle b/recipe-accessing-data-mongodb/recipe-accessing-data-mongodb-app/build.gradle
index 84d5e27..47576cf 100644
--- a/recipe-accessing-data-mongodb/recipe-accessing-data-mongodb-app/build.gradle
+++ b/recipe-accessing-data-mongodb/recipe-accessing-data-mongodb-app/build.gradle
@@ -12,9 +12,9 @@ repositories {
}
dependencies {
- repositoryUsr group: "org.mongodb", name: "mongo-java-driver", version: mongoJavaDriverVersion
- repositoryUsr group: "org.springframework.data", name: "spring-data-commons", version: springDataCommonsVersion
- repositoryUsr group: "org.springframework.data", name: "spring-data-mongodb", version: springDataMongodbVersion
+ repositoryUsr "org.mongodb:mongo-java-driver:${mongoJavaDriverVersion}"
+ repositoryUsr "org.springframework.data:spring-data-commons:${springDataCommonsVersion}"
+ repositoryUsr "org.springframework.data:spring-data-mongodb:${springDataMongodbVersion}"
repositoryUsr project(':org.eclipse.virgo.samples.recipe.data.mongodb')
}
diff --git a/recipe-accessing-data-mongodb/recipe-accessing-data-mongodb-runtime/build.gradle b/recipe-accessing-data-mongodb/recipe-accessing-data-mongodb-runtime/build.gradle
index b0b88bd..d4a4c29 100644
--- a/recipe-accessing-data-mongodb/recipe-accessing-data-mongodb-runtime/build.gradle
+++ b/recipe-accessing-data-mongodb/recipe-accessing-data-mongodb-runtime/build.gradle
@@ -11,8 +11,8 @@ repositories {
//tag::dependencies[]
dependencies {
- repositoryUsr("org.mongodb:mongo-java-driver:${mongoJavaDriverVersion}")
- repositoryUsr group: "org.springframework.data", name: "spring-data-commons", version: springDataCommonsVersion
- repositoryUsr group: "org.springframework.data", name: "spring-data-mongodb", version: springDataMongodbVersion
+ repositoryUsr "org.mongodb:mongo-java-driver:${mongoJavaDriverVersion}"
+ repositoryUsr "org.springframework.data:spring-data-commons:${springDataCommonsVersion}"
+ repositoryUsr "org.springframework.data:spring-data-mongodb:${springDataMongodbVersion}"
}
//end::dependencies[]
diff --git a/recipe-accessing-data-mongodb/settings.gradle b/recipe-accessing-data-mongodb/settings.gradle
index 0debf22..aff841b 100644
--- a/recipe-accessing-data-mongodb/settings.gradle
+++ b/recipe-accessing-data-mongodb/settings.gradle
@@ -1 +1,4 @@
-include 'org.eclipse.virgo.samples.recipe.data.mongodb', 'recipe-accessing-data-mongodb-runtime', 'recipe-accessing-data-mongodb-app'
+include 'org.eclipse.virgo.samples.recipe.data.mongodb'
+
+include 'recipe-accessing-data-mongodb-runtime'
+include 'recipe-accessing-data-mongodb-app'
diff --git a/recipe-accessing-data-mongodb/src/docs/asciidoc/08_dockerize_recipe.adoc b/recipe-accessing-data-mongodb/src/docs/asciidoc/08_dockerize_recipe.adoc
index c0e3b07..bb782fe 100644
--- a/recipe-accessing-data-mongodb/src/docs/asciidoc/08_dockerize_recipe.adoc
+++ b/recipe-accessing-data-mongodb/src/docs/asciidoc/08_dockerize_recipe.adoc
@@ -10,9 +10,9 @@ $ ./gradlew dockerize
----
[NOTE]
-----
-This recipe assumes you have a local RabbitMQ up and running.
-----
+--
+This recipe assumes you have a local MongoDB up and running.
+--
Let's create an isolated network `recipe_nw` to test the complete recipe:

Back to the top