Skip to content

Commit e223a60

Browse files
committed
Merge branch 'release-3.0.3'
2 parents f3582eb + 62beb6f commit e223a60

Some content is hidden

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

43 files changed

+460
-215
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ buildSrc/build
2525
bin
2626
creds
2727
.idea
28+
*/gradle/wrapper/gradle-wrapper.properties

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# marklogic-jena v3.0.2
1+
# marklogic-jena v3.0.3
22

33
## Introduction
44

@@ -46,7 +46,7 @@ gradle install
4646
For gradle-based projects include this dependency in `build.gradle`:
4747
```
4848
dependencies {
49-
compile 'com.marklogic:marklogic-jena:3.0.2'
49+
compile 'com.marklogic:marklogic-jena:3.0.3'
5050
}
5151
```
5252

@@ -56,7 +56,7 @@ Maven-based projects use this block in `pom.xml`:
5656
<dependency>
5757
<groupId>com.marklogic</groupId>
5858
<artifactId>marklogic-jena</artifactId>
59-
<version>3.0.2</version>
59+
<version>3.0.3</version>
6060
</dependency>
6161
```
6262

build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id "com.marklogic.ml-gradle" version "2.3.3"
2+
id "com.marklogic.ml-gradle" version "2.5.0"
33
}
44

55
subprojects {
@@ -9,9 +9,6 @@ subprojects {
99
apply plugin: 'jacoco'
1010
jacoco{toolVersion="0.7.4.201502262128"}
1111

12-
sourceCompatibility = "1.8"
13-
targetCompatibility = "1.8"
14-
1512
configure(allprojects){
1613
ext.slf4jVersion = '1.7.21'
1714
ext.logbackVersion = '1.1.7'

gradle/wrapper/gradle-wrapper.jar

-317 Bytes
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Tue Jan 12 14:52:40 PST 2016
1+
#Thu Feb 09 09:47:25 PST 2017
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip

gradlew

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,30 @@
66
##
77
##############################################################################
88

9-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10-
DEFAULT_JVM_OPTS=""
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
1126

1227
APP_NAME="Gradle"
1328
APP_BASE_NAME=`basename "$0"`
1429

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+
1533
# Use the maximum available, or set MAX_FD != -1 to use that value.
1634
MAX_FD="maximum"
1735

@@ -30,6 +48,7 @@ die ( ) {
3048
cygwin=false
3149
msys=false
3250
darwin=false
51+
nonstop=false
3352
case "`uname`" in
3453
CYGWIN* )
3554
cygwin=true
@@ -40,31 +59,11 @@ case "`uname`" in
4059
MINGW* )
4160
msys=true
4261
;;
62+
NONSTOP* )
63+
nonstop=true
64+
;;
4365
esac
4466

45-
# For Cygwin, ensure paths are in UNIX format before anything is touched.
46-
if $cygwin ; then
47-
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48-
fi
49-
50-
# Attempt to set APP_HOME
51-
# Resolve links: $0 may be a link
52-
PRG="$0"
53-
# Need this for relative symlinks.
54-
while [ -h "$PRG" ] ; do
55-
ls=`ls -ld "$PRG"`
56-
link=`expr "$ls" : '.*-> \(.*\)$'`
57-
if expr "$link" : '/.*' > /dev/null; then
58-
PRG="$link"
59-
else
60-
PRG=`dirname "$PRG"`"/$link"
61-
fi
62-
done
63-
SAVED="`pwd`"
64-
cd "`dirname \"$PRG\"`/" >&-
65-
APP_HOME="`pwd -P`"
66-
cd "$SAVED" >&-
67-
6867
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
6968

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

9291
# Increase the maximum file descriptors if we can.
93-
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
92+
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
9493
MAX_FD_LIMIT=`ulimit -H -n`
9594
if [ $? -eq 0 ] ; then
9695
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -114,6 +113,7 @@ fi
114113
if $cygwin ; then
115114
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116115
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116+
JAVACMD=`cygpath --unix "$JAVACMD"`
117117

