| | 75 | </if> |
|---|
| | 76 | </target> |
|---|
| | 77 | |
|---|
| | 78 | <!-- Set up all processors to be used --> |
|---|
| | 79 | <target name="setup-processors" description="Setup processor configuration"> |
|---|
| | 80 | <input propertyname="processors.xml" promptChar="?" defaultValue="Y">Do you want to enable XML/XSL processor? (Y/N)</input> |
|---|
| | 81 | <if> |
|---|
| | 82 | <or> |
|---|
| | 83 | <equals arg1="${processors.xml}" arg2="Y"/> |
|---|
| | 84 | <equals arg1="${processors.xml}" arg2="y"/> |
|---|
| | 85 | </or> |
|---|
| | 86 | <then> |
|---|
| | 87 | <echo level="warning">Please do not forget to add the required pre- and postinterceptors for the XML/XSL processor.</echo> |
|---|
| | 88 | <input propertyname="processors.default.select" promptChar="?" defaultValue="Y">Do you want to use this as the default one? (Y/N)</input> |
|---|
| | 89 | <if> |
|---|
| | 90 | <or> |
|---|
| | 91 | <equals arg1="${processors.default.select}" arg2="Y"/> |
|---|
| | 92 | <equals arg1="${processors.default.select}" arg2="y"/> |
|---|
| | 93 | </or> |
|---|
| | 94 | <then> |
|---|
| | 95 | <property name="processors.default.value" value="xml" /> |
|---|
| | 96 | </then> |
|---|
| | 97 | </if> |
|---|
| | 98 | </then> |
|---|
| | 99 | </if> |
|---|
| | 100 | <input propertyname="processors.memphis" promptChar="?" defaultValue="N">Do you want to enable Memphis processor? (Y/N)</input> |
|---|
| | 101 | <if> |
|---|
| | 102 | <and> |
|---|
| | 103 | <or> |
|---|
| | 104 | <equals arg1="${processors.memphis}" arg2="Y"/> |
|---|
| | 105 | <equals arg1="${processors.memphis}" arg2="y"/> |
|---|
| | 106 | </or> |
|---|
| | 107 | <not> |
|---|
| | 108 | <isset property="processors.default.value"/> |
|---|
| | 109 | </not> |
|---|
| | 110 | </and> |
|---|
| | 111 | <then> |
|---|
| | 112 | <input propertyname="processors.default.select" promptChar="?" defaultValue="Y">Do you want to use this as the default one? (Y/N)</input> |
|---|
| | 113 | <if> |
|---|
| | 114 | <or> |
|---|
| | 115 | <equals arg1="${processors.default.select}" arg2="Y"/> |
|---|
| | 116 | <equals arg1="${processors.default.select}" arg2="y"/> |
|---|
| | 117 | </or> |
|---|
| | 118 | <then> |
|---|
| | 119 | <property name="processors.default.value" value="memphis" /> |
|---|
| | 120 | </then> |
|---|
| | 121 | </if> |
|---|
| | 122 | </then> |
|---|
| | 123 | </if> |
|---|
| | 124 | <input propertyname="processors.rte" promptChar="?" defaultValue="N">Do you want to enable RTE processor? (Y/N)</input> |
|---|
| | 125 | <if> |
|---|
| | 126 | <and> |
|---|
| | 127 | <or> |
|---|
| | 128 | <equals arg1="${processors.rte}" arg2="Y"/> |
|---|
| | 129 | <equals arg1="${processors.rte}" arg2="y"/> |
|---|
| | 130 | </or> |
|---|
| | 131 | <not> |
|---|
| | 132 | <isset property="processors.default.value"/> |
|---|
| | 133 | </not> |
|---|
| | 134 | </and> |
|---|
| | 135 | <then> |
|---|
| | 136 | <input propertyname="processors.default.select" promptChar="?" defaultValue="Y">Do you want to use this as the default one? (Y/N)</input> |
|---|
| | 137 | <if> |
|---|
| | 138 | <or> |
|---|
| | 139 | <equals arg1="${processors.default.select}" arg2="Y"/> |
|---|
| | 140 | <equals arg1="${processors.default.select}" arg2="y"/> |
|---|
| | 141 | </or> |
|---|
| | 142 | <then> |
|---|
| | 143 | <property name="processors.default.value" value="rte" /> |
|---|
| | 144 | </then> |
|---|
| | 145 | </if> |
|---|
| | 146 | </then> |
|---|
| | 147 | </if> |
|---|
| | 148 | <append destFile="${processors.default.file}" text="<?xml version="1.0" encoding="iso-8859-1"?> |
|---|
| | 149 | <xj:configuration |
|---|
| | 150 | xmlns:xj="http://xjconf.net/XJConf" |
|---|
| | 151 | xmlns="http://stubbles.net/websites"> |
|---|
| | 152 | <defaultResolver default="${processors.default.value}">"/> |
|---|
| | 153 | <if> |
|---|
| | 154 | <or> |
|---|
| | 155 | <equals arg1="${processors.xml}" arg2="Y"/> |
|---|
| | 156 | <equals arg1="${processors.xml}" arg2="y"/> |
|---|
| | 157 | </or> |
|---|
| | 158 | <then> |
|---|
| | 159 | <append destFile="${processors.default.file}" text="<processor name="xml" type="net.stubbles.websites.xml.stubXMLProcessor" interceptorDescriptor="interceptors" />"/> |
|---|
| | 160 | </then> |
|---|
| | 161 | </if> |
|---|
| | 162 | <if> |
|---|
| | 163 | <or> |
|---|
| | 164 | <equals arg1="${processors.memphis}" arg2="Y"/> |
|---|
| | 165 | <equals arg1="${processors.memphis}" arg2="y"/> |
|---|
| | 166 | </or> |
|---|
| | 167 | <then> |
|---|
| | 168 | <append destFile="${processors.default.file}" text="<processor name="memphis" type="net.stubbles.websites.memphis.stubMemphisProcessor" interceptorDescriptor="interceptors" />"/> |
|---|
| | 169 | </then> |
|---|
| | 170 | </if> |
|---|
| | 171 | <if> |
|---|
| | 172 | <or> |
|---|
| | 173 | <equals arg1="${processors.rte}" arg2="Y"/> |
|---|
| | 174 | <equals arg1="${processors.rte}" arg2="y"/> |
|---|
| | 175 | </or> |
|---|
| | 176 | <then> |
|---|
| | 177 | <append destFile="${processors.default.file}" text="<processor name="rte" type="net.stubbles.websites.rasmus.stubRasmusProcessor" interceptorDescriptor="interceptors" />"/> |
|---|
| | 178 | </then> |
|---|
| | 179 | </if> |
|---|
| | 180 | <if> |
|---|
| | 181 | <or> |
|---|
| | 182 | <equals arg1="${jsonrpc.enabled}" arg2="Y"/> |
|---|
| | 183 | <equals arg1="${jsonrpc.enabled}" arg2="y"/> |
|---|
| | 184 | </or> |
|---|
| | 185 | <then> |
|---|
| | 186 | <append destFile="${processors.default.file}" text="<processor name="jsonrpc" type="net.stubbles.service.jsonrpc.stubJsonRpcProcessor" interceptorDescriptor="interceptors" />"/> |
|---|
| | 187 | </then> |
|---|
| | 188 | </if> |
|---|
| | 189 | <append destFile="${processors.default.file}" text="</defaultResolver> |
|---|
| | 190 | </xj:configuration>"/> |
|---|
| | 191 | <if> |
|---|
| | 192 | <not> |
|---|
| | 193 | <isset property="processors.default.value"/> |
|---|
| | 194 | </not> |
|---|
| | 195 | <then> |
|---|
| | 196 | <echo level="warning">Warning: No default processor selected. Please edit config/xml/processors.xml to select the correct default processor or re-run phing setup-processors</echo> |
|---|
| | 197 | </then> |
|---|