This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Read a JSON message from ActiveMQ, get a filename from it, | |
// use exiftool to get file metadata and encode in JSON | |
import groovy.json.StreamingJsonBuilder | |
def writer = new java.io.OutputStreamWriter(System.out) | |
def builder = new StreamingJsonBuilder(writer) | |
// Get JSON message from queue | |
// TODO should not ACK it if this script fails |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global: | |
monitor:true | |
reporters: | |
jmx: true | |
console: | |
period: 30 | |
org.apache.sling.jcr.api.SlingRepository: | |
getDefaultWorkspace: | |
()Ljava/lang/String;: timer | |
loginAdministrative: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sling .groovy rendering script that uses Groovy's JsonBuilder | |
// Requires the groovy, groovy-json, groovy-templates and groovy-jsr233 bundles, so | |
// that /system/console/status-slingscripting lists the Groovy engine. | |
// Also requires adding "groovy" as an additional extension to the | |
// org.apache.sling.scripting.core.impl.ScriptCacheImpl config | |
import groovy.json.StreamingJsonBuilder | |
def builder = new StreamingJsonBuilder(out) | |
def getChildren(r) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Experimenting with Groovy JsonBuilder as a way to implement | |
// a JSON builder script engine for Sling | |
// The Sling .jsonbuild script would only contain the part | |
// between // SCRIPT markers below, the rest is glue that | |
// this new scripting engine would provide | |
// We'll probably need a Groovy-friendly wrapper | |
// with convenience methods for the current resource, | |
// where the tree navigation starts from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Demonstrate various features of the Groovy StreamingJsonBuilder | |
// run this with groovy <filename> | |
// See below for typical output | |
// A Groovy class | |
class Resource { String path; String resourceType } | |
// Groovy list of resources | |
resources = [ | |
new Resource(path:"/tmp/one", resourceType:"my/example"), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find all pom.xml files under specified path and generate a comma-separated | |
# list of their folder names, suitable for use with the mvn -pl option | |
find "$1" -name pom.xml | grep -v '/target/' | xargs -n1 dirname | awk '{ printf $1 "," }' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: bundles/jcr/oak-server/pom.xml | |
=================================================================== | |
--- bundles/jcr/oak-server/pom.xml (revision 1697914) | |
+++ bundles/jcr/oak-server/pom.xml (working copy) | |
@@ -41,7 +41,7 @@ | |
WARNING make sure oak.version and sling.oak.server.version | |
are in sync with bundles/jcr/it-jackrabbit-oak | |
--> | |
- <oak.version>1.3.3</oak.version> | |
+ <oak.version>1.4-SNAPSHOT</oak.version> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeImpl.java | |
=================================================================== | |
--- oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeImpl.java (revision 1682417) | |
+++ oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeImpl.java (working copy) | |
@@ -48,6 +48,10 @@ | |
public Set<SelectorImpl> getSelectors() { | |
return Collections.singleton(selector); | |
} | |
+ | |
+ public String getAncestorPath() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# switch jdk on macosx | |
# thanks to @jreijn for the --version trick | |
# see http://blog.frd.mn/java-7-on-os-x-yosemite/ for Java7 install trick | |
export JAVA_HOME=`/usr/libexec/java_home --version $1` | |
export PATH=$JAVA_HOME/bin:$PATH | |
# this just confirms that we have the right JDK now | |
java -version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/launchpad/builder/pom.xml b/launchpad/builder/pom.xml | |
index 079cd92..2e216a8 100644 | |
--- a/launchpad/builder/pom.xml | |
+++ b/launchpad/builder/pom.xml | |
@@ -65,6 +65,12 @@ | |
Context path of the Sling web application | |
--> | |
<jetty.sling.context>/</jetty.sling.context> | |
+ | |
+ <!-- |