Created
September 11, 2013 19:12
-
-
Save grantmacken/6528369 to your computer and use it in GitHub Desktop.
My ant build target for building and uploading xar from project folder.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<target name="xar-build-upload" > | |
<buildnumber file="build.version"/> | |
<property name="project.version" value="${version.major}.${build.number}"/> | |
<property name="xar-location" value="${dir.project}/${dir.build}/${project.abbrev}-${project.version}.xar"/> | |
<property name="repo.url" value="http://${host.local}:8080/exist/apps/public-repo/public/"/> | |
<property name="repo.update" value="http://${host.local}:8080/exist/apps/public-repo/modules/update.xql"/> | |
<property name="xar-file" value="${project.abbrev}-${project.version}.xar"/> | |
<echo>project.version: ${project.version}</echo> | |
<antcall target="deployment-folder"/> | |
<antcall target="eXist-data"/> | |
<antcall target="build-xar"/> | |
<exec executable="curl"> | |
<arg line="-T ${xar-location} -u ${exist.username}:${exist.password} ${repo.url}/${xar-file}"/> | |
</exec> | |
<exec executable="curl"> | |
<arg line="-G -u ${exist.username}:${exist.password} ${repo.update}"/> | |
</exec> | |
<property name="install-and-deploy"> | |
xquery version "3.0"; | |
import module namespace repo="http://exist-db.org/xquery/repo"; | |
repo:install-and-deploy("http://${project.domain}", "http://${host.local}:8080/exist/apps/public-repo/modules/find.xql") | |
</property> | |
<xdb:xquery xmlns:xdb="http://exist-db.org/ant" | |
uri="${local.url}/db" | |
query="${install-and-deploy}" | |
user="${exist.username}" password="${exist.password}"/> | |
<antcall target="browse"/> | |
</target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment