ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zharvey <>
Subject Re: ivy:publish build error
Date Thu, 15 Sep 2011 13:29:33 GMT

Hi Kirby,

Thanks for getting back to me so quickly.

Here's my settings file (ivy-settings.xml):
	<properties file=""/>
    <settings defaultResolver="defResolver"/>
        <chain name="defResolver" returnFirst="true">
         	<url name="jarServer">
    	<module organisation="myOrg" name="*" resolver="defResolver"/>

And my ivy file (ivy.xml):
<?xml version="1.0" encoding="UTF-8"?>  
<ivy-module version="2.0"  
    <info organisation="myOrg" module="MyModule" />  
        <conf name="compile" description="used for building" />  
        <conf name="publish" description="used for publishing" />  
    <publications defaultconf="publish">
		<artifact name="MyModule" />
        <dependency org="apache" name="commons-cli" rev="1.2"

And the ivy portions of my buildscript (build.xml - way too long to put the
whole thing in here):
<project name="LoaderServiceLoadTester" default="dist" basedir="."
	<!-- Ivy task definitions --> 
	<taskdef name="ivy-configure" classname="org.apache.ivy.ant.IvyConfigure"/>
	<taskdef name="ivy-resolve" classname="org.apache.ivy.ant.IvyResolve"/>
	<taskdef name="ivy-retrieve" classname="org.apache.ivy.ant.IvyRetrieve"/>
	<taskdef name="ivy-cleancache"
	<taskdef name="ivy-publish" classname="org.apache.ivy.ant.IvyPublish"/>
	<!-- Identify the Ivy settings file to use -->

	<!-- Ivy "resolve" task; resolve all project dependencies and cache them
	<target name="resolve">
		<ivy:configure host=""
		<ivy:resolve file="ivy.xml" conf="compile"/>
		<ivy:retrieve pattern="dist/[artifact]-[revision].[ext]" conf=compile"/>
	<!-- Ivy "cleancache" task; to be used with caution. Flushes local cache
completely -->
	<target name="clean-ivy-cache">
	<!-- Ivy "publish" task; publish the distribution to SVN for downstream
projects --> 
	<target name="publish">
		<ivy:publish organisation="myOrg" module="MyModule" resolver="defResolver"
			<artifacts pattern="dist/[artifact]-[revision].[ext]"/>

Hope this helps with a diagnosis...and thanks again for taking the time to
look at my problem!

Kirby Files wrote:
> zharvey wrote on 09/15/2011 09:07 AM:
>> I'm trying to get a project up and running using Ivy for the first time
>> ever.
>> I'm working on ivy:publish and getting an IllegalStateException stating:
>> ivy file not found in cache for myOrg#myModule;1.0: please resolve
>> dependencies before delivering
>> (C:\Users\MyUser\.ivy2\cache\resolved-myOrg-myModule-1.0.xml)
> It sounds like you aren't doing the resolve in the same ant run as the 
> publish, perhaps. Generally, a publish task should be preceded by an 
> ivy:settings and an ivy:resolve call.
>> Essentially, I want that JAR to get published to a "pubRepo" repository
>> that
>> I define in my settings file. I'm just so overwhelmed by so many
>> variables,
>> I don't even know where to start the debugging process.
>> Does anybody have any ideas as to what is happening here?
> The best thing to do when you have specific troubleshooting questions 
> is to attach your ivy-settings.xml, ivy.xml, build.xml, and any logs.
> Thanks,
> ---
> Kirby Files
> Software Architect
> Masergy Communications

View this message in context:
Sent from the ivy-user mailing list archive at

View raw message