| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| |
| <!-- |
| |
| This is a minimal build file to support Gump. |
| Use of Maven to build this component is recommended. |
| |
| Specify -Dcompanion.jar=foo.jar to test a previously prepared jar. |
| |
| --> |
| <project default="test"> |
| <!-- use build.properties file or command line to override these properties --> |
| <property file="build.properties"/> |
| |
| <property name="svnsite.url" value="https://svn.apache.org/repos/asf/logging/site/trunk/docs/log4j/companions/extras"/> |
| <available property="svn-available" file="target/site-deploy/.svn"/> |
| |
| <target name="checkout-site" unless="svn-available"> |
| <exec executable="svn"> |
| <arg value="co"/> |
| <arg value="${svnsite.url}"/> |
| <arg value="target/site-deploy"/> |
| </exec> |
| </target> |
| |
| <target name="update-site" if="svn-available"> |
| <exec executable="svn" dir="target/site-deploy" failonerror="true"> |
| <arg value="update"/> |
| </exec> |
| </target> |
| |
| <target name="post-site" depends="checkout-site, update-site"/> |
| |
| |
| <target name="mime=html"> |
| <exec executable="svn"> |
| <arg value="propset"/> |
| <arg value="svn:mime-type"/> |
| <arg value="text/html"/> |
| <arg value="${src.html}"/> |
| </exec> |
| </target> |
| |
| <target name="mime=css"> |
| <exec executable="svn"> |
| <arg value="propset"/> |
| <arg value="svn:mime-type"/> |
| <arg value="text/css"/> |
| <arg value="${src.css}"/> |
| </exec> |
| </target> |
| |
| |
| <target name="site-deploy"> |
| <!-- Add any new files (and generate innocuous warnings for the existing content) --> |
| <delete file="target/site-deploy/svn-commit.tmp~"/> |
| <exec executable="bash" dir="target/site-deploy" failonerror="true"> |
| <arg line='-c "svn add --force *"'/> |
| </exec> |
| <taskdef name="foreach" classname="net.sf.antcontrib.logic.ForEach" /> |
| <foreach target="mime=html" param="src.html"> |
| <path> |
| <fileset dir="target/site-deploy" includes="**/*.html"/> |
| </path> |
| </foreach> |
| <foreach target="mime=css" param="src.css"> |
| <path> |
| <fileset dir="target/site-deploy" includes="**/*.css"/> |
| </path> |
| </foreach> |
| <!-- requires that SVN_EDITOR, VISUAL or EDITOR being set to edit commit description --> |
| <exec executable="svn" dir="target/site-deploy" failonerror="true"> |
| <arg value="commit"/> |
| </exec> |
| </target> |
| </project> |