When using Ivy, how do you get your IDE "code completion" to see the jar files that your build grabs via Ivy?

View: New views
4 Messages — Rating Filter:   Alert me  

When using Ivy, how do you get your IDE "code completion" to see the jar files that your build grabs via Ivy?

by Kevin Duffey-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

We are starting to use Ivy in our build scripts. We're wondering how the "initial" use of Ivy works such that, if project A depends on B, when I use Netbeans to do something like code completion on a class in B.jar, it wont initially pop up because I have not yet run my build so that Ivy can pull down B for the build to work. After the initial build, even so, if the B.jar is in some location outside my normal <project>/lib (or what have you) path, my IDE still wont see the jar to allow code completion and such to work.

So what does the Ivy community at large do about this? Do they do a "precompile" to pull down the jar dependencies? Do they specify in there project a ivy local cache to find jar files in.. (and thus, do a pre-build to pull down the dependencies so that they are there when adding the jars to the IDE project)?

Thanks.


     

RE: When using Ivy, how do you get your IDE "code completion" to see the jar files that your build grabs via Ivy?

by ruel loehr :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes.   You must at least run the build once to get the dependencies, then you refresh your ivy classpath container.

-----Original Message-----
From: Kevin Duffey [mailto:andjarnic@...]
Sent: Monday, July 07, 2008 12:25 PM
To: ivy-user@...
Subject: When using Ivy, how do you get your IDE "code completion" to see the jar files that your build grabs via Ivy?

We are starting to use Ivy in our build scripts. We're wondering how the "initial" use of Ivy works such that, if project A depends on B, when I use Netbeans to do something like code completion on a class in B.jar, it wont initially pop up because I have not yet run my build so that Ivy can pull down B for the build to work. After the initial build, even so, if the B.jar is in some location outside my normal <project>/lib (or what have you) path, my IDE still wont see the jar to allow code completion and such to work.

So what does the Ivy community at large do about this? Do they do a "precompile" to pull down the jar dependencies? Do they specify in there project a ivy local cache to find jar files in.. (and thus, do a pre-build to pull down the dependencies so that they are there when adding the jars to the IDE project)?

Thanks.



Parent Message unknown Re: When using Ivy, how do you get your IDE "code completion" to see the jar files that your build grabs via Ivy?

by Kevin Duffey-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you for the fast reply! This is what we figured we'd do as well. So everyone on the team basically when they pull out a project that uses Ivy for dependencies, does a build (dist, etc) to pull down the ivy dependencies. Question tho, do you normally set up a local cache that the dependent jars get pulled down to, then after that first build, you go into the project/properties, and point to that cache location to find the jars? The only problem that might occur with this is, and this depends on your IDE  I suppose, but we develop on windows, mac, linux and solaris. I know at least with the JSR-311 plugin that Netbeans uses, it hardcoded the absolute path to the jar files. This caused my project to not work when moving from mac to windows to develop on. If we set a project up to look at a specific local cache, I am guessing that cache directory should be inside of the project itself (not necessarily commited to say SVN or something tho), so that no
 matter what platform the project is being worked on, the project properties always use a relative path to the project root to find those jar files... does that seem correct?

Thanks again.




----- Original Message ----
From: "Loehr, Ruel" <rloehr@...>
To: "ivy-user@..." <ivy-user@...>
Sent: Monday, July 7, 2008 10:28:07 AM
Subject: RE: When using Ivy, how do you get your IDE "code completion" to see the jar files that your build grabs via Ivy?

Yes.   You must at least run the build once to get the dependencies, then you refresh your ivy classpath container.

-----Original Message-----
From: Kevin Duffey [mailto:andjarnic@...]
Sent: Monday, July 07, 2008 12:25 PM
To: ivy-user@...
Subject: When using Ivy, how do you get your IDE "code completion" to see the jar files that your build grabs via Ivy?

We are starting to use Ivy in our build scripts. We're wondering how the "initial" use of Ivy works such that, if project A depends on B, when I use Netbeans to do something like code completion on a class in B.jar, it wont initially pop up because I have not yet run my build so that Ivy can pull down B for the build to work. After the initial build, even so, if the B.jar is in some location outside my normal <project>/lib (or what have you) path, my IDE still wont see the jar to allow code completion and such to work.

So what does the Ivy community at large do about this? Do they do a "precompile" to pull down the jar dependencies? Do they specify in there project a ivy local cache to find jar files in.. (and thus, do a pre-build to pull down the dependencies so that they are there when adding the jars to the IDE project)?

Thanks.


     

RE: When using Ivy, how do you get your IDE "code completion" to see the jar files that your build grabs via Ivy?

by Fernandes, Gerard :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You need to integrate the Netbeans project classpath generation
mechanism with Ivy. If you're using a recent version of Netbeans, you'll
know that Netbeans generates an Ant build project file to build your
project. The classpath generation mechanism is part of that
auto-generated project build script. You'll have to insert an
appropriate target over-ride to integrate Ivy so that it provides your
project class-path.

I can't supply any more details than that since it's been a while since
I've used Netbeans. In Eclipse of course Ivy provides a classpath
container which integrates very well into the project build system.

-----Original Message-----
From: Kevin Duffey [mailto:andjarnic@...]
Sent: 07 July 2008 18:25
To: ivy-user@...
Subject: When using Ivy, how do you get your IDE "code completion" to
see the jar files that your build grabs via Ivy?

We are starting to use Ivy in our build scripts. We're wondering how the
"initial" use of Ivy works such that, if project A depends on B, when I
use Netbeans to do something like code completion on a class in B.jar,
it wont initially pop up because I have not yet run my build so that Ivy
can pull down B for the build to work. After the initial build, even so,
if the B.jar is in some location outside my normal <project>/lib (or
what have you) path, my IDE still wont see the jar to allow code
completion and such to work.

So what does the Ivy community at large do about this? Do they do a
"precompile" to pull down the jar dependencies? Do they specify in there
project a ivy local cache to find jar files in.. (and thus, do a
pre-build to pull down the dependencies so that they are there when
adding the jars to the IDE project)?

Thanks.


     
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

This message is intended only for the personal and confidential use of the designated recipient(s) named above.  If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited.  This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such.  All information is subject to change without notice.

LightInTheBox - Buy quality products at wholesale price