add snark standalone context and redirect files

fix snark standalone build
This commit is contained in:
zzz
2016-06-11 17:03:10 +00:00
parent cad7953ef6
commit 2113946ed0
3 changed files with 42 additions and 4 deletions

View File

@ -186,6 +186,8 @@
<!-- make a fat jar for standalone -->
<target name="standalone_jar" depends="war">
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<jar destfile="build/i2psnark-standalone.jar">
<fileset dir="build/obj" includes="**/standalone/*.class" />
<zipfileset src="build/i2psnark.jar" />
@ -209,8 +211,6 @@
<zipfileset src="../../ministreaming/java/build/mstreaming.jar" />
<zipfileset src="../../streaming/java/build/streaming.jar" />
<zipfileset src="../../systray/java/build/systray.jar" />
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<manifest>
<attribute name="Main-Class" value="org.klomp.snark.standalone.RunStandalone"/>
<attribute name="Implementation-Version" value="${full.version}" />
@ -283,9 +283,9 @@
<mkdir dir="./dist" />
<copy file="../launch-i2psnark" todir="./dist/" />
<mkdir dir="./dist/contexts" />
<!-- todo put in root context.xml -->
<copy file="../standalone-context.xml" tofile="./dist/contexts/context.xml" />
<mkdir dir="./dist/docroot" />
<!-- todo put in index.html to redirect -->
<copy file="../standalone-index.html" tofile="./dist/docroot/index.html" />
<mkdir dir="./dist/webapps" />
<copy file="../i2psnark.war" tofile="./dist/webapps/i2psnark.war" />
<copy file="../jetty-i2psnark.xml" tofile="./dist/jetty-i2psnark.xml" />

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<!--
Configure a custom context for the site.
This context contains only a ServletContextHandler with a default servlet
to serve static html files and images.
-->
<Configure class="org.eclipse.jetty.servlet.ServletContextHandler">
<Set name="contextPath">/</Set>
<Set name="resourceBase">./docroot/</Set>
<Call name="setInitParameter">
<Arg>org.eclipse.jetty.servlet.Default.cacheControl</Arg>
<Arg>max-age=3600,public</Arg>
</Call>
<Call name="addServlet">
<Arg>org.eclipse.jetty.servlet.DefaultServlet</Arg>
<Arg>/</Arg>
</Call>
</Configure>

View File

@ -0,0 +1,15 @@
<html>
<head>
<!--
* Remove the following three lines to stop redirecting to the i2psnark page.
* If it continues to redirect, clear your browser's cache.
-->
<meta http-equiv="refresh" content="1;url=/i2psnark/" />
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<title>I2PSnark Standalone</title>
</head>
<body>
Redirecting to <a href="/i2psnark/">i2psnark</a>...
</body>
</html>