Skip to content
Open
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
21 changes: 13 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
// 2. Change gradleVersion here
// 3. Change the distributionUrl in gradle/wrapper/gradle-wrapper.properties
// 4. Run ./gradlew wrapper
task wrapper(type: Wrapper) {
gradleVersion = '3.0'
wrapper() {
gradleVersion = '5.5.1'
}

// The project version is controlled externally by the "version.sh" script.
Expand Down Expand Up @@ -51,7 +51,7 @@ buildscript {
}
dependencies {
classpath 'net.nisgits.gradle:gradle-executable-jar-plugin:1.7.0'
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.6.0"
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.23.1"
}
}

Expand All @@ -63,13 +63,17 @@ if (JavaVersion.current().isJava8Compatible()) {
}
}


subprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'com.diffplug.gradle.spotless'

sourceCompatibility = 11
targetCompatibility = 11
tasks.withType(Javadoc).all { enabled = false } // This is for disabling javadocs, related issue: https://github.com/gradle/gradle/issues/8267
repositories {
mavenCentral()
mavenLocal()
Expand Down Expand Up @@ -100,18 +104,19 @@ subprojects {
}

dependencies {
compile 'com.google.guava:guava:25.1-jre'
compile 'javax.annotation:javax.annotation-api:1.3' //{ // https://github.com/grpc/grpc-java/issues/3633
compile 'com.google.guava:guava:27.1-jre'
compile 'org.mockito:mockito-all:1.9.5'
compile 'commons-codec:commons-codec:1.8'
compile 'commons-codec:commons-codec:1.12'
compile 'com.google.code.findbugs:jsr305:2.0.1'
compile 'org.slf4j:slf4j-api:1.7.5'
compile 'org.slf4j:slf4j-api:1.7.26'
compile 'ch.qos.logback:logback-classic:1.0.13'
compile 'joda-time:joda-time:2.2'
compile 'joda-time:joda-time:2.10.2'
compile 'org.apache.thrift:libthrift:0.12.0'
compile 'commons-configuration:commons-configuration:1.9'
compile group: 'com.cinchapi', name: 'accent4j', version: '1.6.0', changing:true
compile 'com.cinchapi:lib-config:1.5.1'

testCompile 'junit:junit:4.11'
}

Expand Down
2 changes: 1 addition & 1 deletion concourse-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ signing {

dependencies {
compile project(':concourse-driver-java')
compile 'com.beust:jcommander:1.32'
compile 'com.beust:jcommander:1.72'
compile 'jline:jline:2.11'
}

Expand Down
8 changes: 4 additions & 4 deletions concourse-driver-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ signing {
}

dependencies {
compile 'org.slf4j:log4j-over-slf4j:1.7.5'
compile 'org.slf4j:jcl-over-slf4j:1.7.5'
compile 'com.google.code.gson:gson:2.5'
compile 'org.slf4j:log4j-over-slf4j:1.7.26'
compile 'org.slf4j:jcl-over-slf4j:1.7.26'
compile 'com.google.code.gson:gson:2.8.5'
compile group: 'com.cinchapi', name: 'ccl', version:'2.6.1'

testCompile project(':concourse-unit-test-core')
testCompile 'com.github.marschall:memoryfilesystem:0.9.0'
testCompile 'com.github.marschall:memoryfilesystem:2.1.0'
}

ext.uploadEnabled = true
Expand Down
14 changes: 7 additions & 7 deletions concourse-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ dependencies {
compile project(':concourse-shell')
compile project(':concourse-cli')
compile project(':concourse-import')
compile 'com.beust:jcommander:1.32'
compile 'com.beust:jcommander:1.72'
compile 'com.github.stephenc.high-scale-lib:high-scale-lib:1.1.4'
compile ('org.reflections:reflections:0.9.9-RC2'){
compile ('org.reflections:reflections:0.9.11'){
exclude group: 'org.javassist', module:'javassist'
}
compile 'org.javassist:javassist:3.18.2-GA'
compile 'org.eclipse.jetty:jetty-server:9.2.9.v20150224'
compile 'org.eclipse.jetty:jetty-webapp:9.2.9.v20150224'
compile 'com.github.spullara.mustache.java:compiler:0.8.15'
compile 'org.javassist:javassist:3.25.0-GA'
compile 'org.eclipse.jetty:jetty-server:9.4.13.v20181111'
compile 'org.eclipse.jetty:jetty-webapp:9.4.13.v20181111'
compile 'com.github.spullara.mustache.java:compiler:0.9.6'
compile 'com.joestelmach:natty:0.12'
compile 'com.google.inject:guice:4.2.0'
compile 'com.google.inject:guice:4.2.2'
compile 'io.atomix.catalyst:catalyst-buffer:1.1.1'
compile 'com.cinchapi:process-watcher:1.0.0'
compile (group:'com.cinchapi', name: 'bucket', version: bucketVersion, changing:true) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public String separators() {
return null;
}

@Override
// Used to Override
public String optionPrefixes() {
return null;
}
Expand All @@ -121,6 +121,10 @@ public String[] commandNames() {
return null;
}

@Override public boolean hidden() {
return false;
}

};
try {
Object object = RuntimeDynamics.newAnonymousObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public String separators() {
return null;
}

@Override
// Used to Override
public String optionPrefixes() {
return null;
}
Expand All @@ -122,6 +122,10 @@ public String[] commandNames() {
return null;
}

@Override public boolean hidden() {
return false;
}

};
try {
Object object = RuntimeDynamics.newAnonymousObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public String separators() {
return null;
}

@Override
// Used to Override
public String optionPrefixes() {
return null;
}
Expand All @@ -121,6 +121,10 @@ public String[] commandNames() {
return null;
}

@Override public boolean hidden() {
return false;
}

};
try {
Object object = RuntimeDynamics.newAnonymousObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public String separators() {
return null;
}

@Override
// Used to Override
public String optionPrefixes() {
return null;
}
Expand All @@ -121,6 +121,10 @@ public String[] commandNames() {
return null;
}

@Override public boolean hidden() {
return false;
}

};
try {
Object object = RuntimeDynamics.newAnonymousObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public final class ServerProcesses {
* @return the result of running the routine
*/
public static <T extends Serializable> T fork(Forkable<T> routine) {
Callback<T> callback = new NoOpCallback<T>();
var callback = new NoOpCallback<T>();
fork(routine, callback);
return callback.getResult();
}
Expand All @@ -76,41 +76,28 @@ public static <T extends Serializable> T fork(Forkable<T> routine) {
* @param callback the {@link Callback} that handles the result
* @return the result of running the routine
*/
public static <T extends Serializable> void fork(final Forkable<T> routine,
public static <T extends Serializable> void fork(
final Forkable<T> routine,
final Callback<T> callback) {
String input = FileSystem.tempFile(); // use to serialize the #routine
// so it can be read by forked
// process
final String output = FileSystem.tempFile(); // used to serialize the
// return value for the
// #routine so it be read
// by this process
String source = FORK_TEMPLATE.replace("INSERT_INPUT_PATH", input)
.replace("INSERT_OUTPUT_PATH", output)
final var inputFilePath = FileSystem.tempFile();
final var outputFilePath = FileSystem.tempFile();
final var sourceCode = FORK_TEMPLATE
.replace("INSERT_INPUT_PATH", inputFilePath)
.replace("INSERT_OUTPUT_PATH", outputFilePath)
.replace("INSERT_CLASS_NAME", routine.getClass().getName());
final var inputChannel = FileSystem.getFileChannel(inputFilePath);

// Since the #routine is forked, we offer the external JVM process the
// local classpath
String classpath = StringUtils.join(
((URLClassLoader) Thread.currentThread()
.getContextClassLoader()).getURLs(),
JavaApp.CLASSPATH_SEPARATOR);
FileChannel inputChannel = FileSystem.getFileChannel(input);
try {
Serializables.write(routine, inputChannel);
final JavaApp app = new JavaApp(classpath, source);
final var app = new JavaApp(sourceCode);
app.run();
new Thread(new Runnable() { // Wait for completion in separate
// thread so as to not block the caller

@Override
public void run() {
Processes.waitForSuccessfulCompletion(app);
ByteBuffer result = FileSystem.readBytes(output);
T ret = Serializables.read(result, routine.getReturnType());
callback.result(ret);
}

new Thread(() -> {
Processes.waitForSuccessfulCompletion(app);
final var resultBytes = FileSystem.readBytes(outputFilePath);
final var type = routine.getReturnType();
final var result = Serializables.read(resultBytes, type);
callback.result(result);
}).start();
}
finally {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip