Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If downloading XARs fails, the build should fail #2200

Merged
merged 1 commit into from
Jan 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions build/scripts/installer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,16 @@
</target>

<target name="download-xar">
<!-- get dest="${apps.dir}" src="${apps.repo}/find?abbrev=${xar}&amp;processor=${project.version}"
verbose="on" maxtime="180" usetimestamp="true" tryGzipEncoding="true"/ -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this comment be left? If it's important to leave, please add a comment above explaining what it's here for.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to @adamretter:

I did try and previously use the Ant Get Task, unfortunately it is not flexible enough, as it doesn’t tell us the name of the Xar file that will be downloaded, and so we don’t know how to move the file into the autodeploy folder


<taskdef name="fetch" classname="nl.ow.dilemma.ant.fetch.FetchTask">
<classpath>
<pathelement location="${asocat-exist.jar}"/>
</classpath>
</taskdef>
<fetch dest="${apps.dir}" url="${apps.repo}/pkg.zip?abbrev=${xar}&amp;zip=yes&amp;processor=${project.version}"
failonerror="false" maxtime="360">
<fetch dest="${apps.dir}" url="${apps.repo}/find?abbrev=${xar}&amp;processor=${project.version}&amp;zip=yes"
failonerror="true" maxtime="180">
<patternset>
<include name="**/*.xar"/>
</patternset>
Expand Down
20 changes: 11 additions & 9 deletions build/scripts/setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

<property file="build.properties"/>

<property name="autodeploy.repo" value="http://demo.exist-db.org/exist/apps/public-repo"/>
joewiz marked this conversation as resolved.
Show resolved Hide resolved
<property name="autostart-dir" value="autodeploy"/>

<target name="prepare">
Expand Down Expand Up @@ -64,17 +63,20 @@
</target>

<target name="download-xar" unless="xar-installed">
<!-- get dest="${autostart-dir}" src="${autodeploy.repo}/find?abbrev=${xar}&amp;processor=${project.version}"
verbose="on" maxtime="180" usetimestamp="true" tryGzipEncoding="true"/ -->

<taskdef name="fetch" classname="nl.ow.dilemma.ant.fetch.FetchTask">
<classpath>
<pathelement location="${asocat-exist.jar}"/>
</classpath>
<classpath>
<pathelement location="${asocat-exist.jar}"/>
</classpath>
</taskdef>
<fetch dest="${autostart-dir}" url="${autodeploy.repo}/pkg.zip?abbrev=${xar}&amp;zip=yes&amp;processor=${project.version}"
failonerror="false" maxtime="120">
<patternset>
<include name="**/*.xar"/>
</patternset>
<fetch dest="${autostart-dir}" url="${autodeploy.repo}/find?abbrev=${xar}&amp;processor=${project.version}&amp;zip=yes"
failonerror="true" maxtime="180">
<patternset>
<include name="**/*.xar"/>
</patternset>
</fetch>
</target>

</project>