+ builds an ivy repo

This commit is contained in:
cbonar 2012-02-04 12:57:11 +01:00
parent 0c297f8784
commit 4c3dff690b
3 changed files with 35 additions and 1 deletions

View file

@ -156,6 +156,27 @@
<ivy:makepom ivyfile="${basedir}/ivy.xml" pomfile="${target.dir}/pom.xml" />
</target>
<target name="build-site" extensionOf="deploy" depends="validate" description="Builds a local directory that will reflect the structure of the final site with Ivy and Maven repositories as well as online API docs" >
<!-- First, creates an Ivy repo -->
<ivy:settings id="ivy.repo.site" file="${ivy.settings.path}" />
<ivy:install organisation="nicommons.crypto" module="base64" revision="1.0.0" settingsRef="ivy.repo.site" from="target" to="site" transitive="true" />
<!-- Then add supplementary files -->
<copy todir="${pub.dir}/${ivy.organisation}/${ivy.module}/${ivy.revision}">
<fileset dir="${basedir}">
<include name="*.txt" />
</fileset>
<fileset dir="${build.dir}">
<include name="pom.xml" />
</fileset>
</copy>
</target>
<target name="clean-site" description="Deletes the local site built with 'buils-site'">
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${pub.dir}" />
</delete>
</target>
<!--
TODO fix and integrate the following targets
-->

View file

@ -37,6 +37,7 @@ jsunit.testRunner=${jsunit.dir}/testRunner.html
ant.ivytask.path=${tools.dir}/apache-ivy-2.2.0/ivy-2.2.0.jar
# (required) -> set to Javascript Ant template project
ant.jsproject.path=${tools.dir}/build/ant-js.xml
ivy.settings.path=${tools.dir}/build/ivysettings.xml
# Other tools
@ -52,4 +53,4 @@ jsdoc.dir=${tools.dir}/jsdoc_toolkit-2.4.0/jsdoc-toolkit
phpdoc.exe=${tools.dir}/php-5.3.9-Win32-VC9-x86/php.exe ${tools.dir}/PhpDocumentor-1.4.4/phpdoc.php
# Where to publish artifacts
pub.dir=${basedir}/publications
pub.dir=${tools.dir}/../publications

View file

@ -0,0 +1,12 @@
<ivysettings>
<resolvers>
<filesystem name="target">
<ivy pattern="${basedir}/ivy(-[revision]).xml"/>
<artifact pattern="${target.lib.dir}/[artifact](-[revision]).[ext]"/>
</filesystem>
<filesystem name="site">
<ivy pattern="${pub.dir}/[organisation]/[module]/ivys/ivy(-[revision]).xml"/>
<artifact pattern="${pub.dir}/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
</filesystem>
</resolvers>
</ivysettings>