Skip to content

Instantly share code, notes, and snippets.

@davidjgonzalez
davidjgonzalez / mavenize-cq5-dependencies
Created February 26, 2012 21:09 — forked from kurtharriger/mavenize-cq5-dependencies
This script will download all crxde classpath dependencies and install them in your local maven repository
#! /bin/bash
set -e
trap "exit 1;" INT TERM EXIT
# exec > >(tee $0.log)
# exec 2>&1
[ -z "$CRX_URL" ] && CRX_URL=http://localhost:4502
[ -z "$CRX_CREDENTIALS" ] && CRX_CREDENTIALS=admin:admin
Note 1: The following CQ curl commands assumes a admin:admin username and password.
Note 2: For Windows/Powershell users: use two "" when doing a -F cURL command.
Example: -F"":operation=delete""
Note 3: Quotes around name of package (or name of zip file, or jar) should be included.
Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console)
curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle"
Upload a package AND install
curl -u admin:admin -F file=@"name of zip file" -F name="name of package"
import java.io.IOException;
import org.apache.commons.httpclient.Header;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.PostMethod;
public class Test {
var debugEnabled = false
var infoEnabled = true
var traceEnabled = false
//Maximum number of live paths to determine when a leak object is found
var maxPathsToFound = 1
//No of object instances after which a progress message
//is logged
@davidjgonzalez
davidjgonzalez / oak-browse-tree.groovy
Created April 28, 2017 18:41 — forked from alexkli/oak-browse-tree.groovy
Groovy script for displaying hidden Oak content structures
// --------------------------------------------------------------
// change these input values
// path: what oak path to show
def path = "/oak:index/nodetype/:index";
// depth: how deep the tree structure should be rendered
def depth = 2;
// --------------------------------------------------------------