I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit c96965d3 authored by jrandom's avatar jrandom Committed by zzz
Browse files

2005-12-03 jrandom

    * Package up a standalone Syndie install into a "syndie-standalone.zip",
      buildable with "ant syndie".  It extracts into ./syndie/, launches with
      "java -jar launchsyndie.jar" (or javaw, on windows, to avoid a dos box),
      running a single user Syndie instance (by default).  It also creates a
      default subscription to syndiemedia without any anonymity (using no
      proxy).  Upgrades can be done by just replacing the syndie.war with the
      one from I2P.
parent 12900ca7
No related branches found
No related tags found
No related merge requests found
To run Syndie, fire it up with "java -jar launch-syndie.jar" (or, on windows,
to run without the dos box, "javaw -jar launch-syndie.jar"). For further
information, swing to http://localhost:8001/
\ No newline at end of file
......@@ -11,7 +11,7 @@
<mkdir dir="./build" />
<mkdir dir="./build/obj" />
<javac
srcdir="./src"
srcdir="./src"
debug="true" deprecation="on" source="1.3" target="1.3"
destdir="./build/obj"
classpath="../../../core/java/build/i2p.jar:../../jetty/jettylib/org.mortbay.jetty.jar:../../jetty/jettylib/javax.servlet.jar:../../jdom/jdom.jar:../../rome/rome-0.7.jar" />
......@@ -43,6 +43,55 @@
</war>
<delete dir="./tmpwar" />
</target>
<target name="standalone" depends="standalone_prep">
<zip destfile="syndie-standalone.zip">
<zipfileset dir="./dist/" prefix="syndie/" />
</zip>
</target>
<target name="standalone_prep" depends="war">
<javac debug="true" deprecation="on" source="1.3" target="1.3"
destdir="./build" srcdir="src/" includes="net/i2p/syndie/web/RunStandalone.java" >
<classpath>
<pathelement location="../../jetty/jettylib/commons-logging.jar" />
<pathelement location="../../jetty/jettylib/commons-el.jar" />
<pathelement location="../../jetty/jettylib/org.mortbay.jetty.jar" />
<pathelement location="../../jetty/jettylib/javax.servlet.jar" />
<pathelement location="../../../core/java/build/i2p.jar" />
</classpath>
</javac>
<jar destfile="./build/launch-syndie.jar" basedir="./build/" includes="net/i2p/syndie/web/RunStandalone.class">
<manifest>
<attribute name="Main-Class" value="net.i2p.syndie.web.RunStandalone" />
<attribute name="Class-Path" value="lib/i2p.jar lib/commons-el.jar lib/commons-logging.jar lib/jasper-compiler.jar lib/jasper-runtime.jar lib/javax.servlet.jar lib/org.mortbay.jetty.jar" />
</manifest>
</jar>
<delete dir="./dist" />
<mkdir dir="./dist" />
<copy file="./build/launch-syndie.jar" tofile="./dist/launch-syndie.jar" />
<copy file="../syndie.war" tofile="./dist/syndie.war" />
<mkdir dir="./dist/lib" />
<copy file="../../../core/java/build/i2p.jar" tofile="./dist/lib/i2p.jar" />
<copy file="../../jetty/jettylib/commons-el.jar" tofile="./dist/lib/commons-el.jar" />
<copy file="../../jetty/jettylib/commons-logging.jar" tofile="./dist/lib/commons-logging.jar" />
<copy file="../../jetty/jettylib/javax.servlet.jar" tofile="./dist/lib/javax.servlet.jar" />
<copy file="../../jetty/jettylib/org.mortbay.jetty.jar" tofile="./dist/lib/org.mortbay.jetty.jar" />
<copy file="../../jetty/jettylib/jasper-compiler.jar" tofile="./dist/lib/jasper-compiler.jar" />
<copy file="../../jetty/jettylib/jasper-runtime.jar" tofile="./dist/lib/jasper-runtime.jar" />
<copy file="../jetty-syndie.xml" tofile="./dist/jetty-syndie.xml" />
<copy file="../doc/readme-standalone.txt" tofile="./dist/readme.txt" />
<mkdir dir="./dist/work" />
<mkdir dir="./dist/logs" />
<mkdir dir="./dist/archive" />
<copy file="../../../installer/resources/blogMeta.snm" tofile="dist/archive/ovpBy2mpO1CQ7deYhQ1cDGAwI6pQzLbWOm1Sdd0W06c=/meta.snm" />
<copy file="../../../installer/resources/blogPost.snd" tofile="dist/archive/ovpBy2mpO1CQ7deYhQ1cDGAwI6pQzLbWOm1Sdd0W06c=/1132012800001.snd" />
<zip destfile="syndie-standalone.zip">
<zipfileset dir="./dist/" prefix="syndie/" />
</zip>
</target>
<target name="precompilejsp">
<delete dir="../jsp/WEB-INF/" />
<delete file="../jsp/web-fragment.xml" />
......@@ -107,6 +156,8 @@
</target>
<target name="clean">
<delete dir="./build" />
<delete dir="./dist" />
<delete file="./syndie-standalone.zip" />
</target>
<target name="cleandep" depends="clean">
<ant dir="../../../core/java/" target="distclean" />
......
......@@ -524,9 +524,22 @@ public class BlogManager {
String ok = register(user, getDefaultLogin(), getDefaultPass(), "", "default", "Default Syndie blog", "");
if (User.LOGIN_OK.equals(ok)) {
_log.info("Default user created: " + user);
for (int i = 0; i < DEFAULT_SINGLE_USER_ARCHIVES.length; i++)
user.getPetNameDB().add(new PetName("DefaultArchive" + i, "syndie", "syndiearchive", DEFAULT_SINGLE_USER_ARCHIVES[i]));
scheduleSyndication(DEFAULT_SINGLE_USER_ARCHIVES);
String altArchives = _context.getProperty("syndie.defaultSingleUserArchives");
String archives[] = DEFAULT_SINGLE_USER_ARCHIVES;
if ( (altArchives != null) && (altArchives.trim().length() > 0) ) {
ArrayList list = new ArrayList();
StringTokenizer tok = new StringTokenizer(altArchives, ",\t ");
while (tok.hasMoreTokens())
list.add(tok.nextToken());
if (list.size() > 0) {
archives = new String[list.size()];
for (int i = 0; i < list.size(); i++)
archives[i] = (String)list.get(i);
}
}
for (int i = 0; i < archives.length; i++)
user.getPetNameDB().add(new PetName("DefaultArchive" + i, "syndie", "syndiearchive", archives[i]));
scheduleSyndication(archives);
saveUser(user);
return;
} else {
......
package net.i2p.syndie.web;
import java.io.File;
import net.i2p.util.FileUtil;
import org.mortbay.jetty.Server;
public class RunStandalone {
private Server _server;
static {
System.setProperty("org.mortbay.http.Version.paranoid", "true");
System.setProperty("syndie.rootDir", ".");
System.setProperty("syndie.defaultSingleUserArchives", "http://syndiemedia.i2p.net:8000/archive/archive.txt");
System.setProperty("syndie.defaultProxyHost", "");
System.setProperty("syndie.defaultProxyPort", "");
}
private RunStandalone(String args[]) {}
public static void main(String args[]) {
RunStandalone runner = new RunStandalone(args);
runner.start();
}
public void start() {
File workDir = new File("work");
boolean workDirRemoved = FileUtil.rmdir(workDir, false);
if (!workDirRemoved)
System.err.println("ERROR: Unable to remove Jetty temporary work directory");
boolean workDirCreated = workDir.mkdirs();
if (!workDirCreated)
System.err.println("ERROR: Unable to create Jetty temporary work directory");
try {
_server = new Server("jetty-syndie.xml");
_server.start();
} catch (Exception e) {
e.printStackTrace();
}
}
public void stop() {
try {
_server.stop();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
}
}
......@@ -257,7 +257,7 @@ public class ViewThreadedServlet extends BaseServlet {
HeaderReceiver rec = new HeaderReceiver();
parser.parse(entry.getEntry().getText(), rec);
String subject = rec.getHeader(HTMLRenderer.HEADER_SUBJECT);
if (subject == null)
if ( (subject == null) || (subject.trim().length() <= 0) )
subject = "(no subject)";
out.write(trim(subject, 40));
//out.write("</a>\n</td><td class=\"threadRight\">\n");
......
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure 1.2//EN" "http://jetty.mortbay.org/configure_1_2.dtd">
<!-- =============================================================== -->
<!-- Configure the Jetty Server -->
<!-- =============================================================== -->
<Configure class="org.mortbay.jetty.Server">
<!-- =============================================================== -->
<!-- Configure the Request Listeners -->
<!-- =============================================================== -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Add and configure a HTTP listener to port 8080 -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<Call name="addListener">
<Arg>
<New class="org.mortbay.http.SocketListener">
<Arg>
<New class="org.mortbay.util.InetAddrPort">
<Set name="host">0.0.0.0</Set>
<Set name="port">8001</Set>
</New>
</Arg>
<Set name="MinThreads">3</Set>
<Set name="MaxThreads">10</Set>
<Set name="MaxIdleTimeMs">30000</Set>
<Set name="LowResourcePersistTimeMs">1000</Set>
<Set name="ConfidentialPort">8443</Set>
<Set name="IntegralPort">8443</Set>
<Set name="PoolName">main</Set>
</New>
</Arg>
</Call>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Add a HTTPS SSL listener on port 8443 -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- UNCOMMENT TO ACTIVATE
<Call name="addListener">
<Arg>
<New class="org.mortbay.http.SunJsseListener">
<Set name="Port">8443</Set>
<Set name="PoolName">main</Set>
<Set name="Keystore"><SystemProperty name="jetty.home" default="."/>/etc/demokeystore</Set>
<Set name="Password">OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4</Set>
<Set name="KeyPassword">OBF:1u2u1wml1z7s1z7a1wnl1u2g</Set>
<Set name="NonPersistentUserAgent">MSIE 5</Set>
</New>
</Arg>
</Call>
-->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Add a AJP13 listener on port 8009 -->
<!-- This protocol can be used with mod_jk in apache, IIS etc. -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--
<Call name="addListener">
<Arg>
<New class="org.mortbay.http.ajp.AJP13Listener">
<Set name="PoolName">ajp</Set>
<Set name="Port">8009</Set>
<Set name="MinThreads">3</Set>
<Set name="MaxThreads">20</Set>
<Set name="MaxIdleTimeMs">0</Set>
<Set name="confidentialPort">443</Set>
</New>
</Arg>
</Call>
-->
<!-- =============================================================== -->
<!-- Configure the Contexts -->
<!-- =============================================================== -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Add a all web application within the webapps directory. -->
<!-- + No virtual host specified -->
<!-- + Look in the webapps directory relative to jetty.home or . -->
<!-- + Use the default webdefault.xml in jetty's install -->
<!-- + Upack the war file -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<Set name="rootWebApp">syndie</Set>
<Call name="addWebApplication">
<Arg>/</Arg>
<Arg>syndie.war</Arg>
</Call>
<!-- =============================================================== -->
<!-- Configure the Request Log -->
<!-- =============================================================== -->
<Set name="RequestLog">
<New class="org.mortbay.http.NCSARequestLog">
<Arg>./logs/yyyy_mm_dd.syndie-request.log</Arg>
<Set name="retainDays">90</Set>
<Set name="append">true</Set>
<Set name="extended">false</Set>
<Set name="buffered">false</Set>
<Set name="LogTimeZone">GMT</Set>
</New>
</Set>
<!-- =============================================================== -->
<!-- Configure the Other Server Options -->
<!-- =============================================================== -->
<Set name="requestsPerGC">2000</Set>
<Set name="statsOn">false</Set>
</Configure>
......@@ -8,6 +8,7 @@
<echo message=" tarball: tar the full install into i2p.tar.bz2 (extracts to build a new clean install)" />
<echo message=" updater: tar the built i2p specific files into an i2pupdate.zip (extracts safely over existing installs)" />
<echo message=" distclean: clean up all derived files" />
<echo message=" syndie: generate a standalone syndie install" />
<echo message=" javadoc: generate javadoc for the entire project into ./build/javadoc" />
</target>
<target name="dist" depends="pkg, javadoc">
......@@ -149,7 +150,8 @@
<target name="clean" depends="pkgclean" >
<delete dir="./build" />
<delete file="i2pinstall.exe" failonerror="false" quiet="true" />
<delete file="i2p.exe" failonerror="false" quiet="true" />
<delete file="i2p.exe" failonerror="false" quiet="true" />
<delete file="syndie-standalone.zip" failonerror="false" quiet="true" />
</target>
<target name="distclean" depends="clean">
<ant dir="core/java/" target="distclean" />
......@@ -438,4 +440,8 @@
<ant dir="core/java/" target="fullclovertest" />
<ant dir="router/java/" target="fullclovertest" />
</target>
<target name="syndie" >
<ant dir="apps/syndie/java/" target="standalone" />
<copy file="apps/syndie/java/syndie-standalone.zip" todir="." />
</target>
</project>
$Id: history.txt,v 1.340 2005/11/30 20:13:45 jrandom Exp $
$Id: history.txt,v 1.341 2005/12/01 12:16:53 jrandom Exp $
2005-12-03 jrandom
* Package up a standalone Syndie install into a "syndie-standalone.zip",
buildable with "ant syndie". It extracts into ./syndie/, launches with
"java -jar launchsyndie.jar" (or javaw, on windows, to avoid a dos box),
running a single user Syndie instance (by default). It also creates a
default subscription to syndiemedia without any anonymity (using no
proxy). Upgrades can be done by just replacing the syndie.war with the
one from I2P.
* 2005-12-01 0.6.1.7 released
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment