Skip to content

Commit

Permalink
sorted out some issues integrating into tomcat.
Browse files Browse the repository at this point in the history
  • Loading branch information
joshsinger committed Jul 29, 2015
1 parent 3d4ace7 commit d27090f
Show file tree
Hide file tree
Showing 28 changed files with 648 additions and 108 deletions.
5 changes: 5 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
</classpath>
Binary file modified .gradle/2.4/taskArtifacts/cache.properties.lock
Binary file not shown.
Binary file modified .gradle/2.4/taskArtifacts/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/2.4/taskArtifacts/fileSnapshots.bin
Binary file not shown.
Binary file modified .gradle/2.4/taskArtifacts/outputFileStates.bin
Binary file not shown.
Binary file modified .gradle/2.4/taskArtifacts/taskArtifacts.bin
Binary file not shown.
27 changes: 27 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>gluetools</name>
<comment/>
<projects/>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
</natures>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments/>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments/>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments/>
</buildCommand>
</buildSpec>
<linkedResources/>
</projectDescription>
13 changes: 13 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#
#Wed Jul 29 13:36:23 BST 2015
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
4 changes: 4 additions & 0 deletions .settings/org.eclipse.wst.common.component
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="2.0">
<wb-module deploy-name="gluetools"/>
</project-modules>
6 changes: 6 additions & 0 deletions .settings/org.eclipse.wst.common.project.facet.core.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="jst.java"/>
<installed facet="jst.utility" version="1.0"/>
<installed facet="jst.java" version="1.8"/>
</faceted-project>
11 changes: 11 additions & 0 deletions .settings/org.eclipse.wst.validation.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
DELEGATES_PREFERENCE=delegateValidatorList
USER_BUILD_PREFERENCE=enabledBuildValidatorList
USER_MANUAL_PREFERENCE=enabledManualValidatorList
USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.600.v201501211647
eclipse.preferences.version=1
override=true
suspend=false
vals/org.eclipse.angularjs.core.HTMLAngularValidator/global=FF01
vals/org.eclipse.wst.html.core.HTMLValidator/global=FF01
vals/org.eclipse.wst.xml.core.xml/global=FF03
vf.version=3
29 changes: 29 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,36 @@
apply plugin: 'java'
apply plugin: 'eclipse-wtp'

project('gluetools-core') {
apply plugin: 'java'
apply plugin: 'eclipse-wtp'

}

project('gluetools-ws') {
apply plugin: 'java'
apply plugin: 'eclipse-wtp'

}

subprojects {
dependencies {
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.4.1'
compile group: 'org.apache.cayenne', name: 'cayenne-server', version:'3.1'
compile group: 'org.apache.cayenne', name: 'cayenne-project', version:'3.1'
compile group: 'org.biojava', name: 'biojava-core', version: '4.0.0'
compile group: 'org.apache.commons', name: 'commons-io', version: '1.3.2'
compile group: 'org.freemarker', name: 'freemarker', version: '2.3.20'
compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.35'
compile group: 'org.apache.derby', name: 'derby', version: '10.5.3.0_1'
compile group: 'jline', name: 'jline', version: '2.12.1'
compile group: 'com.brsanthu', name: 'data-exporter', version: '1.0.4'
// compile group: 'dnl.utils', name: 'j-text-utils', version: '0.3.3'
compile group: 'com.offbytwo', name:'docopt', version:'0.6.0.20150202'
compile group: 'javax.json', name:'javax.json-api', version:'1.0'
compile group: 'org.glassfish', name:'javax.json', version:'1.0.4'

testCompile group: 'junit', name: 'junit', version: '4.+'
}
}
6 changes: 6 additions & 0 deletions derby.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
----------------------------------------------------------------
2015-07-29 12:39:32.729 GMT:
Booting Derby version The Apache Software Foundation - Apache Derby - 10.5.3.0 - (802917): instance a816c00e-014e-d9d3-2e25-00000d2d4400
on database directory memory:/Users/joshsinger/gitrepos/gluetools/testdb

Database Class Loader started - derby.database.classpath=''
192 changes: 160 additions & 32 deletions gluetools-core/.classpath

Large diffs are not rendered by default.

