summaryrefslogtreecommitdiff
path: root/BKULocalApp
diff options
context:
space:
mode:
Diffstat (limited to 'BKULocalApp')
-rw-r--r--BKULocalApp/pom.xml93
-rw-r--r--BKULocalApp/src/main/java/at/gv/egiz/bku/local/app/BKULauncher.java15
-rw-r--r--BKULocalApp/src/main/java/at/gv/egiz/bku/local/app/Container.java23
-rw-r--r--BKULocalApp/src/main/resources/splash.pngbin0 -> 54978 bytes
4 files changed, 34 insertions, 97 deletions
diff --git a/BKULocalApp/pom.xml b/BKULocalApp/pom.xml
index e2d17d7c..9ad6f50b 100644
--- a/BKULocalApp/pom.xml
+++ b/BKULocalApp/pom.xml
@@ -28,76 +28,41 @@
</plugins>
</pluginManagement>
<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <mainClass>at.gv.egiz.bku.local.app.BKULauncher</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
<plugin>
- <artifactId>maven-dependency-plugin
- </artifactId>
- <executions>
- <execution>
- <id>copywar</id>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>at.gv.egiz</groupId>
- <artifactId>BKULocal</artifactId>
- <version>1.0-SNAPSHOT</version>
- <type>war</type>
- </artifactItem>
- </artifactItems>
- <outputDirectory>
- ${project.build.directory}/classes
- </outputDirectory>
- </configuration>
- </execution>
- <execution>
- <id>unpack-dependencies</id>
- <goals>
- <goal>unpack-dependencies</goal>
- </goals>
- <configuration>
- <excludes>javax/xml/crypto/**, demo/**,
- junit/**, w3/**, org/etsi/**, META-INF/**</excludes>
- <outputDirectory>${project.build.directory}/classes</outputDirectory>
- <overWriteReleases>true</overWriteReleases>
- <overWriteSnapshots>true</overWriteSnapshots>
- </configuration>
- </execution>
-
- </executions>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
+ </plugins>
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>sign</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <archive>
- <addMavenDescriptor>false</addMavenDescriptor>
- <index>false</index>
- <manifest>
- <addClasspath>false</addClasspath>
- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
- </manifest>
- </archive>
- <alias>test-applet signer</alias>
- <keystore>./keystore.ks</keystore>
- <storepass>storepass</storepass>
- <keypass>keypass</keypass>
- <verify>true</verify>
- </configuration>
- </plugin>
- </plugins>
</build>
<dependencies>
-
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
diff --git a/BKULocalApp/src/main/java/at/gv/egiz/bku/local/app/BKULauncher.java b/BKULocalApp/src/main/java/at/gv/egiz/bku/local/app/BKULauncher.java
index 091843e1..9a953f9e 100644
--- a/BKULocalApp/src/main/java/at/gv/egiz/bku/local/app/BKULauncher.java
+++ b/BKULocalApp/src/main/java/at/gv/egiz/bku/local/app/BKULauncher.java
@@ -168,20 +168,6 @@ public class BKULauncher implements BKUControllerInterface {
}
}
- public void jwsHack() {
- InputStream is = getClass().getClassLoader().getResourceAsStream(
- "BKULocal-1.0-SNAPSHOT.war");
- File f = new File(System.getProperty("user.home") + "/.mocca/war");
- f.mkdirs();
- try {
- OutputStream os = new FileOutputStream(new File(f, "mocca.war"));
- StreamUtil.copyStream(is, os);
- os.close();
- } catch (Exception e) {
- log.error(e);
- }
- }
-
/**
* @param args
*/
@@ -189,7 +175,6 @@ public class BKULauncher implements BKUControllerInterface {
try {
BKULauncher launcher = new BKULauncher();
- //launcher.jwsHack();
launcher.checkConfig(args);
launcher.startUpServer();
launcher.initTrayIcon();
diff --git a/BKULocalApp/src/main/java/at/gv/egiz/bku/local/app/Container.java b/BKULocalApp/src/main/java/at/gv/egiz/bku/local/app/Container.java
index 690639f4..a8a6431a 100644
--- a/BKULocalApp/src/main/java/at/gv/egiz/bku/local/app/Container.java
+++ b/BKULocalApp/src/main/java/at/gv/egiz/bku/local/app/Container.java
@@ -2,6 +2,8 @@ package at.gv.egiz.bku.local.app;
import java.io.File;
import java.io.IOException;
+import java.net.URL;
+import java.net.URLClassLoader;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -12,7 +14,6 @@ import org.mortbay.jetty.handler.DefaultHandler;
import org.mortbay.jetty.handler.HandlerCollection;
import org.mortbay.jetty.nio.SelectChannelConnector;
import org.mortbay.jetty.security.SslSocketConnector;
-import org.mortbay.jetty.webapp.WebAppClassLoader;
import org.mortbay.jetty.webapp.WebAppContext;
import org.mortbay.thread.QueuedThreadPool;
@@ -26,8 +27,6 @@ public class Container {
}
public void init() {
- Thread.currentThread().setContextClassLoader(ClassLoader.getSystemClassLoader());
- log.debug("-----------------> "+ClassLoader.getSystemClassLoader());
server = new Server();
QueuedThreadPool qtp = new QueuedThreadPool();
qtp.setMaxThreads(5);
@@ -56,21 +55,9 @@ public class Container {
WebAppContext webappcontext = new WebAppContext();
webappcontext.setContextPath("/");
webappcontext.setExtractWAR(false);
-
- File tmpDir = new File(System.getProperty("user.home") + "/.mocca/tmp");
- // tmpDir.mkdirs();
- // webappcontext.setTempDirectory(tmpDir);
- try {
- File f = new File(System.getProperty("user.home")
- + "/.mocca/war/mocca.war");
- log.debug("Deploying war: " + f.getCanonicalPath());
- if (!f.exists()) {
- log.error("WAR file does not exist, cannot run MOCCA");
- }
- webappcontext.setWar(f.getParent());
- } catch (IOException e) {
- log.error(e);
- }
+ System.out.println(getClass().getClassLoader().getResource("log4j.properties"));
+ webappcontext.setWar("BKULocal-1.0-SNAPSHOT.war");
+
handlers.setHandlers(new Handler[] { webappcontext, new DefaultHandler() });
server.setHandler(handlers);
diff --git a/BKULocalApp/src/main/resources/splash.png b/BKULocalApp/src/main/resources/splash.png
new file mode 100644
index 00000000..72c1d868
--- /dev/null
+++ b/BKULocalApp/src/main/resources/splash.png
Binary files differ