forked from I2P_Developers/i2p.i2p
* Add in per-blog RSS feeds to Syndie
* Upgraded sucker's ROME dependency to 0.8, bundling sucked enclosures
with the posts, marking additional attachments as Media RSS enclosures
(http://search.yahoo.com/mrss/), since RSS only supports one enclosure
per item.
* Don't allow the default syndie user to be set to something invalid if
its in single user mode.
173 lines
8.9 KiB
XML
173 lines
8.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project basedir="." default="all" name="syndie">
|
|
<target name="all" depends="clean, build" />
|
|
<target name="build" depends="builddep, jar" />
|
|
<target name="builddep">
|
|
<ant dir="../../jetty/" target="build" />
|
|
<ant dir="../../../core/java/" target="build" />
|
|
<!-- ministreaming will build core -->
|
|
</target>
|
|
<target name="compile">
|
|
<mkdir dir="./build" />
|
|
<delete dir="./build/obj" />
|
|
<mkdir dir="./build/obj" />
|
|
<javac
|
|
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.8.jar" />
|
|
</target>
|
|
<target name="jar" depends="builddep, compile">
|
|
<jar destfile="./build/syndie.jar" basedir="./build/obj" includes="**/*.class">
|
|
<manifest>
|
|
<attribute name="Main-Class" value="net.i2p.syndie.CLIPost" />
|
|
<attribute name="Class-Path" value="i2p.jar" />
|
|
</manifest>
|
|
</jar>
|
|
<jar destfile="./build/sucker.jar" basedir="./build/obj" includes="net/i2p/syndie/Sucker.class, net/i2p/syndie/SuckerFetchListener.class">
|
|
<manifest>
|
|
<attribute name="Main-Class" value="net.i2p.syndie.Sucker" />
|
|
<attribute name="Class-Path" value="i2p.jar jdom.jar rome-0.8.jar" />
|
|
</manifest>
|
|
</jar>
|
|
<ant target="war" />
|
|
</target>
|
|
<target name="war" depends="builddep, compile, precompilejsp">
|
|
<delete file="../syndie.war" />
|
|
<delete dir="./tmpwar" />
|
|
<mkdir dir="./tmpwar" />
|
|
<copy file="../../jdom/jdom.jar" tofile="./tmpwar/jdom.jar" />
|
|
<copy file="../../rome/rome-0.8.jar" tofile="./tmpwar/rome-0.8.jar" />
|
|
|
|
<war destfile="../syndie.war" webxml="../jsp/web-out.xml">
|
|
<fileset dir="../jsp/" includes="**/*" excludes=".nbintdb, web.xml, web-out.xml, web-fragment.xml, **/*.java, **/*.jsp" />
|
|
<classes dir="./build/obj" />
|
|
<lib dir="./tmpwar" />
|
|
</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" />
|
|
<delete file="../jsp/web-out.xml" />
|
|
<mkdir dir="../jsp/WEB-INF/" />
|
|
<mkdir dir="../jsp/WEB-INF/classes" />
|
|
<!-- there are various jspc ant tasks, but they all seem a bit flakey -->
|
|
<java classname="org.apache.jasper.JspC" fork="true" >
|
|
<classpath>
|
|
<pathelement location="../../jetty/jettylib/jasper-compiler.jar" />
|
|
<pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
|
|
<pathelement location="../../jetty/jettylib/javax.servlet.jar" />
|
|
<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="../../jetty/jettylib/ant.jar" />
|
|
<pathelement location="../../jdom/jdom.jar" />
|
|
<pathelement location="../../rome/rome-0.8.jar" />
|
|
<pathelement location="build/obj" />
|
|
<pathelement location="../../../core/java/build/i2p.jar" />
|
|
</classpath>
|
|
<arg value="-d" />
|
|
<arg value="../jsp/WEB-INF/classes" />
|
|
<arg value="-p" />
|
|
<arg value="net.i2p.syndie.jsp" />
|
|
<arg value="-webinc" />
|
|
<arg value="../jsp/web-fragment.xml" />
|
|
<arg value="-webapp" />
|
|
<arg value="../jsp/" />
|
|
</java>
|
|
<javac debug="true" deprecation="on" source="1.3" target="1.3"
|
|
destdir="../jsp/WEB-INF/classes/" srcdir="../jsp/WEB-INF/classes" includes="**/*.java" >
|
|
<classpath>
|
|
<pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
|
|
<pathelement location="../../jetty/jettylib/javax.servlet.jar" />
|
|
<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="../../jdom/jdom.jar" />
|
|
<pathelement location="../../rome/rome-0.8.jar" />
|
|
<pathelement location="build/obj" />
|
|
<pathelement location="../../../core/java/build/i2p.jar" />
|
|
</classpath>
|
|
</javac>
|
|
<copy file="../jsp/web.xml" tofile="../jsp/web-out.xml" />
|
|
<loadfile property="jspc.web.fragment" srcfile="../jsp/web-fragment.xml" />
|
|
<replace file="../jsp/web-out.xml">
|
|
<replacefilter token="<!-- precompiled servlets -->" value="${jspc.web.fragment}" />
|
|
</replace>
|
|
</target>
|
|
<target name="javadoc">
|
|
<mkdir dir="./build" />
|
|
<mkdir dir="./build/javadoc" />
|
|
<javadoc
|
|
sourcepath="./src:../../../core/java/src" destdir="./build/javadoc"
|
|
packagenames="*"
|
|
use="true"
|
|
splitindex="true"
|
|
windowtitle="syndie" />
|
|
</target>
|
|
<target name="clean">
|
|
<delete dir="./build" />
|
|
<delete dir="./dist" />
|
|
<delete dir="../jsp/WEB-INF/classes" />
|
|
<delete file="./syndie-standalone.zip" />
|
|
</target>
|
|
<target name="cleandep" depends="clean">
|
|
<ant dir="../../../core/java/" target="distclean" />
|
|
</target>
|
|
<target name="distclean" depends="clean">
|
|
<ant dir="../../../core/java/" target="distclean" />
|
|
</target>
|
|
</project>
|