- Don't do 'mtn list changed' if not in a workspace or not needed

This commit is contained in:
zzz
2011-06-08 20:15:53 +00:00
parent d57925e848
commit c5f04ee9c4
17 changed files with 258 additions and 28 deletions

View File

@@ -51,6 +51,8 @@
<!-- unused for now, as we oddly ship addressbook as a .war -->
<target name="jar" depends="compile, changes">
<jar basedir="${build}" destfile="${dist}/${jar}">
<!-- set if unset -->
<property name="workspace.changes" value="" />
<manifest>
<attribute name="Main-Class" value="addressbook.Daemon"/>
<attribute name="Build-Date" value="${build.timestamp}" />
@@ -67,6 +69,8 @@
<copy todir="${dist}/tmp/WEB-INF/classes">
<fileset dir="${build}"/>
</copy>
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<war basedir="${dist}/tmp" webxml="web.xml" destfile="${dist}/${war}">
<manifest>
<attribute name="Build-Date" value="${build.timestamp}" />
@@ -81,9 +85,17 @@
<uptodate property="war.uptodate" targetfile="${dist}/${war}">
<srcfiles dir= "." includes="${build}/**/*.class, web.xml"/>
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="war.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="changes">
<target name="changes" depends="warUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />

View File

@@ -38,7 +38,7 @@
</copy>
</target>
<target name="jar" depends="compile">
<target name="bundle" >
<exec executable="sh" osfamily="unix" failifexecutionfails="true" >
<arg value="./bundle-messages.sh" />
</exec>
@@ -49,6 +49,9 @@
<exec executable="sh" osfamily="windows" failifexecutionfails="false" >
<arg value="./bundle-messages.sh" />
</exec>
</target>
<target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
@@ -60,6 +63,11 @@
<arg value="[:space:]" />
<arg value="," />
</exec>
</target>
<target name="jar" depends="compile, bundle, listChangedFiles" unless="jar.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<jar basedir="${build}" destfile="${dist}/${jar}">
<manifest>
<attribute name="Main-Class" value="net.i2p.desktopgui.Main"/>
@@ -70,6 +78,20 @@
</jar>
</target>
<target name="jarUpToDate">
<uptodate property="jar.uptodate" targetfile="${dist}/${jar}" >
<srcfiles dir= "." includes="build/**/*.class" />
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="javadoc">
<mkdir dir="${build}" />
<mkdir dir="${build}/${javadoc}" />

View File

@@ -36,7 +36,7 @@
</javac>
</target>
<target name="jar" depends="builddep, compile, jarUpToDate" unless="jar.uptodate" >
<target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
@@ -48,6 +48,11 @@
<arg value="[:space:]" />
<arg value="," />
</exec>
</target>
<target name="jar" depends="builddep, compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<jar destfile="./build/i2psnark.jar" basedir="./build/obj" includes="**/*.class" excludes="**/I2PSnarkServlet*.class **/messages_*.class">
<manifest>
<attribute name="Main-Class" value="org.klomp.snark.Snark" />
@@ -63,6 +68,17 @@
<uptodate property="jar.uptodate" targetfile="build/i2psnark.jar" >
<srcfiles dir= "build/obj" includes="**/*.class" excludes="**/I2PSnarkServlet*.class **/messages_*.class" />
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<not>
<isset property="wjar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<!-- Ideally we would include
@@ -72,7 +88,9 @@
- So we must continue to duplicate everything in the war.
<classes dir="./build/obj" includes="**/I2PSnarkServlet*.class" />
-->
<target name="war" depends="jar, bundle, warUpToDate" unless="war.uptodate" >
<target name="war" depends="jar, bundle, warUpToDate, listChangedFiles" unless="war.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<war destfile="../i2psnark.war" webxml="../web.xml" basedir="../" includes="_icons/*" >
<!-- include only the web stuff, as of 0.7.12 the router will add i2psnark.jar to the classpath for the war -->
<classes dir="./build/obj" includes="**/web/*.class" />

View File

@@ -34,10 +34,7 @@
</javac>
</target>
<!-- TODO: Move the web classes from the jar to the war - they are not part of the API
- This will require sponge to rewrite some seedless stuff that uses it.
-->
<target name="jar" depends="builddep, compile, jarUpToDate" unless="jar.uptodate" >
<target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes.j" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
@@ -49,6 +46,15 @@
<arg value="[:space:]" />
<arg value="," />
</exec>
</target>
<!-- TODO: Move the web classes from the jar to the war - they are not part of the API
- This will require sponge to rewrite some seedless stuff that uses it.
-->
<target name="jar" depends="builddep, compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.j.tr" value="" />
<jar destfile="./build/i2ptunnel.jar" basedir="./build/obj" includes="**/*.class">
<manifest>
<attribute name="Main-Class" value="net.i2p.i2ptunnel.I2PTunnel" />
@@ -64,6 +70,14 @@
<uptodate property="jar.uptodate" targetfile="build/i2ptunnel.jar" >
<srcfiles dir= "build/obj" includes="**/*.class" />
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="bundle" depends="compile, precompilejsp">
@@ -97,7 +111,7 @@
</exec>
</target>
<target name="war" depends="precompilejsp, bundle, warUpToDate" unless="war.uptodate" >
<target name="listChangedFiles2" depends="warUpToDate" if="shouldListChanges2" >
<exec executable="mtn" outputproperty="workspace.changes.w" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
@@ -109,6 +123,11 @@
<arg value="[:space:]" />
<arg value="," />
</exec>
</target>
<target name="war" depends="precompilejsp, bundle, warUpToDate, listChangedFiles2" unless="war.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.w.tr" value="" />
<war destfile="build/i2ptunnel.war" webxml="../jsp/web-out.xml"
basedir="../jsp/" excludes="web.xml, web-fragment.xml, web-out.xml, **/*.java, *.jsp">
<manifest>
@@ -123,6 +142,14 @@
<uptodate property="war.uptodate" targetfile="build/i2ptunnel.war" >
<srcfiles dir= "../jsp" excludes="web.xml, web-fragment.xml, **/*.java, *.jsp" />
</uptodate>
<condition property="shouldListChanges2" >
<and>
<not>
<isset property="war.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="precompilejsp" depends="jar" unless="precompilejsp.uptodate">

View File

@@ -98,7 +98,7 @@
</javac>
</target>
<target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate" >
<target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
@@ -110,6 +110,11 @@
<arg value="[:space:]" />
<arg value="," />
</exec>
</target>
<target name="jar" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<jar destfile="./jettylib/org.mortbay.jetty.jar" basedir="./build/obj" includes="**/*.class" update="true" >
<manifest>
<attribute name="Build-Date" value="${build.timestamp}" />
@@ -123,6 +128,14 @@
<uptodate property="jar.uptodate" targetfile="jettylib/org.mortbay.jetty.jar" >
<srcfiles dir= "build/obj" includes="**/*.class" />
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="clean" >

View File

@@ -31,7 +31,7 @@
</javac>
</target>
<target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate" >
<target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
@@ -43,6 +43,11 @@
<arg value="[:space:]" />
<arg value="," />
</exec>
</target>
<target name="jar" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<jar destfile="./build/mstreaming.jar" basedir="./build/obj" includes="**/*.class" >
<manifest>
<attribute name="Build-Date" value="${build.timestamp}" />
@@ -56,6 +61,14 @@
<uptodate property="jar.uptodate" targetfile="build/mstreaming.jar" >
<srcfiles dir= "." includes="build/obj/**/*.class" />
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="javadoc">

View File

@@ -67,7 +67,7 @@
<target name="jar" depends="jar1, war, bundle" />
<!-- the jar without the latest message classes from the jsps -->
<target name="jar1" depends="compile, jarUpToDate" unless="jar.uptodate" >
<target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes.j" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
@@ -80,6 +80,11 @@
<arg value="[:space:]" />
<arg value="," />
</exec>
</target>
<target name="jar1" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.j.tr" value="" />
<jar destfile="./build/routerconsole.jar" basedir="./build/obj" includes="**/*.class">
<manifest>
<!-- top level installer will rename to jrobin.jar -->
@@ -115,6 +120,14 @@
<uptodate property="jar.uptodate" targetfile="build/routerconsole.jar" >
<srcfiles dir= "build/obj" includes="**/*.class" />
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="poupdate" depends="precompilejsp">
@@ -134,8 +147,7 @@
</exec>
</target>
<!-- does NOT update the message classes, as those go in the jar -->
<target name="war" depends="precompilejsp, warUpToDate" unless="war.uptodate" >
<target name="listChangedFiles2" depends="warUpToDate" if="shouldListChanges2" >
<exec executable="mtn" outputproperty="workspace.changes.w" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
@@ -147,6 +159,12 @@
<arg value="[:space:]" />
<arg value="," />
</exec>
</target>
<!-- does NOT update the message classes, as those go in the jar -->
<target name="war" depends="precompilejsp, warUpToDate, listChangedFiles2" unless="war.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.w.tr" value="" />
<!-- Don't include the css in the war, the main build.xml will copy it to docs/themes/console/ -->
<war destfile="build/routerconsole.war" webxml="../jsp/web-out.xml"
basedir="../jsp/" excludes="web.xml, *.css, **/*.java, *.jsp, *.jsi, web-fragment.xml, web-out.xml">
@@ -162,6 +180,14 @@
<uptodate property="war.uptodate" targetfile="build/routerconsole.war" >
<srcfiles dir= "../jsp" excludes="web.xml, web-fragment.xml, *.css, **/*.java, *.jsp, *.jsi" />
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="precompilejsp" depends="jar1" unless="precompilejsp.uptodate">

View File

@@ -45,7 +45,7 @@
</javac>
</target>
<target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate" >
<target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
@@ -57,6 +57,11 @@
<arg value="[:space:]" />
<arg value="," />
</exec>
</target>
<target name="jar" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<jar destfile="./build/sam.jar" basedir="./build/obj" includes="**/*.class">
<manifest>
<attribute name="Main-Class" value="net.i2p.sam.SAMBridge" />
@@ -72,6 +77,14 @@
<uptodate property="jar.uptodate" targetfile="build/sam.jar" >
<srcfiles dir= "build/obj" includes="**/*.class" />
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="jarTest" depends="jar, compileTest">

View File

@@ -44,7 +44,7 @@
</javac>
</target>
<target name="jar" depends="builddep, compile, jarUpToDate" unless="jar.uptodate" >
<target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
@@ -56,6 +56,11 @@
<arg value="[:space:]" />
<arg value="," />
</exec>
</target>
<target name="jar" depends="builddep, compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<jar destfile="./build/streaming.jar" basedir="./build/obj" includes="**/*.class" >
<manifest>
<attribute name="Build-Date" value="${build.timestamp}" />
@@ -69,6 +74,14 @@
<uptodate property="jar.uptodate" targetfile="build/streaming.jar" >
<srcfiles dir= "." includes="build/obj/**/*.class" />
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="jarTest" depends="jar, compileTest">

View File

@@ -67,7 +67,7 @@
<target name="all" depends="war"/>
<target name="war" depends="compile, precompilejsp, bundle, warUpToDate" unless="war.uptodate" >
<target name="listChangedFiles" depends="warUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
@@ -79,6 +79,11 @@
<arg value="[:space:]" />
<arg value="," />
</exec>
</target>
<target name="war" depends="compile, precompilejsp, bundle, warUpToDate" unless="war.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<war destfile="${project}.war" webxml="WEB-INF/web-out.xml">
<fileset dir=".">
<include name="WEB-INF/**/*.class"/>
@@ -102,6 +107,14 @@
<uptodate property="war.uptodate" targetfile="${project}.war">
<srcfiles dir= "." includes="WEB-INF/web-out.xml WEB-INF/**/*.class images/*.png css.css index.html WEB-INF/classes/${project}.properties" />
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="war.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="bundle" depends="compile, precompilejsp">

View File

@@ -22,7 +22,7 @@
</target>
<target name="jar" depends="compile, war" />
<target name="war" depends="compile, bundle, warUpToDate" unless="war.uptodate" >
<target name="listChangedFiles" depends="warUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
@@ -34,6 +34,11 @@
<arg value="[:space:]" />
<arg value="," />
</exec>
</target>
<target name="war" depends="compile, bundle, warUpToDate, listChangedFiles" unless="war.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<war destfile="susimail.war" webxml="src/WEB-INF/web.xml"
basedir="src/" excludes="WEB-INF/web.xml LICENSE src/**/*">
<manifest>
@@ -48,6 +53,14 @@
<uptodate property="war.uptodate" targetfile="susimail.war">
<srcfiles dir= "src" excludes="LICENSE src/**/*" />
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="war.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="bundle" depends="compile">

View File

@@ -23,7 +23,7 @@
</javac>
</target>
<target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate">
<target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
@@ -35,6 +35,11 @@
<arg value="[:space:]" />
<arg value="," />
</exec>
</target>
<target name="jar" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate">
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<jar destfile="./build/systray.jar" basedir="./build/obj" includes="**/*.class">
<manifest>
<attribute name="Main-Class" value="net.i2p.apps.systray.SysTray" />
@@ -50,6 +55,14 @@
<uptodate property="jar.uptodate" targetfile="./build/systray.jar">
<srcfiles dir= "build/obj" includes="**/*.class" />
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="javadoc">