Hello Kirby,

Thanks for the answer, but it's still not working.
I have slim down my ant and my ivy to the bare minimum ( I think ) but
still the behavior is the same.
Only the last status of the statuses will be resolved, not the other ones.

I have updated the wuestion on stackoverflow to be more consise, with
simple ant and ivy files (no varaiables, ... )
I still can't get the latest milestone or release :/

Thanks for any help you can provide...
----------------------------------------------------------------------
Xavier MARTIN aka zeflasher or xxlm
Visit my website if you love flash:
http://www.webbymx.net
http://dev.webbymx.net
----------------------------------------------------------------------


On Fri, Dec 2, 2011 at 9:01 AM, Kirby Files <kfi...@masergy.com> wrote:

> Here's what I said at stackoverflow:
>
> Wow, that looks like a very strange overloading of the dependency
> construct. I would stick with a simpler ivy.xml, with a single dependency
> upon moduleB. Just change the rev attribute at runtime using a property
> file. That is, coalesce all of your dependencies into:
>
>   <dependency org="com.org" name="moduleB" rev="${dependency.rev.moduleB}*
> *"
>
> conf="build-release->default;**build-milestone->default;**
> build-devs->default">
>
>            <artifact name="shared" type="swc" ext="swc" />
>            <artifact name="shared" type="src" ext="src.zip" />
>   </dependency>
>
> You can even supply a default value to the property (for IvyDE, for
> example) in your ivy-settings.xml:
>
> <property name="dependency.rev.moduleB"
>          value="latest.integration"
>          override="false"/>
>
> Thanks,
> ---
> Kirby Files
> Software Architect
> Masergy Communications
> kfi...@masergy.com
>
>
> Xavier MARTIN wrote on 12/01/2011 05:40 AM:
>
>  Hello,
>>
>> I'm relatively new to IVY and have been playing with it successfully the
>> past 2 months.
>> Few days ago I had the need of using configurations and statuses in my ivy
>> files.
>>
>> I've expected a weird behavior, or probably haven't set up the things the
>> right way.
>> To make it fast, it seems that IVY will only be able to find artifacts for
>> the last status of the statuses.
>> It doesn't matter if I use custom ones or the default ones.
>>
>> For instance for the default ones, it will find artifact witht the
>> integration status but not the milestone or release ones.
>>
>>
>> Now the details (copied from stackoverflow where I've asked the question
>> also)
>> http://stackoverflow.com/**questions/8336843/using-**
>> status-in-ivy-works-for-the-**less-stable-one-ie-**integration-not-for-t<http://stackoverflow.com/questions/8336843/using-status-in-ivy-works-for-the-less-stable-one-ie-integration-not-for-t>
>>
>>
>> I am trying desperately to have this working. I've spent the whole day on
>> it and can't find what's wrong.
>>
>> What I want to achieve is using different artifact depending on the
>> configuration used. The configuration are build-release, build-milestone
>> and build-devs.
>>
>> Here is my ivysettings.xml file
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <ivysettings>
>>     <property name="upload.url" value="http://domain.com"; />
>>
>>     <credentials
>>         host="domain.com"
>>         realm="Sonatype Nexus Repository Manager"
>>         username="deployment"
>>         passwd="deployment"
>>     />
>>
>>     <settings defaultResolver="main" />
>>
>>     <resolvers>
>>         <chain name="main" returnFirst="false">
>>             <filesystem
>>                 name="local"
>>                 checkmodified="true">
>>                 <artifact
>> pattern="${repository.dir}/[**organisation]/[module]/[**
>> revision]/[artifact].[ext]"
>> />
>>             </filesystem>
>>             <ibiblio name="public" m2compatible="true" root="
>> http://as-artifacts.org/**content/groups/public-**actionscript<http://as-artifacts.org/content/groups/public-actionscript>"
>> />
>>             <ibiblio
>>                 name="sonar6"
>>                 m2compatible="true"
>>                 root="http://domain.com";
>>
>> pattern="[organisation]/[**module]/[revision]/[artifact].**[ext]" />
>>         </chain>
>>         <url name="publishing" m2compatible="true">
>>             <artifact
>> pattern="${upload.url}/[**organisation]/[module]/[**
>> revision]/[artifact].[ext]"
>> />
>>         </url>
>>     </resolvers>
>> </ivysettings>
>>
>> and here is my ivy.xml file
>>
>> <ivy-module
>>     version="2.0"
>>     
>> xmlns:xsi="http://www.w3.org/**2001/XMLSchema-instance<http://www.w3.org/2001/XMLSchema-instance>
>> "
>>     xsi:noNamespaceSchemaLocation=**"http://ant.apache.org/ivy/**
>> schemas/ivy.xsd <http://ant.apache.org/ivy/schemas/ivy.xsd>
>> "
>>
>>>
>>>
>>     <info
>>         organisation="com.org"
>>         module="amodule"
>>         status="integration"
>>     />
>>
>>     <configurations>
>>         <conf name="build-release" description="Dependencies used for
>> release (remote dependencies, status release)"/>
>>         <conf name="build-milestone" description="Dependencies used for
>> test (remote dependencies, status milestone)" />
>>         <conf name="build-devs" description="Dependencies used for
>> development (local/remote dependencies, status integration)" />
>>     </configurations>
>>
>>     <publications>
>>         <artifact type="swf" ext="swf" />
>>         <artifact type="src" ext="src.zip" />
>>     </publications>
>>
>>     <dependencies>
>> <!-- Default dependencies -->
>>     <!-- Tink flex spark update, stored on google code-->
>>         <dependency org="ws.tink" name="flex4_spark" rev="1">
>>            <artifact name="tweenlite" type="swc" ext="swc" url="
>> http://tink.googlecode.com/**files/tink_flex4_spark.swc<http://tink.googlecode.com/files/tink_flex4_spark.swc>
>> "/>
>>         </dependency>
>>
>>     <!-- Tweenlite -->
>>         <dependency org="com.greensock.as3" name="tweenlite" rev="11.691">
>>            <artifact name="tweenlite" type="swc" ext="swc" />
>>            <artifact name="tweenlite" type="src" ext="src.zip" />
>>         </dependency>
>>
>> <!-- Specific dependencies depending on build (integration, milestone or
>> release -->
>> <!-- DEVELOPMENT -->
>>     <!-- moduleB -->
>>         <dependency org="com.org" name="moduleB" rev="latest.integration"
>> changing="true" conf="build-devs->default">
>>             <artifact name="shared" type="swc" ext="swc" />
>>             <artifact name="shared" type="src" ext="src.zip" />
>>         </dependency>
>>
>>
>> <!-- INTEGRATION (IE TESTING)-->
>>     <!-- moduleB -->
>>         <dependency org="com.org" name="moduleB" rev="latest.milestone"
>> changing="true" conf="build-milestone->**default">
>>             <artifact name="shared" type="swc" ext="swc" />
>>             <artifact name="shared" type="src" ext="src.zip" />
>>         </dependency>
>>
>> <!-- RELEASE -->
>>     <!-- moduleB -->
>>         <dependency org="com.org" name="moduleB" rev="latest.release"
>> conf="build-release->default">
>>             <artifact name="shared" type="swc" ext="swc" />
>>             <artifact name="shared" type="src" ext="src.zip" />
>>         </dependency>
>>     </dependencies>
>> </ivy-module>
>>
>> So as you can see depending on the configuration used, different version
>> of
>> the moduleB will be used. This is because the build script is run by: -
>> developers - autobuild (for testing) - autobuild (for release) A flag is
>> set in ant to tell which conf to use.
>>
>> Now, if the conf used is build-devs, meaning using the latest.integration
>> revision for moduleB it will work and download it. If the conf
>> build-milestone is used so get the moduleB using latest.milestone
>> revision,
>> the artifact won't be found, although listed
>>
>> :: problems summary ::
>> :::: WARNINGS
>>         module not found: 
>> com.org#moduleB;latest.**milestone<http://com.org#moduleB;latest.milestone>
>>
>>     ==== local: tried
>>
>>       -- artifact 
>> com.org#moduleB;latest.**milestone!moduleB.src.zip(src)<http://com.org#moduleB;latest.milestone%21moduleB.src.zip%28src%29>
>> **:
>>
>>       
>> C:/repository/com.org/moduleB/**revision]/moduleB.src.zip<http://com.org/moduleB/revision%5D/moduleB.src.zip>
>>
>>       [0.0.5.0 (MD)]<-- this is the milestone release
>>
>>       -- artifact 
>> com.org#moduleB;latest.**milestone!moduleB.swc<http://com.org#moduleB;latest.milestone%21moduleB.swc>
>> :
>>
>>       
>> C:/repository/com.org/moduleB/**[revision]/moduleB.swc<http://com.org/moduleB/%5Brevision%5D/moduleB.swc>
>>
>>       [0.0.5.0 (MD)]
>>
>>     ==== public: tried
>>
>>
>> http://as-artifacts.org/**content/groups/public-**
>> actionscript/com/org/moduleB/[**revision]/moduleB-[revision].**pom<http://as-artifacts.org/content/groups/public-actionscript/com/org/moduleB/%5Brevision%5D/moduleB-%5Brevision%5D.pom>
>>
>>       -- artifact 
>> com.org#moduleB;latest.**milestone!moduleB.swc<http://com.org#moduleB;latest.milestone%21moduleB.swc>
>> :
>>
>>
>> http://as-artifacts.org/**content/groups/public-**
>> actionscript/com/org/moduleB/[**revision]/moduleB-[revision].**swc<http://as-artifacts.org/content/groups/public-actionscript/com/org/moduleB/%5Brevision%5D/moduleB-%5Brevision%5D.swc>
>>
>>       -- artifact 
>> com.org#moduleB;latest.**milestone!moduleB.src.zip(src)<http://com.org#moduleB;latest.milestone%21moduleB.src.zip%28src%29>
>> **:
>>
>>
>> http://as-artifacts.org/**content/groups/public-**
>> actionscript/com/org/moduleB/[**revision]/moduleB-[revision].**src.zip<http://as-artifacts.org/content/groups/public-actionscript/com/org/moduleB/%5Brevision%5D/moduleB-%5Brevision%5D.src.zip>
>>
>>     ==== domain.com: tried
>>
>>       
>> http://domain.com/com/org/**moduleB/[revision]/moduleB.pom<http://domain.com/com/org/moduleB/%5Brevision%5D/moduleB.pom>
>>
>>       [0.0.1.0 (unreachable)]
>>
>>       -- artifact 
>> com.org#moduleB;latest.**milestone!moduleB.src.zip(src)<http://com.org#moduleB;latest.milestone%21moduleB.src.zip%28src%29>
>> **:
>>
>>       
>> http://domain.com/com/org/**moduleB/[revision]/moduleB.**src.zip<http://domain.com/com/org/moduleB/%5Brevision%5D/moduleB.src.zip>
>>
>>       [0.0.1.0 (MD)]
>>
>>       -- artifact 
>> com.org#moduleB;latest.**milestone!moduleB.swc<http://com.org#moduleB;latest.milestone%21moduleB.swc>
>> :
>>
>>       
>> http://domain.com/com/org/**moduleB/[revision]/moduleB.swc<http://domain.com/com/org/moduleB/%5Brevision%5D/moduleB.swc>
>>
>>       [0.0.1.0 (MD)]
>>
>> This is the ivy.xml in my local repository
>> (C:\repository\com.sonar6.**thor\shared\0.0.5.0)
>>
>> <ivy-module version="2.0" xmlns:xsi="
>> http://www.w3.org/2001/**XMLSchema-instance<http://www.w3.org/2001/XMLSchema-instance>"
>> xsi:noNamespaceSchemaLocation=**"
>> http://ant.apache.org/ivy/**schemas/ivy.xsd<http://ant.apache.org/ivy/schemas/ivy.xsd>
>> ">
>>
>>     <info organisation="com.org" module="moduleB" revision="0.0.5.0"
>> status="milestone" publication="20111201174403"/>
>>
>>     <configurations>
>>         <conf name="build-release" description="Dependencies used for
>> release (remote dependencies, status release)"/>
>>         <conf name="build-milestone" description="Dependencies used for
>> test (remote dependencies, status milestone)"/>
>>         <conf name="build-devs" description="Dependencies used for
>> development (local/remote dependencies, status integration)"/>
>>     </configurations>
>>
>>     <publications>
>>         <artifact type="swc" ext="swc"/>
>>         <artifact type="src" ext="src.zip"/>
>>     </publications>
>>
>>     <dependencies>
>> <!-- Default dependencies -->
>>     <!-- Flash Console -->
>>         <dependency org="com.junkbyte" name="Console" rev="2.51">
>>            <artifact name="Console" type="swc" ext="swc"/>
>>            <artifact name="Console" type="src" ext="src.zip"/>
>>         </dependency>
>>
>>     <!-- Robotlegs -->
>>         <dependency org="org.robotlegs" name="robotlegs-framework"
>> rev="1.4.0">
>>             <artifact name="robotlegs-framework" type="swc" ext="swc"/>
>>             <artifact name="robotlegs-framework" type="src"
>> ext="src.zip"/>
>>         </dependency>
>>
>>     <!-- Signals -->
>>         <dependency org="org.osflash" name="as3-signals" rev="0.8">
>>             <artifact name="as3-signals" type="swc" ext="swc"/>
>>             <artifact name="as3-signals" type="src" ext="src.zip"/>
>>         </dependency>
>>
>>     <!-- Signal extension for Robotleg -->
>>         <dependency org="org.robotlegs.plugins"
>> name="signals-extension-**command" rev="0.5">
>>            <artifact name="signals-extension-**command" type="swc"
>> ext="swc"/>
>>            <artifact name="signals-extension-**command" type="src"
>> ext="src.zip"/>
>>         </dependency>
>>
>>     </dependencies>
>> </ivy-module>
>>
>> Now the FUN PART! Before using the defaults statuses from IVY I used mine.
>> It had the exact same behavior (that's why I tried the defaults one then).
>> The fun bits is that if I had
>>
>> <statuses default="status-dev">
>>     <status name="status-stable" integration="false"/>
>>     <status name="status-test" integration="false"/>
>>     <status name="status-dev" integration="true" />
>> </statuses>
>>
>> The only latest.[status] working will be for status-dev. Now if I change
>> the status order to
>>
>> <statuses default="status-dev">
>>     <status name="status-stable" integration="false"/>
>>     <status name="status-dev" integration="true" />
>>     <status name="status-test" integration="false"/>
>> </statuses>
>>
>> The only one working will be status-test.
>>
>> So I wonder if I'm hitting a bug in IVY, but I think I probably have done
>> something wrong.
>> I'm using ant 1.8.0 and IVY 2.2.0 with JDK 1.6.0
>>
>> Thanks for any help you could provide :)
>>
>> Xavier
>>
>>
>>
>> ------------------------------**------------------------------**
>> ----------
>> Xavier MARTIN aka zeflasher or xxlm
>> Visit my website if you love flash:
>> http://www.webbymx.net
>> http://dev.webbymx.net
>> ------------------------------**------------------------------**
>> ----------
>>
>
>

Reply via email to