learned a nicer way to download build-time dependencies while working on Ivy
This commit is contained in:
parent
4f3c6626b8
commit
41852f7f6f
|
|
@ -20,12 +20,6 @@ under the License.
|
|||
<project name="cyclonedx" xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
|
||||
<target name="define-cyclonedx-components" depends="fetch-cyclonedx">
|
||||
<typedef uri="antlib:org.apache.ant.cyclonedx"
|
||||
resource="org/apache/ant/cyclonedx/antlib.xml">
|
||||
<classpath>
|
||||
<path refid="classpath.build"/>
|
||||
</classpath>
|
||||
</typedef>
|
||||
<!-- common definitions for SBOMs -->
|
||||
<cdx:organization
|
||||
name="Apache Ant Project Management Committee"
|
||||
|
|
@ -344,12 +338,16 @@ under the License.
|
|||
</create-tarball-boms>
|
||||
</target>
|
||||
|
||||
<target name="fetch-cyclonedx" depends="resolve,-no-fetch-cyclonedx" if="with.ivy">
|
||||
<ivy:retrieve conf="build" pattern="${lib.dir.build}/[artifact]-[revision].[ext]" sync="yes"/>
|
||||
<ivy:cachepath pathid="classpath.build" conf="build"/>
|
||||
</target>
|
||||
|
||||
<target name="-no-fetch-cyclonedx" unless="with.ivy">
|
||||
<path id="classpath.build"/>
|
||||
<target name="fetch-cyclonedx" depends="resolve" if="with.ivy">
|
||||
<ivy:cachepath organisation="org.apache.ant"
|
||||
module="ant-cyclonedx"
|
||||
revision="0.1"
|
||||
inline="true"
|
||||
conf="default"
|
||||
pathid="cyclonedx.classpath"
|
||||
log="download-only"/>
|
||||
<typedef uri="antlib:org.apache.ant.cyclonedx"
|
||||
resource="org/apache/ant/cyclonedx/antlib.xml"
|
||||
classpathref="cyclonedx.classpath"/>
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
|||
2
ivy.xml
2
ivy.xml
|
|
@ -37,7 +37,6 @@
|
|||
<conf name="default" description="full antlib with all dependencies"/>
|
||||
<conf name="provided" description="Ant must be present at runtime"/>
|
||||
<conf name="test" description="dependencies used for JUnit tests of the antlib" transitive="false" visibility="private"/>
|
||||
<conf name="build" description="dependencies used during the build process" visibility="private"/>
|
||||
</configurations>
|
||||
<publications xmlns:e="urn:ant.apache.org:ivy-extras">
|
||||
<artifact name="${artifact.name}" type="pom" ext="pom"/>
|
||||
|
|
@ -69,6 +68,5 @@
|
|||
<dependency org="junit" name="junit" rev="4.13.2" conf="default"/>
|
||||
<dependency org="org.apache.ant" name="ant" rev="1.10.13" conf="provided->default"/>
|
||||
<dependency org="org.apache.ant" name="ant-testutil" rev="1.10.13" conf="test->default"/>
|
||||
<dependency org="org.apache.ant" name="ant-cyclonedx" rev="0.1" conf="build->default"/>
|
||||
</dependencies>
|
||||
</ivy-module>
|
||||
|
|
|
|||
Loading…
Reference in New Issue