You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by "Brown, Carlton" <Ca...@compucredit.com> on 2008/02/08 19:37:37 UTC

What is the first entry point to the Ivy lifecycle?

Hi all,

 

I am trying to publish a jar to my repository for the very first time.
I am getting errors indicating that the module is not in my cache (which
it is not, because it is a brand new jar that never existed before
today.)

 

When I look at the Ivy lifecycle diagram, it seems cyclic with no entry
points other than the public repository:  

http://ant.apache.org/ivy/history/trunk/principle.html

I can see how artifacts transition between states, but not how it enters
the cache for the first time.

 

I suspect maybe it is <ivy:resolve>, but the document does not say this.
It only says that resolve retrieves dependencies.

 

What I tried is a <ivy:publish> task which is failing with this error.

java.lang.IllegalStateException: ivy file not found in cache for
ccrt#hello-A;1.0: please resolve dependencies before delivering
(ivy-cache\resolved-ccrt-hello-A-1.0.xml)

 

From this message, it seems that <publish> is trying to read some
information from the cache.  As I mentioned before, I don't see how the
artifact is populated into the cache for the first time.

 

Help appreciated, this is very frustrating.

-Carlton




-----------------------------------------
====================================================
This message contains PRIVILEGED and CONFIDENTIAL
information that is intended only for use by the 
named recipient. If you are not the named recipient,
any disclosure, dissemination, or action based on 
the contents of this message is prohibited. In such
case please notify us and destroy and delete all 
copies of this transmission.  Thank you.
====================================================

RE: What is the first entry point to the Ivy lifecycle?

Posted by "Brown, Carlton" <Ca...@compucredit.com>.
2 quick and helpful responses, thanks, but I need just a little further
clarification.   

Maybe this will explain my confusion:

Step 1:  Resolve, to get the dependencies of foo.jar
Step 2:  Build foo.jar
Step 3:  ??????  What happens here?  Must I perform yet another resolve
to add foo.jar to the cache?  
Step 4:  Publish foo.jar

-----Original Message-----
From: Shawn Castrianni [mailto:Shawn.Castrianni@halliburton.com] 
Sent: Friday, February 08, 2008 1:46 PM
To: 'ivy-user@ant.apache.org'
Subject: RE: What is the first entry point to the Ivy lifecycle?

To properly build an ivy module, you must first resolve/retrieve its
dependencies, then compile it against those dependencies, then you can
publish it.  You can call retrieve without doing a resolve, and the
resolve will be called for you.  Yes, you are right, the resolve is what
puts dependencies into the cache.

---
Shawn Castrianni
CM Lead Architect
Landmark
Halliburton Drilling, Evaluation and Digital Solutions Building 2
2101 City West Blvd.
Houston, TX  77042
Work:  713-839-3086
Cell:  832-654-0888
Fax:  713-839-2758


-----Original Message-----
From: Brown, Carlton [mailto:Carlton.Brown@compucredit.com]
Sent: Friday, February 08, 2008 12:38 PM
To: ivy-user@ant.apache.org
Subject: What is the first entry point to the Ivy lifecycle?

Hi all,



I am trying to publish a jar to my repository for the very first time.
I am getting errors indicating that the module is not in my cache (which
it is not, because it is a brand new jar that never existed before
today.)



When I look at the Ivy lifecycle diagram, it seems cyclic with no entry
points other than the public repository:

http://ant.apache.org/ivy/history/trunk/principle.html

I can see how artifacts transition between states, but not how it enters
the cache for the first time.



I suspect maybe it is <ivy:resolve>, but the document does not say this.
It only says that resolve retrieves dependencies.



What I tried is a <ivy:publish> task which is failing with this error.

java.lang.IllegalStateException: ivy file not found in cache for
ccrt#hello-A;1.0: please resolve dependencies before delivering
(ivy-cache\resolved-ccrt-hello-A-1.0.xml)



>From this message, it seems that <publish> is trying to read some
information from the cache.  As I mentioned before, I don't see how the
artifact is populated into the cache for the first time.



Help appreciated, this is very frustrating.

