com.github.dynamicextensionsalfresco.gradle.BundleService.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-plugin Show documentation
Show all versions of gradle-plugin Show documentation
Adds an OSGi container to alfresco repository supporting dynamic code reloading, classpath isolation and a bunch of other useful features
package com.github.dynamicextensionsalfresco.gradle
/**
* Client for performing operations against the REST API
*/
class BundleService {
RestClient client = new RestClient()
String apiPath = "/dynamic-extensions/api"
def installBundle(File file) {
if (!file.exists()) {
throw new FileNotFoundException(file.path)
}
if (!file.name.matches(/.+\.jar$/)) {
throw new IllegalArgumentException("Not a JAR file: ${file.absolutePath}.");
}
client.postFile(path: "$apiPath/bundles", file: file, mimeType: "application/java-archive")
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy