You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Andreas Schläpfer <An...@crealogix.com> on 2009/03/13 22:29:46 UTC
Actions based on resolved (extended) configurations
How can I write an Ant-task that does some action based on what configurations
I have resolved including extended configurations?
Let's assume I have the following configurations in ivy.xml:
<conf name="defaultConf" extends="conf1,conf2" />
<conf name="conf1" />
<conf name="conf2" />
and the configuration on the resolve task is not set, I get the following
property:
ivy.resolved.configurations=defaultConf, conf1, conf2
I'd use the property ivy.resolved.configurations to trigger a configuration
dependant action. If the property contains conf1 action1 could be triggered,
if conf2 action2 could be triggered. So far so good.
When I specify conf="defaultConf" on the resolve task, I get:
ivy.resolved.configurations=defaultConf
As far as I can see it's not possible to find out which configurations
defaultConf extends. How can I find out what configurations are resolved
including extended configurations? I'd expect defaultConf, conf1, conf2 in
some property.
Am I missing something or is there possibly a completely other approach to the
problem?
Thanks!
Andreas
RE: Actions based on resolved (extended) configurations
Posted by Andreas Schläpfer <An...@crealogix.com>.
Trying to keep the question simpler: If I want to do something in an Ant target depending on
the previously resolved configuration(s). How would I do that?
The approach should support extended configurations (see below) so I can't use the value in ivy.resolved.configurations.
Thanks!
-----Original Message-----
From: Andreas Schläpfer [mailto:Andreas.Schlaepfer@crealogix.com]
Sent: Freitag, 13. März 2009 22:30
To: ivy-user@ant.apache.org
Subject: Actions based on resolved (extended) configurations
How can I write an Ant-task that does some action based on what
configurations
I have resolved including extended configurations?
Let's assume I have the following configurations in ivy.xml:
<conf name="defaultConf" extends="conf1,conf2" />
<conf name="conf1" />
<conf name="conf2" />
and the configuration on the resolve task is not set, I get the following
property:
ivy.resolved.configurations=defaultConf, conf1, conf2
I'd use the property ivy.resolved.configurations to trigger a configuration
dependant action. If the property contains conf1 action1 could be triggered,
if conf2 action2 could be triggered. So far so good.
When I specify conf="defaultConf" on the resolve task, I get:
ivy.resolved.configurations=defaultConf
As far as I can see it's not possible to find out which configurations
defaultConf extends. How can I find out what configurations are resolved
including extended configurations? I'd expect defaultConf, conf1, conf2 in
some property.
Am I missing something or is there possibly a completely other approach to
the
problem?
Thanks!
Andreas