-Carlton




-----------------------------------------
====================================================
This message contains PRIVILEGED and CONFIDENTIAL
information that is intended only for use by the
named recipient. If you are not the named recipient,
any disclosure, dissemination, or action based on
the contents of this message is prohibited. In such
case please notify us and destroy and delete all
copies of this transmission.  Thank you.
====================================================

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and
privileged information for the sole use of the intended recipient.  Any
review, use, distribution, or disclosure by others is strictly
prohibited.  If you are not the intended recipient (or authorized to
receive information for the intended recipient), please contact the
sender by reply e-mail and delete all copies of this message.

RE: What is the first entry point to the Ivy lifecycle?

Posted by Shawn Castrianni <Sh...@halliburton.com>.
To properly build an ivy module, you must first resolve/retrieve its dependencies, then compile it against those dependencies, then you can publish it.  You can call retrieve without doing a resolve, and the resolve will be called for you.  Yes, you are right, the resolve is what puts dependencies into the cache.

---
Shawn Castrianni
CM Lead Architect
Landmark
Halliburton Drilling, Evaluation and Digital Solutions Building 2
2101 City West Blvd.
Houston, TX  77042
Work:  713-839-3086
Cell:  832-654-0888
Fax:  713-839-2758


-----Original Message-----
From: Brown, Carlton [mailto:Carlton.Brown@compucredit.com]
Sent: Friday, February 08, 2008 12:38 PM
To: ivy-user@ant.apache.org
Subject: What is the first entry point to the Ivy lifecycle?

Hi all,



I am trying to publish a jar to my repository for the very first time.
I am getting errors indicating that the module is not in my cache (which
it is not, because it is a brand new jar that never existed before
today.)



When I look at the Ivy lifecycle diagram, it seems cyclic with no entry
points other than the public repository:

http://ant.apache.org/ivy/history/trunk/principle.html

I can see how artifacts transition between states, but not how it enters
the cache for the first time.



I suspect maybe it is <ivy:resolve>, but the document does not say this.
It only says that resolve retrieves dependencies.



What I tried is a <ivy:publish> task which is failing with this error.

java.lang.IllegalStateException: ivy file not found in cache for
ccrt#hello-A;1.0: please resolve dependencies before delivering
(ivy-cache\resolved-ccrt-hello-A-1.0.xml)



>From this message, it seems that <publish> is trying to read some
information from the cache.  As I mentioned before, I don't see how the
artifact is populated into the cache for the first time.



Help appreciated, this is very frustrating.

-Carlton




-----------------------------------------
====================================================
This message contains PRIVILEGED and CONFIDENTIAL
information that is intended only for use by the
named recipient. If you are not the named recipient,
any disclosure, dissemination, or action based on
the contents of this message is prohibited. In such
case please notify us and destroy and delete all
copies of this transmission.  Thank you.
====================================================

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient.  Any review, use, distribution, or disclosure by others is strictly prohibited.  If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.

Re: What is the first entry point to the Ivy lifecycle?

Posted by Xavier Hanin <xa...@gmail.com>.
On Feb 8, 2008 7:58 PM, Brown, Carlton <Ca...@compucredit.com>
wrote:

> Xavier I did read this tutorial, but it seems to assume that the reader
> has downloaded and unzipped some source code, in particular the critical
> build.xml.  I guess I missed it, where can I get that?

All tutorials are packaged with any distribution of Ivy, in src/example, as
explained here:
http://ant.apache.org/ivy/history/latest-milestone/tutorial.html

Xavier

