Files
struts/build.xml
T
Donald J. Brown f47c801f0d Removed XStream as a required dependency (still used for QuickStart), fixed ant build to try to compile
(compile fails due to missing JSF jars in the ivy config), changed ant build to use xwork 2.0 and 
compile to 1.5, minor formatting for showcase config file


git-svn-id: https://svn.apache.org/repos/asf/struts/action2/trunk@412937 13f79535-47bb-0310-9956-ffa450edef68
2006-06-09 05:29:39 +00:00

243 lines
10 KiB
XML

<project name="action" default="jar" basedir=".">
<!-- overridden properties (must be before the import!) -->
<!--property name="src.test" value="action/src/test"/-->
<property name="src.xdt" value="core/src/main/xdt"/>
<property name="compile.version" value="1.5"/>
<property name="test.compile.version" value="1.5"/>
<property name="optional.sources" value="org/apache/struts/action2/views/jasperreports/**,
org/apache/struts/action2/dispatcher/multipart/PellMultiPartRequest.java,
org/apache/struts/action2/dispatcher/ChartResult.java
" />
<property name="optional.test.sources" value="org/apache/struts/action2/dispatcher/ChartResultTest.java" />
<import file="ant-build/osbuild.xml"/>
<!-- overriding the one found in osbuild.xml to exclude xwork-tiger,
which breaks the unit tests currently -->
<path id="cp">
<fileset dir="lib">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
<exclude name="**/jalopy/**"/>
<exclude name="**/tiger/**"/>
</fileset>
</path>
<mkdir dir="${build}/xwork-src"/>
<path id="javadoc.path">
<path path="${src.java}"/>
<path path="${build}/xwork-src"/>
</path>
<property name="build.tagdocs" value="${build}/tagdocs"/>
<property name="docs.tags" value="${docs}/tags"/>
<target name="init" depends="common.init" unless="skip.ivy">
<echo>
The default build only retrieves dependencies that released under a license compatible
with the Apache Software Foundation. To optionally download the optional LGPL dependencies
and compile the dependent Struts Action 2 code, run the 'compile-optional' task.
</echo>
<taskdef file="ant-build/ivy-tasks.properties" classpathref="cp" />
<ivy-configure file="ant-build/ivyconf.xml" />
<ivy-resolve file="ant-build/ivy.xml" />
<ivy-retrieve conf="build,default,source,ajax,freemarker,velocity,fileupload,sitemesh,quickstart,xslt,portlet,spring,pico,plexus,tiger,tiles" />
</target>
<target name="javadocs" depends="common.init">
<!-- first, unzip the xwork-src jar so we can generate unified javadocs -->
<unjar src="${lib}/source/xwork-src.jar" dest="${build}/xwork-src"/>
<antcall target="common.javadocs"/>
</target>
<target name="ivyrep.copy-ivy" depends="init">
<ivy-deliver deliverpattern="${ivyrep.path}/opensymphony/${name}/[artifact]-[revision].[ext]"
pubrevision="${version}-${TIME}" pubdate="${TIME}"/>
</target>
<target name="reports" depends="common.reports">
<mkdir dir="${dist.docs}/dependencies"/>
<!--
<ivy-report todir="${dist.docs}/dependencies" graph="false"/>
-->
</target>
<macrodef name="webapp">
<attribute name="name"/>
<sequential>
<mkdir dir="${dist}/apps/@{name}/src"/>
<copy todir="${dist}/apps/@{name}/src">
<fileset dir="apps/@{name}/src" includes="**/**"/>
</copy>
</sequential>
</macrodef>
<target name="predist">
<!-- grab the README.txt file -->
<copy file="${src}/etc/README.txt" todir="${dist}"/>
<mkdir dir="${dist}/dist" />
<move file="${build}/${name}-nostatic-${version}.jar" todir="${dist}/dist" />
<move file="${build}/${name}-static-${version}.zip" todir="${dist}/dist" />
<!-- prepare the template project -->
<webapp name="blank"/>
<copy todir="${dist}/apps/blank">
<fileset dir="apps/blank/" includes="*.iml" />
</copy>
<!-- prepare each tutorial/example -->
<webapp name="starter"/>
<webapp name="showcase"/>
<webapp name="shopping-cart"/>
<webapp name="portlet"/>
<!-- copy over elements required to build the final wars -->
<copy file="apps/build.xml" todir="${dist}/apps"/>
</target>
<target name="xdoclet-taglib" depends="init">
<taskdef
name="xdoclet"
classname="xdoclet.DocletTask"
classpathref="cp"
/>
<xdoclet destdir="${src.resources}/META-INF"
excludedtags="@version,@author,@return,@exception,@todo"
verbose="false"
force="true"
>
<!--
mergedir="src/etc"
-->
<fileset dir="${src.java}">
<include name="org/apache/struts/action2/views/**/*.java"/>
<include name="org/apache/struts/action2/components/**/*.java"/>
</fileset>
<configParam name="Jspversion" value="1.2"/>
<configParam name="Taglibversion" value="${version}"/>
<configParam name="Description" value="Struts Action 2 JSP Taglib"/>
<configParam name="Shortname" value="Struts Action 2 Taglib"/>
<configParam name="Displayname" value="Struts Action 2 Taglib"/>
<configParam name="Smallicon" value=""/>
<configParam name="Largeicon" value=""/>
<configParam name="Uri" value="/struts-action"/>
<xmlTemplate templateFile="${src.xdt}/taglib_tld.xdt" destinationfile="taglib.tld"/>
</xdoclet>
</target>
<target name="xdoclet-tagdoc" depends="init">
<mkdir dir="${build.tagdocs}"/>
<taskdef name="xdoclet" classname="xdoclet.DocletTask" classpathref="cp"/>
<xdoclet destdir="${build.tagdocs}"
excludedtags="@version,@author,@return,@exception"
verbose="false"
force="true"
>
<fileset dir="${src.java}">
<include name="org/apache/struts/action2/views/**/*.java"/>
<include name="org/apache/struts/action2/components/**/*.java"/>
</fileset>
<xmlTemplate templateFile="${src.xdt}/tagdoc.xdt" destinationfile="{0}.html"/>
</xdoclet>
<xdoclet destdir="${build.tagdocs}"
excludedtags="@version,@author,@return,@exception"
verbose="false"
force="true"
>
<fileset dir="${src.java}">
<include name="org/apache/struts/action2/views/**/*.java"/>
<include name="org/apache/struts/action2/components/**/*.java"/>
</fileset>
<configParam name="Taglibversion" value="${version}"/>
<template templateFile="${src.xdt}/tagdoc-toc.xdt" destinationfile="index.html"/>
</xdoclet>
<mkdir dir="${docs.tags}"/>
<copy todir="${docs.tags}" flatten="true" includeemptydirs="false" overwrite="true">
<fileset dir="${build.tagdocs}" includes="**/*.html">
<size value="10" when="more"/>
</fileset>
</copy>
</target>
<target name="mavenrep" depends="jar">
<!-- webwork -->
<copy file="pom.xml" tofile="/opt/repository/ibiblio.org/opensymphony/poms/${name}-${version}-SNAPSHOT.pom"/>
<copy file="${build}/${name}-${version}.jar" tofile="/opt/repository/ibiblio.org/opensymphony/jars/${name}-${version}-SNAPSHOT.jar"/>
<copy file="${build}/${name}-src-${version}.jar" tofile="/opt/repository/ibiblio.org/opensymphony/jars/${name}-src-${version}-SNAPSHOT.jar"/>
</target>
<!-- overridden targets -->
<target name="jar" depends="compile">
<mkdir dir="${build}"/>
<jar basedir="${build.java}" jarfile="${build}/${name}-${version}.jar">
<manifest>
<attribute name="Main-Class" value="org.apache.struts.action2.Main"/>
<attribute name="Implementation-Title" value="${fullname}"/>
<attribute name="Implementation-Version" value="${version}"/>
</manifest>
</jar>
<jar basedir="${src.java}" jarfile="${build}/${name}-src-${version}.jar">
<zipgroupfileset file="lib/source/xwork-src.jar"/>
<manifest>
<attribute name="Implementation-Title" value="${fullname}"/>
<attribute name="Implementation-Version" value="${version}"/>
</manifest>
</jar>
<jar jarfile="${build}/${name}-nostatic-${version}.jar">
<fileset dir="${build.java}">
<exclude name="org/apache/struts/action2/static/**/*" />
</fileset>
<manifest>
<attribute name="Main-Class" value="org.apache.struts.action2.Main"/>
<attribute name="Implementation-Title" value="${fullname}"/>
<attribute name="Implementation-Version" value="${version}"/>
</manifest>
</jar>
<zip destfile="${build}/${name}-static-${version}.zip">
<zipfileset dir="${build.java}/org/apache/struts/action2/static" prefix="webwork" />
</zip>
</target>
<target name="dist" depends="common.dist" description="generate distribution zip file">
<propertyfile file="${dist}/build.properties">
<entry key="skip.ivy" value="true"/>
</propertyfile>
</target>
<target name="clean" depends="common.clean">
<delete dir="apps/base/build"/>
<delete dir="apps/blank/build"/>
<delete dir="apps/showcase/build"/>
<delete dir="apps/starter/build"/>
<delete dir="apps/ajax/build"/>
<delete dir="apps/shopping-cart/build"/>
<delete dir="apps/portlet/build"/>
<!--
<delete dir="apps/wwia/build"/>
-->
</target>
<target name="init-optional" depends="init" unless="skip.ivy">
<echo>
This task retrieves optional dependencies that are released under licenses that are
not endorsed by the Apache Software Foundation. In particular, these dependencies
use the LGPL license - http://opensource.org/licenses/lgpl-license.php
</echo>
<!--
<taskdef name="ivy-retrieve" classname="fr.jayasoft.ivy.ant.IvyRetrieve" classpathref="cp"/>
-->
<ivy-retrieve conf="fileupload-pell,jasperreports,jfree,cewolf" />
</target>
<target name="compile-optional" depends="compile, init-optional" description="compile optional files">
<compile srcdir="extras/src/main/java" destdir="${build.java}" />
</target>
</project>