ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zachary Bedell <zbed...@nycourts.gov>
Subject Re: Multiple release "streams" for different JDK's?
Date Thu, 02 May 2013 16:03:16 GMT
Thanks for the suggestion, but there are two problems that break this for us I think.

First, we already use several configurations in many of the libraries in order to separate
distinct dependency groups (which ideally should be refactored to separate libraries, but...).
 For example, we have configurations such as gui, server, and webservices which allow sub-setting
the runtime dependencies depending on the client project's needs.  We also use this for separating
appserver versus client depends like: conf="build->build; client->gui; server->server,webservices"

Second, I think it's safer to build the JRE 6 & JRE 7 configurations in completely separate
processes and have the target JRE passed in as an attribute to the build environment.  I'd
be concerned about attributes of the different JRE's "leaking" if the build had to be run
twice in one pass.  As the build stands now, we'd end up with only one half of the required
artifacts.  The artifacts for the "other" JRE wouldn't be available to publish.  I'd prefer
not to make changes to the build process to build & package two completely separate artifact
sets.  Ideally running Ant with the appropriate JAVA_HOME and PATH set, plus maybe a -D of
some sort to indicate the publication destination.

Thanks again,
Zac

On May 2, 2013, at 11:43 AM, Mitch Gitman <mgitman@gmail.com> wrote:

> It seems to me this is a classic use case for Ivy confs. So your ivy.xml
> might specify:
>  <configurations>
>    <conf name="package" />
>    <conf name="java6" extends="package" />
>    <conf name="java7" extends="package" />
>    <conf name="java8" extends="package" />
>    <conf name="default" extends="java6" />
>  < configurations>
> 
>  <publications>
>    <artifact name="application-java6" type="jar" conf="java6" />
>    <artifact name="application-java7" type="jar" conf="java7" />
>    <artifact name="application-java8" type="jar" conf="java8" />
>  </publications>
> 
> This way you can have everything in the same Ivy module with the same
> version and the same branch in the same repository--because, in fact, all
> these conditions are the same for the different artifacts for different
> Java versions. Then the dependent modules' ivy.xml files would specify
> conf="MY_CONF->java6" in the dependency element. Or better yet,
> conf="MY_CONF->default". Note that default extends java6. That way you can
> change the standard version of Java consumed with a new version of your
> module without making the dependent projects know about it.


Mime
View raw message