>
>
> -----Original Message-----
> From: Xavier Hanin [mailto:xavier.hanin@gmail.com]
> Sent: Friday, February 08, 2008 1:48 PM
> To: ivy-user@ant.apache.org
> Subject: Re: What is the first entry point to the Ivy lifecycle?
>
> Have you tried following the tutorials where a publish is involved, like
> this one:
> http://ant.apache.org/ivy/history/latest-milestone/tutorial/dependence.h
> tml
>
> This should help you see how you usually use publish. If what you want
> is
> only installing a module in your repository, the install task is better
> suited, or you can do a mere file copy.
>
> Xavier
>
> On Feb 8, 2008 7:37 PM, Brown, Carlton <Ca...@compucredit.com>
> wrote:
>
> > Hi all,
> >
> >
> >
> > I am trying to publish a jar to my repository for the very first time.
> > I am getting errors indicating that the module is not in my cache
> (which
> > it is not, because it is a brand new jar that never existed before
> > today.)
> >
> >
> >
> > When I look at the Ivy lifecycle diagram, it seems cyclic with no
> entry
> > points other than the public repository:
> >
> > http://ant.apache.org/ivy/history/trunk/principle.html
> >
> > I can see how artifacts transition between states, but not how it
> enters
> > the cache for the first time.
> >
> >
> >
> > I suspect maybe it is <ivy:resolve>, but the document does not say
> this.
> > It only says that resolve retrieves dependencies.
> >
> >
> >
> > What I tried is a <ivy:publish> task which is failing with this error.
> >
> > java.lang.IllegalStateException: ivy file not found in cache for
> > ccrt#hello-A;1.0: please resolve dependencies before delivering
> > (ivy-cache\resolved-ccrt-hello-A-1.0.xml)
> >
> >
> >
> > From this message, it seems that <publish> is trying to read some
> > information from the cache.  As I mentioned before, I don't see how
> the
> > artifact is populated into the cache for the first time.
> >
> >
> >
> > Help appreciated, this is very frustrating.
> >
> > -Carlton
> >
> >
> >
> >
> > -----------------------------------------
> > ====================================================
> > This message contains PRIVILEGED and CONFIDENTIAL
> > information that is intended only for use by the
> > named recipient. If you are not the named recipient,
> > any disclosure, dissemination, or action based on
> > the contents of this message is prohibited. In such
> > case please notify us and destroy and delete all
> > copies of this transmission.  Thank you.
> > ====================================================
>
>
>
>
> --
> Xavier Hanin - Independent Java Consultant
> http://xhab.blogspot.com/
> http://ant.apache.org/ivy/
> http://www.xoocode.org/
>



-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

Re: What is the first entry point to the Ivy lifecycle?

Posted by Christoffer Soop <li...@soop.se>.
Brown, Carlton skrev:
> Xavier I did read this tutorial, but it seems to assume that the reader
> has downloaded and unzipped some source code, in particular the critical
> build.xml.  I guess I missed it, where can I get that? 
You will find it in the folder

	apache-ivy-2.0.0-beta1/src/example/dependence

These source files are part of even the binary dist of ivy.

/Christoffer

RE: What is the first entry point to the Ivy lifecycle?

Posted by "Brown, Carlton" <Ca...@compucredit.com>.
Xavier I did read this tutorial, but it seems to assume that the reader
has downloaded and unzipped some source code, in particular the critical
build.xml.  I guess I missed it, where can I get that? 

-----Original Message-----
From: Xavier Hanin [mailto:xavier.hanin@gmail.com] 
Sent: Friday, February 08, 2008 1:48 PM
To: ivy-user@ant.apache.org
Subject: Re: What is the first entry point to the Ivy lifecycle?

Have you tried following the tutorials where a publish is involved, like
this one:
http://ant.apache.org/ivy/history/latest-milestone/tutorial/dependence.h
tml

This should help you see how you usually use publish. If what you want
is
only installing a module in your repository, the install task is better
suited, or you can do a mere file copy.

Xavier

On Feb 8, 2008 7:37 PM, Brown, Carlton <Ca...@compucredit.com>
wrote:

