ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xavier MARTIN <zeflas...@gmail.com>
Subject Weird behavior with status
Date Thu, 01 Dec 2011 10:40:57 GMT
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


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" />
            <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"
    xsi:noNamespaceSchemaLocation="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"/>
        </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

    ==== local: tried

      -- artifact com.org#moduleB;latest.milestone!moduleB.src.zip(src):

      C:/repository/com.org/moduleB/revision]/moduleB.src.zip

      [0.0.5.0 (MD)] <-- this is the milestone release

      -- artifact com.org#moduleB;latest.milestone!moduleB.swc:

      C:/repository/com.org/moduleB/[revision]/moduleB.swc

      [0.0.5.0 (MD)]

    ==== public: tried


http://as-artifacts.org/content/groups/public-actionscript/com/org/moduleB/[revision]/moduleB-[revision].pom

      -- artifact com.org#moduleB;latest.milestone!moduleB.swc:


http://as-artifacts.org/content/groups/public-actionscript/com/org/moduleB/[revision]/moduleB-[revision].swc

      -- artifact com.org#moduleB;latest.milestone!moduleB.src.zip(src):


http://as-artifacts.org/content/groups/public-actionscript/com/org/moduleB/[revision]/moduleB-[revision].src.zip

    ==== domain.com: tried

      http://domain.com/com/org/moduleB/[revision]/moduleB.pom

      [0.0.1.0 (unreachable)]

      -- artifact com.org#moduleB;latest.milestone!moduleB.src.zip(src):

      http://domain.com/com/org/moduleB/[revision]/moduleB.src.zip

      [0.0.1.0 (MD)]

      -- artifact com.org#moduleB;latest.milestone!moduleB.swc:

      http://domain.com/com/org/moduleB/[revision]/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" xsi:noNamespaceSchemaLocation="
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
----------------------------------------------------------------------

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message