Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing, still using Java 11 #10

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,15 @@ Web app hosting few utilities for [Apache Jackrabbit Oak][1] using Google Appeng
In action: [oakutils.appspot.com](http://oakutils.appspot.com)

[1]: http://jackrabbit.apache.org/oak

## Deploy

jdk 11
open https://cloud.google.com/sdk/docs/install-sdk
gcloud auth login
mvn package appengine:deploy -Dapp.deploy.projectId=oakutils -Dapp.deploy.version=20240703t163000

## Local Development

Consider adding sufficient unit tests, and using
http://gaelyk.appspot.com/tutorial/run-deploy#run
7 changes: 6 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<modelVersion>4.0.0</modelVersion>
<packaging>war</packaging>
<version>1.0.1-SNAPSHOT</version>
<version>1.0.3-SNAPSHOT</version>
<groupId>com.chetanmeh.appengine</groupId>
<artifactId>oakutils-war</artifactId>

Expand All @@ -25,6 +25,11 @@
</scm>

<dependencies>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>oak-commons</artifactId>
<version>${oak.version}</version>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>oak-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,34 +28,11 @@ class RequestConfigHandler {
}

static Indexes getIndexInfo(String fileName, InputStream is){
if (fileName.endsWith("xml")){
def text = Streams.asString(is, 'utf-8')
return new XmlConfig(text).parse()
} else if (fileName.endsWith("zip")){
Indexes indexes = new Indexes()
readFromContentPackage(is, indexes)
indexes.afterPropertiesSet()
return indexes
} else if (fileName.endsWith("json")){
if (fileName.endsWith("json")){
def text = Streams.asString(is, 'utf-8')
return new JsonConfig(text).parse()
}
return null
}

private static void readFromContentPackage(InputStream is, Indexes indexes) {
ZipInputStream zis = new ZipInputStream(is)
ZipEntry entry
byte[] buffer = new byte[2048];
while ((entry = zis.getNextEntry())) {
if (entry.name.endsWith('/_oak_index/.content.xml')) {
ByteArrayOutputStream baos = new ByteArrayOutputStream()
int len = 0
while ((len = zis.read(buffer)) > 0) {
baos.write(buffer, 0, len);
}
new XmlConfig(baos.toString('utf-8')).parseTo(indexes)
}
}
}
}
116 changes: 0 additions & 116 deletions src/main/groovy/com/chetanmeh/oak/index/config/parser/XmlConfig.groovy

This file was deleted.

61 changes: 0 additions & 61 deletions src/main/groovy/com/chetanmeh/oak/state/export/CndExporter.groovy

This file was deleted.

36 changes: 0 additions & 36 deletions src/main/groovy/com/chetanmeh/oak/state/export/JsonExporter.groovy

This file was deleted.

This file was deleted.

85 changes: 0 additions & 85 deletions src/main/groovy/com/chetanmeh/oak/state/export/XmlExporter.groovy

This file was deleted.

Loading