> Hi all,
>
>
>
> I am trying to publish a jar to my repository for the very first time.
> I am getting errors indicating that the module is not in my cache
(which
> it is not, because it is a brand new jar that never existed before
> today.)
>
>
>
> When I look at the Ivy lifecycle diagram, it seems cyclic with no
entry
> points other than the public repository:
>
> http://ant.apache.org/ivy/history/trunk/principle.html
>
> I can see how artifacts transition between states, but not how it
enters
> the cache for the first time.
>
>
>
> I suspect maybe it is <ivy:resolve>, but the document does not say
this.
> It only says that resolve retrieves dependencies.
>
>
>
> What I tried is a <ivy:publish> task which is failing with this error.
>
> java.lang.IllegalStateException: ivy file not found in cache for
> ccrt#hello-A;1.0: please resolve dependencies before delivering
> (ivy-cache\resolved-ccrt-hello-A-1.0.xml)
>
>
>
> From this message, it seems that <publish> is trying to read some
> information from the cache.  As I mentioned before, I don't see how
the
> artifact is populated into the cache for the first time.
>
>
>
> Help appreciated, this is very frustrating.
>
> -Carlton
>
>
>
>
> -----------------------------------------
> ====================================================
> This message contains PRIVILEGED and CONFIDENTIAL
> information that is intended only for use by the
> named recipient. If you are not the named recipient,
> any disclosure, dissemination, or action based on
> the contents of this message is prohibited. In such
> case please notify us and destroy and delete all
> copies of this transmission.  Thank you.
> ====================================================




-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

Re: What is the first entry point to the Ivy lifecycle?

Posted by Xavier Hanin <xa...@gmail.com>.
Have you tried following the tutorials where a publish is involved, like
this one:
http://ant.apache.org/ivy/history/latest-milestone/tutorial/dependence.html

This should help you see how you usually use publish. If what you want is
only installing a module in your repository, the install task is better
suited, or you can do a mere file copy.

Xavier

On Feb 8, 2008 7:37 PM, Brown, Carlton <Ca...@compucredit.com>
wrote:

> Hi all,
>
>
>
> I am trying to publish a jar to my repository for the very first time.
> I am getting errors indicating that the module is not in my cache (which
> it is not, because it is a brand new jar that never existed before
> today.)
>
>
>
> When I look at the Ivy lifecycle diagram, it seems cyclic with no entry
> points other than the public repository:
>
> http://ant.apache.org/ivy/history/trunk/principle.html
>
> I can see how artifacts transition between states, but not how it enters
> the cache for the first time.
>
>
>
> I suspect maybe it is <ivy:resolve>, but the document does not say this.
> It only says that resolve retrieves dependencies.
>
>
>
> What I tried is a <ivy:publish> task which is failing with this error.
>
> java.lang.IllegalStateException: ivy file not found in cache for
> ccrt#hello-A;1.0: please resolve dependencies before delivering
> (ivy-cache\resolved-ccrt-hello-A-1.0.xml)
>
>
>
> From this message, it seems that <publish> is trying to read some
> information from the cache.  As I mentioned before, I don't see how the
> artifact is populated into the cache for the first time.
>
>
>
> Help appreciated, this is very frustrating.
>
> -Carlton
>
>
>
>
> -----------------------------------------
> ====================================================
> This message contains PRIVILEGED and CONFIDENTIAL
> information that is intended only for use by the
> named recipient. If you are not the named recipient,
> any disclosure, dissemination, or action based on
> the contents of this message is prohibited. In such
> case please notify us and destroy and delete all
> copies of this transmission.  Thank you.
> ====================================================




-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

RE: What is the first entry point to the Ivy lifecycle?

Posted by "Loehr, Ruel" <rl...@pointserve.com>.
You're prob right.

The day I was trying to get it to worked I was pretty frustrated......Once I got it working, I didn't touch it.

My reply was semi-selfish as I wanted a fast critique of what I was doing.

My master plan worked.


:)





-----Original Message-----
From: Xavier Hanin [mailto:xavier.hanin@gmail.com]
Sent: Friday, February 08, 2008 12:53 PM
To: ivy-user@ant.apache.org
Subject: Re: What is the first entry point to the Ivy lifecycle?

On Feb 8, 2008 7:46 PM, Loehr, Ruel <rl...@pointserve.com> wrote:

> You need to do a resolve before you do the publish.
>
> I really struggled understanding this and getting it to work.   Below is
> my publish target.   I may be doing some unnecessary stuff....but this works
> for me.
>
>
>   <target name="ivy-publish" depends="init, ivy-setup" description="-->
> setup ivy configuration" unless="testrelease">
>
>        <!-- get a resolved ivy file in distrib/ivys -->
>        <ivy-deliver pubrevision="${VERSION}" />
>
>        <!-- resolve the file again, get everything in the cache -->
>        <ivy-resolve file="distrib/ivys/ivy-${VERSION}.xml"/>

Why do you call resolve again? This sholdn't be necessary.

Xavier

>
>
>
>
>        <ivy-publish resolver="internal" revision="${VERSION}"
> pubrevision="${VERSION}"
>            validate="true" publishivy="true" haltonmissing="false"
>            replacedynamicrev="true"
>            overwrite="true">
>        </ivy-publish>
>    </target>
>
>
> -----Original Message-----
> From: Brown, Carlton [mailto:Carlton.Brown@compucredit.com]
> Sent: Friday, February 08, 2008 12:38 PM
> To: ivy-user@ant.apache.org
> Subject: What is the first entry point to the Ivy lifecycle?
>
> Hi all,
>
>
>
> I am trying to publish a jar to my repository for the very first time.
> I am getting errors indicating that the module is not in my cache (which
> it is not, because it is a brand new jar that never existed before
> today.)
>
>
>
> When I look at the Ivy lifecycle diagram, it seems cyclic with no entry
> points other than the public repository:
>
> http://ant.apache.org/ivy/history/trunk/principle.html
>
> I can see how artifacts transition between states, but not how it enters
> the cache for the first time.
>
>
>
> I suspect maybe it is <ivy:resolve>, but the document does not say this.
> It only says that resolve retrieves dependencies.
>
>
>
> What I tried is a <ivy:publish> task which is failing with this error.
>
> java.lang.IllegalStateException: ivy file not found in cache for
> ccrt#hello-A;1.0: please resolve dependencies before delivering
> (ivy-cache\resolved-ccrt-hello-A-1.0.xml)
>
>
>
> From this message, it seems that <publish> is trying to read some
> information from the cache.  As I mentioned before, I don't see how the
> artifact is populated into the cache for the first time.
>
>
>
> Help appreciated, this is very frustrating.
>
> -Carlton
>
>
>
>
> -----------------------------------------
> ====================================================
> This message contains PRIVILEGED and CONFIDENTIAL
> information that is intended only for use by the
> named recipient. If you are not the named recipient,
> any disclosure, dissemination, or action based on
> the contents of this message is prohibited. In such
> case please notify us and destroy and delete all
> copies of this transmission.  Thank you.
> ====================================================
>



--
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

Re: What is the first entry point to the Ivy lifecycle?

Posted by Xavier Hanin <xa...@gmail.com>.
On Feb 8, 2008 7:46 PM, Loehr, Ruel <rl...@pointserve.com> wrote:

> You need to do a resolve before you do the publish.
>
> I really struggled understanding this and getting it to work.   Below is
> my publish target.   I may be doing some unnecessary stuff....but this works
> for me.
>
>
>   <target name="ivy-publish" depends="init, ivy-setup" description="-->
> setup ivy configuration" unless="testrelease">
>
>        <!-- get a resolved ivy file in distrib/ivys -->
>        <ivy-deliver pubrevision="${VERSION}" />
>
>        <!-- resolve the file again, get everything in the cache -->
>        <ivy-resolve file="distrib/ivys/ivy-${VERSION}.xml"/>

Why do you call resolve again? This sholdn't be necessary.

Xavier

