|
2185 | 2185 | <markTime msg="${message}" />
|
2186 | 2186 | </target>
|
2187 | 2187 |
|
2188 |
| - |
2189 |
| - <!-- |
2190 |
| - function to centralize how we get (that is, set) the value of |
2191 |
| - 'javaMajorVersion'. (expected to be integer, such as 5,6,7,8,9, |
2192 |
| - or will be "0" if the version could not be determined, for some reason. |
2193 |
| - --> |
2194 |
| - |
2195 |
| - <target name="getJavaMajorVersion"> |
2196 |
| - <!-- |
2197 |
| - Since we don't support below java 11 we can safely ignore version numbers for java 8 and below |
2198 |
| - --> |
2199 |
| - |
2200 |
| - <loadresource property="javaMajorVersion"> |
2201 |
| - <string value="${java.version}"/> |
2202 |
| - <filterchain> |
2203 |
| - <tokenfilter> |
2204 |
| - <replaceregex pattern="^(\d+)([\.-](.*))" replace="\1"/> |
2205 |
| - </tokenfilter> |
2206 |
| - </filterchain> |
2207 |
| - </loadresource> |
2208 |
| - <echo message="javaMajorVersion: ${javaMajorVersion}"/> |
2209 |
| - |
2210 |
| - </target> |
2211 |
| - |
2212 |
| - <macrodef name="printProperty"> |
2213 |
| - <attribute name="property" /> |
2214 |
| - <sequential> |
2215 |
| - <echo message="@{property}: ${@{property}}" /> |
2216 |
| - </sequential> |
2217 |
| - </macrodef> |
2218 |
| - |
2219 |
| - |
2220 |
| - <target name="debug-allJavaProperties"> |
2221 |
| - <echoproperties regex="^java\..*$" /> |
2222 |
| - </target> |
2223 |
| - <target name="debug-allOSProperties"> |
2224 |
| - <echoproperties regex="^os\..*$" /> |
2225 |
| - </target> |
2226 |
| - |
2227 |
| - <target |
2228 |
| - name="test-getJavaMajorVersion" |
2229 |
| - depends="debug-allJavaProperties,debug-allOSProperties,getJavaMajorVersion"> |
2230 |
| - <printProperty property="javaMajorVersion" /> |
2231 |
| - <printProperty property="java.version" /> |
2232 |
| - <printProperty property="java.runtime.version" /> |
2233 |
| - <printProperty property="java.vm.info" /> |
2234 |
| - <printProperty property="java.specification.version" /> |
2235 |
| - <printProperty property="java.vendor" /> |
2236 |
| - <printProperty property="ant.version" /> |
2237 |
| - <printProperty property="ant.java.version" /> |
2238 |
| - <!-- <antcall target="printMainProperties" /> --> |
2239 |
| - </target> |
2240 |
| - |
2241 |
| - <target |
2242 |
| - name="test-all" |
2243 |
| - depends="init,debug-allProperties,test-getJavaMajorVersion"> |
2244 |
| - </target> |
2245 |
| - |
2246 |
| - <target |
2247 |
| - name="debug-allProperties" |
2248 |
| - depends="init"> |
2249 |
| - <echoproperties /> |
2250 |
| - </target> |
2251 | 2188 | </project>
|
0 commit comments