ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maarten Coene <maarten_co...@yahoo.com>
Subject Re: Newbie cant resolve zip files
Date Thu, 12 Jun 2008 21:49:38 GMT
I think your problem is caused because you don't have defined a pattern for your ivy files
in your filesystem resolver settings.
According to your example, it should be something like this:

<filesystem name="libraries">
    <ivy pattern="${ivy.module.repo}/[organization]/[module]/[revision]/ivy.xml" />
    <artifact pattern="${ivy.module.repo}/[organization]/[module]/[revision]/[artifact](-[revision]).[ext]"/>
    <artifact pattern="${ivy.module.repo}/[organization]/[module]/[revision]/[artifact]-[type].[ext]"
/>
    <artifact pattern="${ivy.module.repo}/[organization]/[module]/[revision]/[type]/[artifact].[ext]"
/>                
</filesystem>

If you don't specify an ivy pattern, Ivy will assume there is no Ivy file available for that
module and will create a default one. The default one has 1 publication: a jar with the same
name and version of the module, RTC-Client-1.0RC5 in your case.

Another problem will be the "Linux-Local" part after the revision in the name of your zip
file. You should either remove it, or use extra attributes in your ivy files and patterns.
Something like this:

- modify your patterns:

<filesystem name="libraries">
    <ivy pattern="${ivy.module.repo}/[organization]/[module]/[revision]/ivy.xml" />
    <artifact pattern="${ivy.module.repo}/[organization]/[module]/[revision]/[artifact](-[revision])(-[classifier]).[ext]"/>
    <artifact pattern="${ivy.module.repo}/[organization]/[module]/[revision]/[artifact]-[type].[ext]"
/>
    <artifact pattern="${ivy.module.repo}/[organization]/[module]/[revision]/[type]/[artifact].[ext]"
/>                
</filesystem>

- modify your ivy.xml file:

<publications>
        <artifact name="RTC-Client" ext="zip" classifier="Linux-Local" />
</publications>


hope this helps you out.

Maarten


----- Original Message ----
From: Mark Parry <parrym@us.ibm.com>
To: ivy-user@ant.apache.org
Sent: Thursday, June 12, 2008 10:07:48 PM
Subject: Newbie cant resolve zip files


Not sure where to start. I guess first off I'm using Ivy-2.0.0-beta2. I did a
"hello world" where I had the ivy jar files as a module in my local file
system. From my ant build, when I did a ivy:resolve it found it and placed
it in my cache just fine. Now I'm trying to use ivy to resolve a zip file
dependancy and it simply wont do it. All it seems to want to look for are
jar files.  For instance from my latest build log:

[ivy:resolve] :: problems summary ::
[ivy:resolve] :::: WARNINGS
[ivy:resolve]         module not found: jazz.net#RTC-Client;1.0RC5
[ivy:resolve]     ==== libraries: tried
[ivy:resolve]       -- artifact jazz.net#RTC-Client;1.0RC5!RTC-Client.jar:
[ivy:resolve]     
/usr/data/software/ivy_repo/jazz.net/RTC-Client/1.0RC5/RTC-Client-1.0RC5.jar
[ivy:resolve]     
/usr/data/software/ivy_repo/jazz.net/RTC-Client/1.0RC5/RTC-Client-jar.jar
[ivy:resolve]     
/usr/data/software/ivy_repo/jazz.net/RTC-Client/1.0RC5/jar/RTC-Client.jar

The filename I'm ultimately trying to resolve to is:
RTC-Client-1.0RC5-Linux-Local.zip
That file is located in my repository at:
[root@jazzdev 1.0RC5]# ls -l && pwd
total 302556
-rw-r--r--  1 root root       414 Jun 12 13:39 ivy.xml
-rwxr-xr-x  1 root root 309503881 Jun 12 10:18
RTC-Client-1.0RC5-Linux-Local.zip
/usr/data/software/ivy_repo/jazz.net/RTC-Client/1.0RC5

The ivy.xml file in that dir
(/usr/data/software/ivy_repo/jazz.net/RTC-Client/1.0RC5) contains:
<?xml version="1.0" encoding="UTF-8"?>
<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 organization-"jazz.net" module="RTC-Client" revision="1.0RC5" />
<configurations>
        <conf name="default" />
</configurations>

<publications>
        <artifact name="RTC-Client" ext="zip" />
</publications>

</ivy-module>


In my ANT build.xml file that I use, I do the following to initiate the
resolving of 
    <target name="fetchDependancies" description="Download dependancies">
        <ivy:resolve file="./com.ibm.stg.wvcm.cmvc.feature.build/ivy.xml"
type="zip"/>
    </target>

The referenced ivy.xml from that ANT target contains:
<ivy-module version="2.0">
    <info organisation="com.ibm.stg" module="com.ibm.stg.wvcm.cmvc"/>
    <dependencies>
        <dependency org="jazz.net" name="RTC-Client" rev="1.0RC5" />
    </dependencies>
</ivy-module>

My ivysettings.xml file is getting found by ivy as this is in my latest
build log:
No ivy:settings found for the default reference 'ivy.instance'.  A default
instance will be used
     [null] :: Ivy 2.0.0-beta2 - 20080225093827 ::
http://ant.apache.org/ivy/ ::
     [null] :: loading settings :: file =
/opt/IBM/JazzTeamServer/buildsystem/ivy/ivysettings.xml

The contents of that ivysettings.xml file is:
<ivysettings>
    <settings defaultResolver="chained" />
    <caches>
          <cache name="default" basedir="${ivy.cache}" />
      </caches>
    <resolvers>
        <chain name="chained" returnFirst="true">
            <filesystem name="libraries">
                <artifact
pattern="${ivy.module.repo}/[organization]/[module]/[revision]/[artifact](-[revision]).[ext]"
/>
                <artifact
pattern="${ivy.module.repo}/[organization]/[module]/[revision]/[artifact]-[type].[ext]"
/>
                <artifact
pattern="${ivy.module.repo}/[organization]/[module]/[revision]/[type]/[artifact].[ext]"
/>                
            </filesystem>
        </chain> 
    </resolvers>
</ivysettings>

At this point I'm at a loss as to what I have wrong. Any suggestions? 
-- 
View this message in context: http://www.nabble.com/Newbie-cant-resolve-zip-files-tp17808282p17808282.html
Sent from the ivy-user mailing list archive at Nabble.com.


      

Mime
View raw message