ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Parry <par...@us.ibm.com>
Subject Re: Newbie cant resolve zip files
Date Fri, 20 Jun 2008 15:18:08 GMT

Maarten,
Sure. I'll give the name space thing a try. In the meantime here is what I
tried for the type solution.

First in the ivy.xml for the module in the repo I had the following, where I
added the type attribute.

<?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 organisation="jazz.net" module="RTC-Client" revision="1.0RC5" />
<configurations>
        <conf name="default" />
</configurations>

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

</ivy-module>

Then in my ivysetting.xml file I had the filesystem resolver defined as:

			<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](-[revision])(-[type]).[ext]"
/>
			</filesystem>

But when the build runs I get the following output which shows the type as
"jar" not "Linux-local".

     [echo] Fetching Dependancies with Ivy
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
[ivy:resolve] :: resolving dependencies ::
com.ibm.stg#com.ibm.stg.wvcm.cmvc;working@jazzdev.rchland.ibm.com
[ivy:resolve] 	confs: [default]
[ivy:resolve] 	found jazz.net#RTC-Client;1.0RC5 in libraries
[ivy:resolve] :: resolution report :: resolve 118ms :: artifacts dl 9ms
	---------------------------------------------------------------------
	|                  |            modules            ||   artifacts   |
	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
	---------------------------------------------------------------------
	|      default     |   1   |   0   |   0   |   0   ||   1   |   0   |
	---------------------------------------------------------------------
[ivy:resolve] 
[ivy:resolve] :: problems summary ::
[ivy:resolve] :::: WARNINGS
[ivy:resolve] 		[NOT FOUND  ] jazz.net#RTC-Client;1.0RC5!RTC-Client.zip(jar)
(4ms)
[ivy:resolve] 	==== libraries: tried
[ivy:resolve] 	 
/usr/data/software/ivy_repo/jazz.net/RTC-Client/1.0RC5/RTC-Client-1.0RC5.zip
[ivy:resolve] 	 
/usr/data/software/ivy_repo/jazz.net/RTC-Client/1.0RC5/RTC-Client-1.0RC5-jar.zip
[ivy:resolve] 		::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] 		::              FAILED DOWNLOADS            ::
[ivy:resolve] 		:: ^ see resolution messages for details  ^ ::
[ivy:resolve] 		::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] 		:: jazz.net#RTC-Client;1.0RC5!RTC-Client.zip(jar)
[ivy:resolve] 		::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] 
[ivy:resolve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS




Maarten Coene wrote:
> 
> Mark,
> 
> you have to put that "classifier" attribute into a different namespace,
> something like this:
> 
> <ivy-module version="1.0" xmlns:my="http://my.namespace">
>  ...
> <publications>
>          <artifact name="RTC-Client" ext="zip" my:classifier="Linux-Local"
> />
> </publications>
> ...
> </ivy-module>
> 
> 
> Could you tell us also a bit more about what you tried with the type
> attribute? It should work, but maybe you've found a bug?
> 
> Maarten
> 
> 
> ----- Original Message ----
> From: Mark Parry <parrym@us.ibm.com>
> To: ivy-user@ant.apache.org
> Sent: Wednesday, June 18, 2008 11:51:07 PM
> Subject: Re: Newbie cant resolve zip files
> 
> 
> Getting closer. I created the ivy pattern as you suggested and its
> definitely
> picking that up now as its resolving to zip files. Now I'm trying to deal
> with the "Linux-local" aspect you brought up. According to the xml schema
> and the docs on the Ivy website "classifier" isn't a valid attribute for
> the
> artifact element. So I tried to resolve it by specifying a type of
> "Linux-local" and adding [type] to the artifact path. This seems to be
> getting ignored and defaulted to "jar" as well even tho I explicitly set
> it
> in the ivy.xml for the module. Unfortunately I need to different binaries
> based on the platform I'm building for so I'd prefer not to remove the
> "Linux-local" if at all possible. Any suggestions?
> 
> 
> 
> Maarten Coene wrote:
>> 
>> 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.
>> 
>> 
>>      
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Newbie-cant-resolve-zip-files-tp17808282p17992720.html
> Sent from the ivy-user mailing list archive at Nabble.com.
> 
> 
>       
> 
> 

-- 
View this message in context: http://www.nabble.com/Newbie-cant-resolve-zip-files-tp17808282p18031792.html
Sent from the ivy-user mailing list archive at Nabble.com.


Mime
View raw message