118118
# We build the pattern for arguments to be converted via cygpath
119119
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`

gradlew.bat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
@rem Set local scope for the variables with windows NT shell
99
if "%OS%"=="Windows_NT" setlocal
1010

11-
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12-
set DEFAULT_JVM_OPTS=
13-
1411
set DIRNAME=%~dp0
1512
if "%DIRNAME%" == "" set DIRNAME=.
1613
set APP_BASE_NAME=%~n0
1714
set APP_HOME=%DIRNAME%
1815

16+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17+
set DEFAULT_JVM_OPTS=
18+
1919
@rem Find java.exe
2020
if defined JAVA_HOME goto findJavaFromJavaHome
2121

@@ -46,7 +46,7 @@ echo location of your Java installation.
4646
goto fail
4747

4848
:init
49-
@rem Get command-line arguments, handling Windowz variants
49+
@rem Get command-line arguments, handling Windows variants
5050

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

marklogic-jena-examples/build.gradle

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,34 @@ apply plugin: 'eclipse'
88
apply plugin: 'java'
99

1010

11-
evaluationDependsOn(":marklogic-jena")
1211

1312
dependencies {
14-
compile('com.marklogic:marklogic-jena:3.0.2'){
15-
changing=true
16-
exclude(group: 'org.slf4j')
17-
exclude(group: 'log4j')
18-
exclude(group: 'ch.qos.logback')
19-
}
20-
21-
compile("org.slf4j:slf4j-api:$slf4jVersion")
22-
compile "ch.qos.logback:logback-classic:$logbackVersion"
13+
compile project (':marklogic-jena')
2314
compile 'org.openjdk.jmh:jmh-core:1.3.2'
2415
compile 'org.openjdk.jmh:jmh-generator-annprocess:1.3.2'
2516
}
2617

27-
compileJava.dependsOn ":marklogic-jena:install"
18+
task runGraphExample(type: JavaExec) {
19+
classpath = sourceSets.main.runtimeClasspath
20+
main = 'com.marklogic.jena.examples.GraphCRUDExample'
21+
}
22+
23+
task runModelExample(type: JavaExec) {
24+
classpath = sourceSets.main.runtimeClasspath
25+
main = 'com.marklogic.jena.examples.ModelCRUDExample'
26+
}
27+
28+
task runRIOTExample(type: JavaExec) {
29+
classpath = sourceSets.main.runtimeClasspath
30+
main = 'com.marklogic.jena.examples.RIOTExample'
31+
}
32+
33+
task runQueryExample(type: JavaExec) {
34+
classpath = sourceSets.main.runtimeClasspath
35+
main = 'com.marklogic.jena.examples.SPARQLQueryExample'
36+
}
37+
38+
task runUpdateExample(type: JavaExec) {
39+
classpath = sourceSets.main.runtimeClasspath
40+
main = 'com.marklogic.jena.examples.SPARQLUpdateExample'
41+
}

marklogic-jena-examples/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group=com.marklogic
2-
version=3.0.2-SNAPSHOT
2+
version=3.0-SNAPSHOT
33

44
mlConfigDir=marklogic-jena-examples/src/main/ml-config
55
mlHost=localhost

marklogic-jena-examples/src/main/java/com/marklogic/jena/examples/ExampleUtils.java

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2016-2017 MarkLogic Corporation
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.marklogic.jena.examples;
217

318
import java.io.FileInputStream;
@@ -6,28 +21,34 @@
621

722
import com.marklogic.client.DatabaseClient;
823
import com.marklogic.client.DatabaseClientFactory;
9-
import com.marklogic.client.DatabaseClientFactory.Authentication;
1024
import com.marklogic.semantics.jena.MarkLogicDatasetGraph;
1125
import com.marklogic.semantics.jena.MarkLogicDatasetGraphFactory;
26+
import org.apache.commons.io.FileUtils;
1227

1328
public class ExampleUtils {
1429

1530

1631
public static MarkLogicDatasetGraph loadPropsAndInit() {
1732
Properties props = new Properties();
33+
// two attempts to load
1834
try {
19-
props.load(new FileInputStream("gradle.properties"));
35+
props.load(new FileInputStream("marklogic-jena-examples/gradle.properties"));
2036
} catch (IOException e) {
21-
System.err.println("problem loading properties file.");
22-
System.exit(1);
37+
// gradle prefers this path.
38+
try {
39+
props.load(new FileInputStream("gradle.properties"));
40+
} catch (IOException e2) {
41+
System.err.println("problem loading properties file.");
42+
System.exit(1);
43+
}
2344
}
2445
String host = props.getProperty("mlHost");
2546
int port = Integer.parseInt(props.getProperty("mlRestPort"));
2647
String user = props.getProperty("writerUser");
2748
String pass = props.getProperty("writerPassword");
2849

2950
DatabaseClient client = DatabaseClientFactory.newClient(host, port,
30-
user, pass, Authentication.DIGEST);
51+
new DatabaseClientFactory.DigestAuthContext(user, pass));
3152
MarkLogicDatasetGraph dg = MarkLogicDatasetGraphFactory
3253
.createDatasetGraph(client);
3354
return dg;

0 commit comments

Comments
 (0)