Index: trunk/tools/commonist-java/build.properties |
— | — | @@ -44,13 +44,14 @@ |
45 | 45 | ws.icon=commonist-32.png |
46 | 46 | ws.splash=commonist-128.png |
47 | 47 | |
| 48 | +# Set below in private.properties file |
48 | 49 | # dname |
49 | | -sign.dname=CN=Snake Oil, OU=Hacking Unit, O=FNORD! Inc., L=Bielefeld, ST=33641, C=DE |
| 50 | +#sign.dname=CN=... |
50 | 51 | |
51 | 52 | # keystore |
52 | 53 | sign.keystore=etc/keyStore |
53 | | -sign.keypass=0xDEADBEEF |
| 54 | +#sign.keypass=*somepassword* |
54 | 55 | |
55 | 56 | # 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 @@ |
18 | 18 | <j2se version="1.5+" max-heap-size="192m"/> |
19 | 19 | <jar href="commonist.jar" main="true"/> |
20 | 20 | <jar href="bsh-2.0b2-fixed.jar"/> |
21 | | - <jar href="lib-util.jar"/> |
22 | | - <jar href="minibpp.jar"/> |
23 | | - <jar href="mwapi.jar"/> |
24 | 21 | <jar href="commons-logging-1.1.jar"/> |
25 | 22 | <jar href="commons-codec-1.3.jar"/> |
26 | 23 | <jar href="commons-httpclient-3.1.jar"/> |
Property changes on: trunk/tools/commonist-java/etc |
___________________________________________________________________ |
Added: svn:ignore |
27 | 24 | + keyStore |
Index: trunk/tools/commonist-java/build.xml |
— | — | @@ -6,10 +6,28 @@ |
7 | 7 | <property environment="env"/> |
8 | 8 | <property file="${user.home}/.build.properties"/> <!-- these override the project local version --> |
9 | 9 | <property file="build.properties"/> |
| 10 | + <property file="private.properties" /> <!-- optional private properies like keystore password for signing --> |
10 | 11 | |
11 | 12 | <!-- 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> |
14 | 32 | |
15 | 33 | <!-- ==== main ==== --> |
16 | 34 | |
— | — | @@ -40,15 +58,15 @@ |
41 | 59 | deprecation="true" |
42 | 60 | extdirs="lib" |
43 | 61 | debug="true" > |
44 | | - <src path="src" /> |
45 | | - <src path="build/src" /> |
| 62 | + <src path="src" /> |
| 63 | + <src path="build/src" /> |
46 | 64 | </javac> |
47 | 65 | </target> |
48 | 66 | |
49 | 67 | <target name="jar" depends="compile" description="create the binary jar file"> |
50 | 68 | <mkdir dir="build/jar"/> |
51 | 69 | <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" /> |
53 | 71 | <zipfileset dir="build/classes"/> |
54 | 72 | <zipfileset dir="."> |
55 | 73 | <include name="image/${ws.icon}"/> |
— | — | @@ -66,10 +84,8 @@ |
67 | 85 | <attribute name="Creator" value="${author}"/> |
68 | 86 | <attribute name="License" value="${license}"/> |
69 | 87 | |
70 | | - <!-- |
71 | | - TODO: use a property, add binary.jars to classpath (manifestclasspath from ant 1.7.0) |
72 | 88 | <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"/> |
74 | 90 | </manifest> |
75 | 91 | </jar> |
76 | 92 | </target> |
— | — | @@ -99,7 +115,7 @@ |
100 | 116 | <include name="etc/**"/> |
101 | 117 | <exclude name="${sign.keystore}"/> |
102 | 118 | <include name="image/**"/> |
103 | | - <include name="lib/**"/> |
| 119 | + <include name="lib/**" /> |
104 | 120 | <include name="build/classes/**"/> |
105 | 121 | </zipfileset> |
106 | 122 | </zip> |
— | — | @@ -126,7 +142,9 @@ |
127 | 143 | <zipfileset dir="etc" includes="PkgInfo" prefix="${mac.app}/Contents"/> |
128 | 144 | <zipfileset dir="build/etc" includes="Info.plist" prefix="${mac.app}/Contents"/> |
129 | 145 | <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> |
131 | 149 | <zipfileset dir="build/jar" includes="${project}.jar" prefix="${mac.app}/Contents/Resources/Java"/> |
132 | 150 | </zip> |
133 | 151 | </target> |
— | — | @@ -142,17 +160,19 @@ |
143 | 161 | <target name="ws-sign" depends="jar" description="create signed versions of all jars for webstart"> |
144 | 162 | <mkdir dir="build/ws"/> |
145 | 163 | <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" /> |
148 | 166 | </copy> |
| 167 | + <fail unless="sign.alias" message="Please create private.properties file and include sign.alias, sign.storepass, sign.keypass properties there."/> |
149 | 168 | <signjar |
150 | 169 | alias="${sign.alias}" |
151 | 170 | storepass="${sign.storepass}" |
152 | 171 | keystore="${sign.keystore}" |
153 | 172 | keypass="${sign.keypass}" |
154 | 173 | > |
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> |
157 | 177 | </signjar> |
158 | 178 | </target> |
159 | 179 | |
— | — | @@ -173,7 +193,7 @@ |
174 | 194 | <zip destfile="build/${project}-${version}-ws.zip"> |
175 | 195 | <zipfileset dir="build/ws"> |
176 | 196 | <include name="${ws.jnlp}"/> |
177 | | - <include name="*.jar"/> |
| 197 | + <patternset refid="product.jars" /> |
178 | 198 | </zipfileset> |
179 | 199 | <zipfileset dir="image"> |
180 | 200 | <include name="${ws.icon}"/> |
— | — | @@ -181,30 +201,4 @@ |
182 | 202 | </zipfileset> |
183 | 203 | </zip> |
184 | 204 | </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> |
211 | 205 | </project> |
Property changes on: trunk/tools/commonist-java |
___________________________________________________________________ |
Modified: svn:ignore |
212 | 206 | - build |
213 | 207 | + build |
private.properties |