20 changes: 1 addition & 19 deletions gluetools-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'eclipse-wtp'

sourceCompatibility = 1.8
version = '1.0'
Expand Down Expand Up @@ -62,25 +62,7 @@ task datamodel(dependsOn: 'checkCayenneTools') << {
}

dependencies {
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.4.1'
compile group: 'org.apache.cayenne', name: 'cayenne-server', version:'3.1'
compile group: 'org.apache.cayenne', name: 'cayenne-project', version:'3.1'
compile group: 'org.biojava', name: 'biojava-core', version: '4.0.0'
compile group: 'org.apache.commons', name: 'commons-io', version: '1.3.2'
compile group: 'org.freemarker', name: 'freemarker', version: '2.3.20'
compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.35'
compile group: 'org.apache.derby', name: 'derby', version: '10.5.3.0_1'
compile group: 'jline', name: 'jline', version: '2.12.1'
compile group: 'com.brsanthu', name: 'data-exporter', version: '1.0.4'
// compile group: 'dnl.utils', name: 'j-text-utils', version: '0.3.3'
compile group: 'com.offbytwo', name:'docopt', version:'0.6.0.20150202'
compile group: 'javax.json', name:'javax.json-api', version:'1.0'
compile group: 'org.glassfish', name:'javax.json', version:'1.0.4'
compile group: 'javax.ws.rs', name: 'javax.ws.rs-api', version: '2.0.1'


testCompile group: 'junit', name: 'junit', version: '4.+'
cgen group: 'org.apache.cayenne', name: 'cayenne-tools', version: '3.1'
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package uk.ac.gla.cvr.gluetools.core;

import java.io.File;
import java.net.URL;
import java.util.logging.Logger;

import org.apache.cayenne.ObjectContext;
Expand All @@ -23,7 +22,6 @@
import uk.ac.gla.cvr.gluetools.core.plugins.Plugin;
import uk.ac.gla.cvr.gluetools.core.plugins.PluginConfigContext;
import uk.ac.gla.cvr.gluetools.core.plugins.PluginUtils;
import uk.ac.gla.cvr.gluetools.core.resource.GlueURLStreamHandlerFactory;
import uk.ac.gla.cvr.gluetools.utils.XmlUtils;
import freemarker.template.Configuration;

Expand Down Expand Up @@ -58,7 +56,6 @@ public static synchronized GluetoolsEngine getInstance() {

private GluetoolsEngine(String configFilePath) {
freemarkerConfiguration = new Configuration();
URL.setURLStreamHandlerFactory(new GlueURLStreamHandlerFactory());
Document configDocument = null;
if(configFilePath != null) {
try {
Expand Down Expand Up @@ -132,5 +129,17 @@ public String getDbSchemaVersion() {
return dbSchemaVersion;
}


public synchronized static void shutdown() {
if(instance != null) {
instance.dispose();
instance = null;
}
}

private void dispose() {
rootServerRuntime.shutdown();
}



}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void setParentCommandMode(CommandMode parentCommandMode) {
this.parentCommandMode = parentCommandMode;
}

void exit() {
public void exit() {
if(serverRuntime != null) {
serverRuntime.shutdown();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package uk.ac.gla.cvr.gluetools.core.command.root;

import javax.ws.rs.Path;

import org.apache.cayenne.configuration.server.ServerRuntime;

import uk.ac.gla.cvr.gluetools.core.command.CommandFactory;
Expand All @@ -11,5 +13,5 @@ public RootCommandMode(ServerRuntime serverRuntime) {
super("GLUE", CommandFactory.get(RootCommandFactory.creator));
setServerRuntime(serverRuntime);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ private void shutdown() {
while(!(commandContext.peekCommandMode() instanceof RootCommandMode)) {
commandContext.popCommandMode();
}
commandContext.popCommandMode();
GluetoolsEngine.shutdown();
}

private void runBatchFile(Object fileString) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public GlueResource(String fileName) {
@Override
public URL getURL() {
try {
return new URL("glue", "host", "/"+fileName);
return new URL("glue", "host", 9999, "/"+fileName, new GlueURLStreamHandler());
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
Expand Down

This file was deleted.

Loading

0 comments on commit d27090f

Please sign in to comment.