Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Restore old Jersey in GlassFish 4.0.1
#!/bin/bash
MODULES_DIR=`pwd`/modules
OSGI_CACHE_DIR=`pwd`/domains/domain1/osgi-cache/felix
processArtifact() {
# Restore artifact
if [ -f ${MODULES_DIR}/$1.bak ]; then
echo "Restoring $1 ..."
mv ${MODULES_DIR}/$1.bak ${MODULES_DIR}/$1
fi
return 0
}
# Restore old Jersey
processArtifact jersey-gf-cdi.jar
processArtifact jersey-gf-ejb.jar
processArtifact jersey-container-grizzly2-http.jar
processArtifact jersey-container-servlet-core.jar
processArtifact jersey-container-servlet.jar
processArtifact jersey-client.jar
processArtifact jersey-common.jar
processArtifact jersey-server.jar
processArtifact jersey-bean-validation.jar
processArtifact jersey-entity-filtering.jar
processArtifact jersey-mvc-jsp.jar
processArtifact jersey-mvc.jar
processArtifact jersey-media-json-jackson.jar
processArtifact jersey-media-json-jettison.jar
processArtifact jersey-media-json-processing.jar
processArtifact jersey-media-moxy.jar
processArtifact jersey-media-multipart.jar
processArtifact jersey-media-sse.jar
# Restore old HK2
processArtifact hk2-api.jar
processArtifact class-model.jar
processArtifact core.jar
processArtifact hk2-locator.jar
processArtifact hk2-utils.jar
processArtifact hk2.jar
processArtifact hk2-runlevel.jar
processArtifact hk2-config.jar
processArtifact osgi-adapter.jar
processArtifact bean-validator-cdi.jar
processArtifact bean-validator.jar
processArtifact aopalliance-repackaged.jar
processArtifact asm-all-repackaged.jar
processArtifact javax.inject.jar
processArtifact javassist.jar
# Clean up OSGi cache
if [ -d "$OSGI_CACHE_DIR" ]; then
rm -rf $OSGI_CACHE_DIR
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment