ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shaka Tard <>
Subject Help with publish
Date Wed, 29 Jun 2011 23:14:11 GMT
I'm writing to see if anyone else is having this issue with Ivy, or whether
I am doing wrongly.  I apologize profusely, but I have not found any
satisfactory answer to my problem in any message group after extensively
researching this problem for days (not full time).

I am trying to publish an artifact to Nexus from an ANT build occurring on
Hudson, and I generally follow the following steps in my ant build (I'm not
posting full versions unless requested):

<ivy:settings id="snrm" file="${workspace.dir}/ivysettings.xml"
realm="Sonatype Nexus Repository Manager@sandbox"/>
<ivy:resolve />
<ivy:buildnumber organisation="${ivy.organisation}"

By this time, ${} has advanced to 1.0.1, and I *manually*
set a property called ${revision-number} to that new number.

Then, I have ANY copy the existing jar (ste-batch.jar) to a file named
(ste-batch-1.0.1.jar), because 1.0.0 exists in Nexus already (which works
perfectly ok when publishing something that has never existed before---I
expect that because I state the default revision to be 1.0.0 explicitly)

All of this works as expected up until here.

When I perform the publish:

        <ivy:publish revision="${revision-number}" resolver="SPE-snapshots"
update="true" settingsRef="snrm" publishIvy="true">
            <artifacts pattern="workspace/[artifact].[ext]" />
pattern="workspace/STE/work/assemble/[artifact]-[revision].[ext]" />

ANT fails with the following error:

java.lang.IllegalStateException: ivy file not found in cache for
please resolve dependencies before delivering

The file


is never created, and from my research, this occurs because I am trying to
publish a file, with the name apps-standard-batch-1.0.2.xml, that had not
been resolved yet. However, that confuses me because it is the artifact I am
trying to build, not some dependency I am trying to resolve.

The suggestion I thought might closest help me resolve this issue seems to
express the idea that I need to perform a resolve again after the new file
has been created.  However, I have tried that (and it doesn't do anything at
all, as expected), but I don't know how or why that would work unless the
new revision was somehow represented in my ivy.xml file, which it isn't, and
anyway, I'm trying to not put custom revision numbers in my ivy.xml file

I expect I am missing something elementary here, but would love to hear any
suggestions or comments.  I can provide more complete examples of the
ivysettings.xml, ivy.xml, build.xml files as requested.

Thanks very much in advance,
Shaka Tardimurthy

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