Testování NullPointerException.
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project default="-post-run-deploy" basedir=".." xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1" xmlns:webproject1="http://www.netbeans.org/ns/web-project/1">
3 <target name="-wsit-init">
4 <property file="nbproject/private/private.properties"/>
5 <condition property="user.properties.file" value="${netbeans.user}/build.properties">
7 <isset property="user.properties.file"/>
10 <property file="${deploy.ant.properties.file}"/>
11 <condition property="appserver.root" value="${sjsas.root}">
12 <isset property="sjsas.root"/>
14 <condition property="appserver.password" value="${sjsas.password}">
15 <isset property="sjsas.password"/>
17 <condition property="appserver.root" value="${gfv3.root}">
18 <isset property="gfv3.root"/>
20 <condition property="appserver.password" value="${gfv3.password}">
21 <isset property="gfv3.password"/>
23 <condition property="appserver.password" value="changeit">
25 <isset property="appserver.password"/>
28 <fail unless="user.properties.file">Must set user properties file</fail>
29 <fail unless="appserver.root">Must set Sun app server root</fail>
30 <fail unless="appserver.password">Must set Sun app server password</fail>
32 <target name="-create-wsit-prop" unless="do.not.create.wsit.prop">
33 <echo file="nbproject/wsit.properties" message="AS_ADMIN_USERPASSWORD=${appserver.password}"/>
35 <target name="-delete-create-wsit-file" if="user.created">
36 <delete file="nbproject/wsit.createuser"/>
38 <target name="create-user" unless="user.exists">
39 <exec timeout="10000" outputproperty="creation.out" executable="${appserver.root}/bin/asadmin" failonerror="false" failifexecutionfails="false" osfamily="unix">
40 <arg value="create-file-user"/>
41 <arg value="--passwordfile"/>
42 <arg value="nbproject/wsit.properties"/>
43 <arg value="wsitUser"/>
45 <exec timeout="10000" outputproperty="creation.out" executable="${appserver.root}/bin/asadmin" failonerror="false" failifexecutionfails="false" osfamily="mac">
46 <arg value="create-file-user"/>
47 <arg value="--passwordfile"/>
48 <arg value="nbproject/wsit.properties"/>
49 <arg value="wsitUser"/>
51 <exec timeout="10000" outputproperty="creation.out" executable="${appserver.root}/bin/asadmin.bat" failonerror="false" failifexecutionfails="false" osfamily="windows">
52 <arg value="create-file-user"/>
53 <arg value="--passwordfile"/>
54 <arg value="nbproject/wsit.properties"/>
55 <arg value="wsitUser"/>
57 <condition property="user.created">
59 <contains string="${creation.out}" substring="create-file-user"/>
60 <contains string="${creation.out}" substring="success"/>
63 <antcall target="-delete-create-wsit-file"/>
65 <target name="-do-create-user" if="do-create-user">
66 <available property="do.not.create.wsit.prop" file="nbproject/wsit.properties"/>
67 <antcall target="-create-wsit-prop"/>
68 <exec timeout="10000" outputproperty="as.users" executable="${appserver.root}/bin/asadmin" failonerror="false" failifexecutionfails="false" osfamily="unix">
69 <arg value="list-file-users"/>
71 <exec timeout="10000" outputproperty="as.users" executable="${appserver.root}/bin/asadmin" failonerror="false" failifexecutionfails="false" osfamily="mac">
72 <arg value="list-file-users"/>
74 <exec timeout="10000" outputproperty="as.users" executable="${appserver.root}/bin/asadmin.bat" failonerror="false" failifexecutionfails="false" osfamily="windows">
75 <arg value="list-file-users"/>
77 <condition property="user.exists">
78 <contains string="${as.users}" substring="wsitUser"/>
80 <antcall target="create-user"/>
82 <target name="-post-run-deploy" depends="-wsit-init">
83 <available property="do-create-user" file="nbproject/wsit.createuser"/>
84 <antcall target="-do-create-user"/>