ant - How to block a status from an Ivy resolve -


In our company, we use an original ant file that is included for each of them to create in them There are things we want to define globally and uniform, such as build-test, test coverage, build-release, published on IV, etc.

I want to apply it to that Ivy Solution, to make a release build, the test (integration) status has been rejected near the libraries. In fact, for a release build, you can only use release-class libraries.

However, I can not find any way to implement it in the IV resolution ANT function (not in the Ivy.xml file).

Do anyone have any ideas about this?

option 1

Strictly say that you have two sets of resolved libraries , So it can be solved by two iv files.

Build.xm file will then have two resolution targets, which are controlled by a release property

  and lieutenant; Goal name = "solution-int" until "release.build" & gt; & Lt; Ivy: resolution file = "ivy-int.xml" /> & Lt; / Target & gt; & Lt; Target name = "solution-reliance" if = "release.build" & gt; & Lt; Ivy: resolution file = "ivy-rel.xml" /> & Lt; / Target & gt; & Lt; Target name = "solution" dependent = "solution-int, resol-rel" />   >   & lt; IV-Module Version = "2.0" & gt; & Lt; Info organization = "com.myspotontheweb" module = "demo" /> & Lt; Dependency & gt; & Lt; Dependency org = "commons-lang" name = "commons-lang" rev = "$ {dynamic.revision}" /> & Lt; / Dependencies & gt; & Lt; / Module from Vertical & gt;  dynamic.revision  Latest    

build.xml Integration

  & lt; Project xmlns: ivy = "antlib: org.apache.ivy.ant" name = "demo-IV" default = "solution" & gt; & Lt; Property Name = "Dynamic. Revision" Value = "Latest Integration" /> & Lt; Target name = "solution" & gt; & Lt; Ivy: Resolve / & gt; & Lt; / Target & gt; .. & lt; / Project & gt;  

A release build will then override this value, possibly from the command line as follows:

  ant -Dynamic.revision = latest.release  

Comments