blob: fcfda149c5e72e4333de3c2d65f0024807284c12 [file] [log] [blame]
<project default="jar:jar" xmlns:j="jelly:core" xmlns:u="jelly:util"
xmlns:ant="jelly:ant" xmlns:maven="jelly:maven">
<preGoal name="xdoc:transform">
<attainGoal name="createDependenciesPage"/>
</preGoal>
<postGoal name="xdoc:jelly-transform" >
<ant:echo>Replacing &amp;nbsp;</ant:echo>
<ant:delete>
<fileset dir="${maven.build.dir}/docs/style"
includes="**/maven*.css"/>
</ant:delete>
</postGoal>
<goal name="createDependenciesPage"
description="Generates the dependencies document">
<j:set var="destfile"
value="${maven.build.dir}/generated-xdocs/dependencies.xml"/>
<ant:mkdir dir="${maven.build.dir}/generated-xdocs"/>
<u:file var="destfileFile" name="${destfile}"/>
<j:set var="destfile" value="${destfileFile.getCanonicalPath()}"/>
<j:set var="outputencoding" value="${maven.docs.outputencoding}"/>
<j:file name="${destfile}" encoding="${outputencoding}"
outputMode="xml">
<document>
<properties>
<title>Dependencies</title>
</properties>
<body>
<section name="Dependencies">
<p> These are the various dependencies required by
Wicket.</p>
<p> If you're using maven to build your project and
just want to know what dependencies to add to your
POM, just scroll down to the <a
href="#pomDependencies">next section</a>. </p>
<subsection name="Required JARS">
<p>The following list of JAR dependencies are
required in order to be able to use Wicket.
These dependencies are also needed in the build
process.</p>
<table>
<tr>
<th>Required JARs</th>
<th>Description</th>
</tr>
<tr>
<td>wicket-${pom.currentVersion}.jar</td>
<td>The main Wicket classes</td>
</tr>
<j:forEach var="lib" items="${pom.artifacts}">
<j:set var="dep" value="${lib.dependency}"/>
<j:if
test="${dep.getProperty('wicket.group')=='required'}">
<tr>
<td>
<a href="${dep.url}">
${dep.artifact}</a>
</td>
<td>
${dep.getProperty('wicket.description')}</td>
</tr>
</j:if>
</j:forEach>
</table>
</subsection>
<subsection name="Optional JARs">
<p>The following JAR dependencies are optional.
This means that depending on your situation you
might need (one of) these jars to use Wicket to
the fullest.</p>
<table>
<tr>
<th>Optional JARs</th>
<th>Description</th>
</tr>
<j:forEach var="lib" items="${pom.artifacts}">
<j:set var="dep" value="${lib.dependency}"/>
<j:if
test="${dep.getProperty('wicket.group')=='optional'}">
<tr>
<td>
<a href="${dep.url}">
${dep.artifact}</a>
</td>
<td>
${dep.getProperty('wicket.description')}</td>
</tr>
</j:if>
</j:forEach>
</table>
</subsection>
<subsection name="Build JARs">
<p>The following depenencies are only used when you
are building Wicket yourself. These libraries
are not necessary to create Wicket
applications.</p>
<table>
<tr>
<th>JARs for buiding Wicket</th>
<th>Description</th>
</tr>
<j:forEach var="lib" items="${pom.artifacts}">
<j:set var="dep" value="${lib.dependency}"/>
<j:if
test="${dep.getProperty('wicket.group')=='test' or dep.getProperty('wicket.group')=='compile'}">
<tr>
<td>
<a href="${dep.url}">
${dep.artifact}</a>
</td>
<td>
${dep.getProperty('wicket.description')}</td>
</tr>
</j:if>
</j:forEach>
</table>
</subsection>
</section>
<section name="Dependencies">
<a name="pomDependencies"></a>
<p> If you are using <a
href="http://maven.apache.org">maven</a> to build
your project then you can simply cut and paste the
following dependencies into your project.xml.</p>
<p> Note that if you are reading this on the Wicket
website then the version numbers reflect what is
currently in CVS, not necessarily what versions are
in use in the distribution that you have
downloaded. In particular, the version number for
Wicket itself may not reflect a version currently
available in the maven repository. </p>
<p> If you are reading this from the documentation that
came bundled with a particular distribution of
Wicket then you can use these values without
modification. </p>
<source><![CDATA[<dependency>
<groupId>wicket</groupId>
<artifactId>wicket</artifactId>
<version>${pom.currentVersion}</version>
</dependency>]]>
<j:forEach var="lib" items="${pom.artifacts}"
><j:set var="dep" value="${lib.dependency}" /> <j:if
test="${dep.getProperty('wicket.group')=='optional' or dep.getProperty('wicket.group')=='required'}">
<br/><![CDATA[<dependency>
<groupId>${dep.groupId}</groupId>
<artifactId>${dep.artifactId}</artifactId>
<version>${dep.version}</version>
</dependency>]]>
</j:if>
</j:forEach>
</source>
</section>
</body>
</document>
</j:file>
</goal>
<postGoal name="dist:prepare-bin-filesystem" >
<!-- <attainGoal name="announcement"/> -->
<ant:mkdir dir="${maven.dist.bin.assembly.dir}/lib" />
<!--
<ant:mkdir dir="${maven.dist.bin.assembly.dir}/licenses" />
<ant:mkdir dir="${maven.dist.bin.assembly.dir}/sample" />
-->
<j:forEach var="lib" items="${pom.artifacts}">
<j:set var="dep" value="${lib.dependency}" />
<j:if test="${dep.type=='jar'}">
<j:choose>
<j:when test="${dep.getProperty('endorsed')}">
<ant:copy
todir="${maven.dist.bin.assembly.dir}/lib/endorsed"
file="${lib.path}" />
</j:when>
<j:otherwise>
<ant:copy todir="${maven.dist.bin.assembly.dir}/lib"
file="${lib.path}" />
</j:otherwise>
</j:choose>
</j:if>
</j:forEach>
<!--
<ant:copy todir="${maven.dist.bin.assembly.dir}/sample">
<fileset dir="sample">
<include name="**/*"/>
</fileset>
</ant:copy>
<ant:copy todir="${maven.dist.bin.assembly.dir}/licenses">
<fileset dir="licenses">
<include name="**/*"/>
</fileset>
</ant:copy>
-->
<ant:copy todir="${maven.dist.bin.assembly.dir}/src/java">
<fileset dir="src/java">
<include name="**/*"/>
</fileset>
</ant:copy>
<ant:copy todir="${maven.dist.bin.assembly.dir}/src/test">
<fileset dir="src/test">
<include name="**/*"/>
</fileset>
</ant:copy>
<ant:copy todir="${maven.dist.bin.assembly.dir}/xdocs">
<fileset dir="xdocs">
<include name="**/*"/>
</fileset>
</ant:copy>
<ant:copy todir="${maven.dist.bin.assembly.dir}" file="project.xml" />
<ant:copy todir="${maven.dist.bin.assembly.dir}"
file="project.properties" />
<ant:copy todir="${maven.dist.bin.assembly.dir}" file="maven.xml" />
<ant:copy todir="${maven.dist.bin.assembly.dir}" file="build.xml" />
<ant:copy todir="${maven.dist.bin.assembly.dir}"
file="LICENSE.txt" />
<!-- <ant:copy todir="${maven.dist.bin.assembly.dir}" file="wicket-checkstyle.xml" /> -->
<!--
<ant:copy tofile="${maven.dist.bin.assembly.dir}/release-${pom.currentVersion}.txt" file="${maven.announcement.file}"/>
-->
</postGoal>
</project>