>
>
>
>
>        <ivy-publish resolver="internal" revision="${VERSION}"
> pubrevision="${VERSION}"
>            validate="true" publishivy="true" haltonmissing="false"
>            replacedynamicrev="true"
>            overwrite="true">
>        </ivy-publish>
>    </target>
>
>
> -----Original Message-----
> From: Brown, Carlton [mailto:Carlton.Brown@compucredit.com]
> Sent: Friday, February 08, 2008 12:38 PM
> To: ivy-user@ant.apache.org
> Subject: What is the first entry point to the Ivy lifecycle?
>
> Hi all,
>
>
>
> I am trying to publish a jar to my repository for the very first time.
> I am getting errors indicating that the module is not in my cache (which
> it is not, because it is a brand new jar that never existed before
> today.)
>
>
>
> When I look at the Ivy lifecycle diagram, it seems cyclic with no entry
> points other than the public repository:
>
> http://ant.apache.org/ivy/history/trunk/principle.html
>
> I can see how artifacts transition between states, but not how it enters
> the cache for the first time.
>
>
>
> I suspect maybe it is <ivy:resolve>, but the document does not say this.
> It only says that resolve retrieves dependencies.
>
>
>
> What I tried is a <ivy:publish> task which is failing with this error.
>
> java.lang.IllegalStateException: ivy file not found in cache for
> ccrt#hello-A;1.0: please resolve dependencies before delivering
> (ivy-cache\resolved-ccrt-hello-A-1.0.xml)
>
>
>
> From this message, it seems that <publish> is trying to read some
> information from the cache.  As I mentioned before, I don't see how the
> artifact is populated into the cache for the first time.
>
>
>
> Help appreciated, this is very frustrating.
>
> -Carlton
>
>
>
>
> -----------------------------------------
> ====================================================
> This message contains PRIVILEGED and CONFIDENTIAL
> information that is intended only for use by the
> named recipient. If you are not the named recipient,
> any disclosure, dissemination, or action based on
> the contents of this message is prohibited. In such
> case please notify us and destroy and delete all
> copies of this transmission.  Thank you.
> ====================================================
>



-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

RE: What is the first entry point to the Ivy lifecycle?

Posted by "Loehr, Ruel" <rl...@pointserve.com>.
You need to do a resolve before you do the publish.

I really struggled understanding this and getting it to work.   Below is my publish target.   I may be doing some unnecessary stuff....but this works for me.


   <target name="ivy-publish" depends="init, ivy-setup" description="--> setup ivy configuration" unless="testrelease">

        <!-- get a resolved ivy file in distrib/ivys -->
        <ivy-deliver pubrevision="${VERSION}" />

        <!-- resolve the file again, get everything in the cache -->
        <ivy-resolve file="distrib/ivys/ivy-${VERSION}.xml"/>



        <ivy-publish resolver="internal" revision="${VERSION}" pubrevision="${VERSION}"
            validate="true" publishivy="true" haltonmissing="false"
            replacedynamicrev="true"
            overwrite="true">
        </ivy-publish>
    </target>


-----Original Message-----
From: Brown, Carlton [mailto:Carlton.Brown@compucredit.com]
Sent: Friday, February 08, 2008 12:38 PM
To: ivy-user@ant.apache.org
Subject: What is the first entry point to the Ivy lifecycle?

Hi all,



I am trying to publish a jar to my repository for the very first time.
I am getting errors indicating that the module is not in my cache (which
it is not, because it is a brand new jar that never existed before
today.)



When I look at the Ivy lifecycle diagram, it seems cyclic with no entry
points other than the public repository:

http://ant.apache.org/ivy/history/trunk/principle.html

I can see how artifacts transition between states, but not how it enters
the cache for the first time.



I suspect maybe it is <ivy:resolve>, but the document does not say this.
It only says that resolve retrieves dependencies.



What I tried is a <ivy:publish> task which is failing with this error.

java.lang.IllegalStateException: ivy file not found in cache for
ccrt#hello-A;1.0: please resolve dependencies before delivering
(ivy-cache\resolved-ccrt-hello-A-1.0.xml)



>From this message, it seems that <publish> is trying to read some
information from the cache.  As I mentioned before, I don't see how the
artifact is populated into the cache for the first time.



Help appreciated, this is very frustrating.

-Carlton




-----------------------------------------
====================================================
This message contains PRIVILEGED and CONFIDENTIAL
information that is intended only for use by the
named recipient. If you are not the named recipient,
any disclosure, dissemination, or action based on
the contents of this message is prohibited. In such
case please notify us and destroy and delete all
copies of this transmission.  Thank you.
====================================================