Removed eclipse settings.
This commit is contained in:
parent
c23d14522f
commit
2872143028
130 changed files with 175 additions and 982 deletions
|
|
@ -1,2 +0,0 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
||||
|
|
@ -26,8 +26,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||
<id>bin</id>
|
||||
<formats>
|
||||
<!-- Save some build time/space as these are about 30MB each.
|
||||
<format>tar.gz</format>
|
||||
<format>tar.bz2</format>
|
||||
-->
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>true</includeBaseDirectory>
|
||||
|
|
@ -38,9 +40,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<unpack>false</unpack>
|
||||
<scope>runtime</scope>
|
||||
<!--
|
||||
<includes>
|
||||
<include>*</include>
|
||||
</includes>
|
||||
-->
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
<fileSets>
|
||||
|
|
@ -58,5 +62,23 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
<outputDirectory>/</outputDirectory>
|
||||
<fileMode>755</fileMode>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/src/main/files/</directory>
|
||||
<outputDirectory>/auto</outputDirectory>
|
||||
<includes>
|
||||
<include>auto-readme.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/src/main/demo/</directory>
|
||||
<outputDirectory>/demo</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/src/main/files/</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<includes>
|
||||
<include>readme.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
|
||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/main/resources=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding//src/test/resources=UTF-8
|
||||
encoding/<project>=UTF-8
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
|
||||
org.eclipse.jdt.core.compiler.compliance=1.5
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.5
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
|
||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/main/resources=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding//src/test/resources=UTF-8
|
||||
encoding/<project>=UTF-8
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
|
||||
org.eclipse.jdt.core.compiler.compliance=1.5
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.5
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
||||
|
|
@ -10,6 +10,17 @@
|
|||
<name>vasc-demo-tech-ui</name>
|
||||
<description>vasc-demo-tech-ui</description>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.x4o</groupId>
|
||||
<artifactId>x4o-core</artifactId>
|
||||
<version>${x4o-core.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>javax.el</groupId>
|
||||
<artifactId>el-api</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.forwardfire.vasc.demo</groupId>
|
||||
<artifactId>vasc-demo-tech-editor</artifactId>
|
||||
|
|
@ -19,6 +30,7 @@
|
|||
<groupId>net.forwardfire.vasc.demo</groupId>
|
||||
<artifactId>vasc-demo-tech-web</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>war</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.forwardfire.vasc</groupId>
|
||||
|
|
@ -30,6 +42,11 @@
|
|||
<artifactId>vasc-frontend-swing</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.forwardfire.vasc</groupId>
|
||||
<artifactId>vasc-frontend-web-jsf</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.forwardfire.vasc</groupId>
|
||||
<artifactId>vasc-backend-ldap</artifactId>
|
||||
|
|
@ -75,6 +92,60 @@
|
|||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-jdk14</artifactId>
|
||||
<version>1.6.4</version>
|
||||
</dependency>
|
||||
<!-- Tomcat deps -->
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-core</artifactId>
|
||||
<version>7.0.22</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-jasper</artifactId>
|
||||
<version>7.0.22</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat</groupId>
|
||||
<artifactId>tomcat-jasper</artifactId>
|
||||
<version>7.0.22</version>
|
||||
</dependency>
|
||||
<!-- Web tech deps -->
|
||||
<dependency>
|
||||
<groupId>com.sun.facelets</groupId>
|
||||
<artifactId>jsf-facelets</artifactId>
|
||||
<version>1.1.15.B1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>jstl</artifactId>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.faces</groupId>
|
||||
<artifactId>jsf-api</artifactId>
|
||||
<version>1.2_12</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.faces</groupId>
|
||||
<artifactId>jsf-impl</artifactId>
|
||||
<version>1.2_12</version>
|
||||
</dependency>
|
||||
|
||||
<!-- RichFaces libraries -->
|
||||
<dependency>
|
||||
<groupId>org.richfaces.framework</groupId>
|
||||
<artifactId>richfaces-api</artifactId>
|
||||
<version>3.3.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.richfaces.framework</groupId>
|
||||
<artifactId>richfaces-impl</artifactId>
|
||||
<version>3.3.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.richfaces.ui</groupId>
|
||||
<artifactId>richfaces-ui</artifactId>
|
||||
<version>3.3.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -35,16 +35,15 @@ import java.util.logging.LogManager;
|
|||
import java.util.logging.Logger;
|
||||
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
import org.apache.juli.logging.LogFactory;
|
||||
import org.jdesktop.application.Application;
|
||||
import org.jdesktop.application.FrameView;
|
||||
import org.jdesktop.application.SingleFrameApplication;
|
||||
|
||||
import net.forwardfire.vasc.core.VascController;
|
||||
import net.forwardfire.vasc.demo.tech.ui.components.JMainPanel;
|
||||
import net.forwardfire.vasc.demo.tech.ui.components.JMainPanelMenuBar;
|
||||
import net.forwardfire.vasc.demo.tech.web.core.TomcatManager;
|
||||
|
||||
public class TechUI extends SingleFrameApplication {
|
||||
|
||||
|
|
@ -105,6 +104,7 @@ public class TechUI extends SingleFrameApplication {
|
|||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
vascManager.stop();
|
||||
long stopTime = System.currentTimeMillis();
|
||||
logger.info("TechUI stopped in "+(stopTime-startTime)+" ms.");
|
||||
}
|
||||
|
|
@ -134,6 +134,21 @@ public class TechUI extends SingleFrameApplication {
|
|||
vascManager.start();
|
||||
autoLoadVasc();
|
||||
|
||||
tomcatManager = new TomcatManager();
|
||||
tomcatManager.setVascController(vascManager.getVascController());
|
||||
|
||||
Thread t = new Thread(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
Thread.sleep(2000); // let gui come up.
|
||||
tomcatManager.start();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
t.start();
|
||||
|
||||
long stopTime = System.currentTimeMillis();
|
||||
logger.info("TechUI initialized in "+(stopTime-startTime)+" ms.");
|
||||
}
|
||||
|
|
@ -149,21 +164,6 @@ public class TechUI extends SingleFrameApplication {
|
|||
mainView.getFrame().setMinimumSize(new Dimension(1024-64,768-128));
|
||||
show(mainView);
|
||||
|
||||
tomcatManager = new TomcatManager();
|
||||
tomcatManager.setVascController(vascManager.getVascController());
|
||||
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
tomcatManager.start();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
long stopTime = System.currentTimeMillis();
|
||||
logger.info("TechUI startup in "+(stopTime-startTime)+" ms total startup in "+(stopTime-startTime)+" ms.");
|
||||
} catch (Exception e) {
|
||||
|
|
@ -184,4 +184,8 @@ public class TechUI extends SingleFrameApplication {
|
|||
public VascManager getVascManager() {
|
||||
return vascManager;
|
||||
}
|
||||
|
||||
public VascController getVascController() {
|
||||
return vascManager.getVascController();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ public class VascManager {
|
|||
}
|
||||
|
||||
public void start() {
|
||||
logger.finer("Starting vascmanager");
|
||||
try {
|
||||
vascController = DefaultVascFactory.getDefaultVascController(2288L,"forwardfire.net","user","admin");
|
||||
initEditor();
|
||||
|
|
@ -65,11 +66,12 @@ public class VascManager {
|
|||
|
||||
|
||||
public void openFile(File file) {
|
||||
logger.info("Vasc open file: "+file.getAbsoluteFile());
|
||||
try {
|
||||
VascParser parser = new VascParser(vascController);
|
||||
File f = File.createTempFile("test-vasc", ".xml");
|
||||
parser.setDebugOutputStream(new FileOutputStream(f));
|
||||
parser.parseFile(file.getAbsolutePath());
|
||||
parser.parseFile(file);
|
||||
|
||||
DefaultVascFactory.fillVascControllerLocalEntries((VascEntryControllerLocal) vascController.getVascEntryController(), vascController);
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ public class JMainPanel extends JPanel {
|
|||
DefaultMutableTreeNode root = (DefaultMutableTreeNode)vascTree.getModel().getRoot();
|
||||
root.removeAllChildren();
|
||||
|
||||
DefaultMutableTreeNode fieldTypes = new DefaultMutableTreeNode("FieldTypes");
|
||||
DefaultMutableTreeNode fieldTypes = new DefaultMutableTreeNode("VascFieldTypes");
|
||||
for (String id:vascManager.getVascController().getVascEntryFieldTypeController().getVascEntryFieldTypeIds()) {
|
||||
DefaultMutableTreeNode typeNode = new DefaultMutableTreeNode(new VascTreeNode(VascTreeNodeType.FIELD_TYPE,id));
|
||||
fieldTypes.add(typeNode);
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
|
||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
|
@ -5,6 +5,16 @@
|
|||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
|
|
@ -15,9 +25,18 @@
|
|||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/main/resources=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding//src/test/resources=UTF-8
|
||||
encoding/<project>=UTF-8
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
|
||||
org.eclipse.jdt.core.compiler.compliance=1.5
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.5
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
||||
|
|
@ -9,68 +9,40 @@
|
|||
<artifactId>vasc-demo-tech-web</artifactId>
|
||||
<name>vasc-demo-tech-web</name>
|
||||
<description>vasc-demo-tech-web</description>
|
||||
<packaging>war</packaging>
|
||||
<dependencies>
|
||||
<!-- Vasc dep -->
|
||||
<dependency>
|
||||
<groupId>net.forwardfire.vasc</groupId>
|
||||
<artifactId>vasc-frontend-web-jsf</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Tomcat deps -->
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-core</artifactId>
|
||||
<version>7.0.22</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-jasper</artifactId>
|
||||
<version>7.0.22</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat</groupId>
|
||||
<artifactId>tomcat-jasper</artifactId>
|
||||
<version>7.0.22</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Web tech deps -->
|
||||
<dependency>
|
||||
<groupId>com.sun.facelets</groupId>
|
||||
<artifactId>jsf-facelets</artifactId>
|
||||
<version>1.1.15.B1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>jstl</artifactId>
|
||||
<version>1.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.faces</groupId>
|
||||
<artifactId>jsf-api</artifactId>
|
||||
<version>1.2_12</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.faces</groupId>
|
||||
<artifactId>jsf-impl</artifactId>
|
||||
<version>1.2_12</version>
|
||||
</dependency>
|
||||
|
||||
<!-- RichFaces libraries -->
|
||||
<dependency>
|
||||
<groupId>org.richfaces.framework</groupId>
|
||||
<artifactId>richfaces-api</artifactId>
|
||||
<version>3.3.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.richfaces.framework</groupId>
|
||||
<artifactId>richfaces-impl</artifactId>
|
||||
<version>3.3.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.richfaces.ui</groupId>
|
||||
<artifactId>richfaces-ui</artifactId>
|
||||
<version>3.3.3-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ import net.forwardfire.vasc.core.VascController;
|
|||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFrontendEventListener;
|
||||
|
||||
import net.forwardfire.vasc.demo.tech.web.core.TomcatManager;
|
||||
import net.forwardfire.vasc.frontend.VascFrontendData;
|
||||
import net.forwardfire.vasc.frontends.web.jsf.AbstractJSFVascFacesControllerBase;
|
||||
import net.forwardfire.vasc.impl.DefaultVascFactory;
|
||||
|
|
@ -82,7 +81,20 @@ public class VascFacesController extends AbstractJSFVascFacesControllerBase {
|
|||
|
||||
@Override
|
||||
public VascController getVascController() {
|
||||
return TomcatManager.getInstance().getVascController();
|
||||
|
||||
// TODO: rm this by making common tech vasc package ?
|
||||
try {
|
||||
ClassLoader cl = Thread.currentThread().getContextClassLoader();
|
||||
if (cl == null) {
|
||||
cl = this.getClass().getClassLoader(); // fallback
|
||||
}
|
||||
Class<?> clazz = cl.loadClass("net.forwardfire.vasc.demo.tech.ui.TechUI");
|
||||
Object instance = clazz.getMethod("getInstance").invoke(null);
|
||||
Object vasc = clazz.getMethod("getVascController").invoke(instance);
|
||||
return (VascController)vasc;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
package net.forwardfire.vasc.demo.tech.web.core;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import net.forwardfire.vasc.core.VascController;
|
||||
|
||||
import org.apache.catalina.startup.Tomcat;
|
||||
|
||||
public class TomcatManager {
|
||||
|
||||
private Tomcat tomcat = null;
|
||||
private VascController vascController = null;
|
||||
|
||||
public void start() throws Exception {
|
||||
String webappDirLocation = "../vasc-demo-tech-web/src/main/webapp/";
|
||||
Tomcat tomcat = new Tomcat();
|
||||
|
||||
String webPort = System.getenv("PORT");
|
||||
if(webPort == null || webPort.isEmpty()) {
|
||||
webPort = "8899";
|
||||
}
|
||||
tomcat.setPort(Integer.valueOf(webPort));
|
||||
tomcat.addWebapp("/demo", new File(webappDirLocation).getAbsolutePath());
|
||||
System.out.println("configuring app with basedir: " + new File("./" + webappDirLocation).getAbsolutePath());
|
||||
|
||||
instance = this;
|
||||
|
||||
tomcat.start();
|
||||
}
|
||||
|
||||
public void stop() throws Exception {
|
||||
if (tomcat==null) {
|
||||
return;
|
||||
}
|
||||
tomcat.stop();
|
||||
instance = null;
|
||||
}
|
||||
|
||||
static private TomcatManager instance = null;
|
||||
static public TomcatManager getInstance() {
|
||||
return instance; // hackje to rm mvn 1-1 dep with ui
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the vascController
|
||||
*/
|
||||
public VascController getVascController() {
|
||||
return vascController;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param vascController the vascController to set
|
||||
*/
|
||||
public void setVascController(VascController vascController) {
|
||||
this.vascController = vascController;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue