r71906 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71905‎ | r71906 | r71907 >
Date:21:57, 29 August 2010
Author:saper
Status:deferred
Tags:
Comment:
Update ant build infrastructure

- use private.properties for keystore parameters
- svn:ignore default keystore location
- kill leftovers of mwapi.jar and friends
- use <patternsets> to list jarfiles
Modified paths:
  • /trunk/tools/commonist-java (modified) (history)
  • /trunk/tools/commonist-java/build.properties (modified) (history)
  • /trunk/tools/commonist-java/build.xml (modified) (history)
  • /trunk/tools/commonist-java/etc (modified) (history)
  • /trunk/tools/commonist-java/etc/commonist.jnlp (modified) (history)

Diff [purge]

Index: trunk/tools/commonist-java/build.properties
@@ -44,13 +44,14 @@
4545 ws.icon=commonist-32.png
4646 ws.splash=commonist-128.png
4747
 48+# Set below in private.properties file
4849 # dname
49 -sign.dname=CN=Snake Oil, OU=Hacking Unit, O=FNORD! Inc., L=Bielefeld, ST=33641, C=DE
 50+#sign.dname=CN=...
5051
5152 # keystore
5253 sign.keystore=etc/keyStore
53 -sign.keypass=0xDEADBEEF
 54+#sign.keypass=*somepassword*
5455
5556 # signing key
56 -sign.alias=signFiles
57 -sign.storepass=0xDEADBEEF
 57+#sign.alias=keystorealias
 58+#sign.storepass=*somepassword*
Index: trunk/tools/commonist-java/etc/commonist.jnlp
@@ -17,9 +17,6 @@
1818 <j2se version="1.5+" max-heap-size="192m"/>
1919 <jar href="commonist.jar" main="true"/>
2020 <jar href="bsh-2.0b2-fixed.jar"/>
21 - <jar href="lib-util.jar"/>
22 - <jar href="minibpp.jar"/>
23 - <jar href="mwapi.jar"/>
2421 <jar href="commons-logging-1.1.jar"/>
2522 <jar href="commons-codec-1.3.jar"/>
2623 <jar href="commons-httpclient-3.1.jar"/>
Property changes on: trunk/tools/commonist-java/etc
___________________________________________________________________
Added: svn:ignore
2724 + keyStore
Index: trunk/tools/commonist-java/build.xml
@@ -6,10 +6,28 @@
77 <property environment="env"/>
88 <property file="${user.home}/.build.properties"/> <!-- these override the project local version -->
99 <property file="build.properties"/>
 10+ <property file="private.properties" /> <!-- optional private properies like keystore password for signing -->
1011
1112 <!-- project specifics -->
12 - <property name="source.jars" value="lib-util-src.jar,mwapi-src.jar,minibpp-src.jar"/>
13 - <property name="binary.jars" value="lib-util.jar,mwapi.jar,minibpp.jar,bsh-2.0b2-fixed.jar,jericho-html-3.1.jar,commons-httpclient-3.1.jar,commons-codec-1.3.jar,commons-logging-1.1.jar"/>
 13+ <fileset id="runtime.libraries" dir="lib">
 14+ <patternset id="runtime.jars">
 15+ <include name="bsh-2.0b2-fixed.jar" />
 16+ <include name="jericho-html-3.1.jar" />
 17+ <include name="commons-httpclient-3.1.jar" />
 18+ <include name="commons-codec-1.3.jar" />
 19+ <include name="commons-logging-1.1.jar" />
 20+ </patternset>
 21+ </fileset>
 22+
 23+ <fileset id="compile.libraries" dir="lib">
 24+ <patternset refid="runtime.jars" />
 25+ <include name="javacc.jar" />
 26+ </fileset>
 27+
 28+ <patternset id="product.jars">
 29+ <patternset refid="runtime.jars" />
 30+ <include name="${project}.jar" />
 31+ </patternset>
1432
1533 <!-- ==== main ==== -->
1634
@@ -40,15 +58,15 @@
4159 deprecation="true"
4260 extdirs="lib"
4361 debug="true" >
44 - <src path="src" />
45 - <src path="build/src" />
 62+ <src path="src" />
 63+ <src path="build/src" />
4664 </javac>
4765 </target>
4866
4967 <target name="jar" depends="compile" description="create the binary jar file">
5068 <mkdir dir="build/jar"/>
5169 <jar jarfile="build/jar/${project}.jar">
52 - <zipfileset dir="config" prefix="build/classes/net/psammead/mwapi/config" />
 70+ <zipfileset dir="config" prefix="net/psammead/mwapi/config" />
5371 <zipfileset dir="build/classes"/>
5472 <zipfileset dir=".">
5573 <include name="image/${ws.icon}"/>
@@ -66,10 +84,8 @@
6785 <attribute name="Creator" value="${author}"/>
6886 <attribute name="License" value="${license}"/>
6987
70 - <!--
71 - TODO: use a property, add binary.jars to classpath (manifestclasspath from ant 1.7.0)
7288 <attribute name="Main-Class" value="net.psammead.commonist.Commonist"/>
73 - -->
 89+ <attribute name="Class-Path" value="bsh-2.0b2-fixed.jar jericho-html-3.1.jar commons-httpclient-3.1.jar commons-codec-1.3.jar commons-logging-1.1.jar"/>
7490 </manifest>
7591 </jar>
7692 </target>
@@ -99,7 +115,7 @@
100116 <include name="etc/**"/>
101117 <exclude name="${sign.keystore}"/>
102118 <include name="image/**"/>
103 - <include name="lib/**"/>
 119+ <include name="lib/**" />
104120 <include name="build/classes/**"/>
105121 </zipfileset>
106122 </zip>
@@ -126,7 +142,9 @@
127143 <zipfileset dir="etc" includes="PkgInfo" prefix="${mac.app}/Contents"/>
128144 <zipfileset dir="build/etc" includes="Info.plist" prefix="${mac.app}/Contents"/>
129145 <zipfileset dir="image" includes="${mac.bundle.icons}" prefix="${mac.app}/Contents/Resources"/>
130 - <zipfileset dir="lib" includes="${binary.jars}" prefix="${mac.app}/Contents/Resources/Java"/>
 146+ <zipfileset prefix="${mac.app}/Contents/Resources/Java">
 147+ <fileset refid="runtime.libraries" />
 148+ </zipfileset>
131149 <zipfileset dir="build/jar" includes="${project}.jar" prefix="${mac.app}/Contents/Resources/Java"/>
132150 </zip>
133151 </target>
@@ -142,17 +160,19 @@
143161 <target name="ws-sign" depends="jar" description="create signed versions of all jars for webstart">
144162 <mkdir dir="build/ws"/>
145163 <copy toDir="build/ws">
146 - <fileset dir="build/jar"/>
147 - <fileset dir="lib" includes="${binary.jars}"/>
 164+ <fileset dir="build/jar" />
 165+ <fileset refid="runtime.libraries" />
148166 </copy>
 167+ <fail unless="sign.alias" message="Please create private.properties file and include sign.alias, sign.storepass, sign.keypass properties there."/>
149168 <signjar
150169 alias="${sign.alias}"
151170 storepass="${sign.storepass}"
152171 keystore="${sign.keystore}"
153172 keypass="${sign.keypass}"
154173 >
155 - <!-- jar="build/signed-jar/${project}.jar" -->
156 - <fileset dir="build/ws" includes="*.jar"/>
 174+ <fileset dir="build/ws">
 175+ <patternset refid="product.jars" />
 176+ </fileset>
157177 </signjar>
158178 </target>
159179
@@ -173,7 +193,7 @@
174194 <zip destfile="build/${project}-${version}-ws.zip">
175195 <zipfileset dir="build/ws">
176196 <include name="${ws.jnlp}"/>
177 - <include name="*.jar"/>
 197+ <patternset refid="product.jars" />
178198 </zipfileset>
179199 <zipfileset dir="image">
180200 <include name="${ws.icon}"/>
@@ -181,30 +201,4 @@
182202 </zipfileset>
183203 </zip>
184204 </target>
185 -
186 - <!-- ==== export ==== -->
187 -
188 - <target name="import" description="import artefacts from other projects">
189 - <ant dir="../mwapi" antfile="build.xml" target="export" inheritAll="false"/>
190 - <copy toDir="lib">
191 - <fileset dir="../mwapi/build/export" includes="lib-util.jar,lib-util-src.jar"/>
192 - <fileset dir="../mwapi/build/export" includes="mwapi.jar,mwapi-src.jar"/>
193 - <fileset dir="../mwapi/build/export" includes="jericho-html-3.1.jar,commons-httpclient-3.1.jar,commons-codec-1.3.jar,commons-logging-1.1.jar"/>
194 - </copy>
195 -
196 - <ant dir="../minibpp" antfile="build.xml" target="export" inheritAll="false"/>
197 - <copy toDir="lib">
198 - <fileset dir="../minibpp/build/export" includes="minibpp.jar,minibpp-src.jar"/>
199 - </copy>
200 - </target>
201 -
202 - <target name="export" depends="doc,dist,ws-dist" description="create artefacts">
203 - <property name="export.dir" value="build/export"/>
204 - <mkdir dir="${export.dir}"/>
205 - <copy todir="${export.dir}">
206 - <fileset dir="build/doc" includes="changes.txt,index.html"/>
207 - <fileset dir="build" includes="${project}-${version}.zip"/>
208 - </copy>
209 - <unzip src="build/${project}-${version}-ws.zip" dest="${export.dir}/ws" overwrite="true"/>
210 - </target>
211205 </project>
Property changes on: trunk/tools/commonist-java
___________________________________________________________________
Modified: svn:ignore
212206 - build
213207 + build
private.properties

Status & tagging log