GayaBalan / ivybeans

Automatically exported from code.google.com/p/ivybeans
0 stars 0 forks source link

Fail to resolve dependencies when using IvySvn resolver #66

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Environment : ivybeans 1.1, netbeans 6.8, Windows 7 , jdk 6

Description :

I am having some trouble using the IvySvn resolver with IvyBeans.
Basically, my Ivy settings file includes this line:

<typedef name="svn" classname="fm.last.ivy.plugins.svnresolver.SvnResolver"/>

and then declares an IvySvn resolver. On project load, in the output window
I get:

Resolving COMPILE scope ...
:: loading settings :: url = file:/C:/Projects/ivysettings/ivysettings.xml

then nothing.

Building the project using ant on the command line, with the same Ivy
settings does succeed however.

If I change my settings to use the filesystem resolver (and having checked
out the respository from svn), then the resolve succeeds.

From what I can make out, this problem is due to the IvySvn jar not being
in the IvyBeans module classpath.

Is there an easy way to add the jar to the classpath used by IvyBeans?

Original issue reported on code.google.com by d...@omnifone.com on 22 Apr 2010 at 1:44

GoogleCodeExporter commented 9 years ago
Unfortuntaley I do not see an easy turn around for that issue. AFAIK, the only 
way to 
deal with this issue is to add the ivysvn jar in the ivy-libs module.

Sorry for that.

Laurent.

Original comment by laurent....@gmail.com on 22 Apr 2010 at 1:53

GoogleCodeExporter commented 9 years ago
Ah ok. Just to check, I was correct with my assumption that the reason IvyBeans 
fails
to resolve dependencies on project load is due to the lack of the IvySvn jar?

Thanks,

David

Original comment by d...@omnifone.com on 22 Apr 2010 at 2:00

GoogleCodeExporter commented 9 years ago
Hi,

I am having this problem as well. As a really dirty fix, I just tweaked the 
Class-Path in the manifest in   
%USERPROFILE%\.netbeans\6.9\modules\com-googlecode-ivybeans-libs.jar

to

Class-Path: ext/ivy-2.0.0.jar ext/jsch-0.1.31.jar ext/ant-contrib-1.0b
 3.jar ext/ivysvnresolver.jar ext/svnkit.jar ext/trilead.jar

and added the 3 ivysvn jars to the ext directory and it fixed the issue for me. 

So 1. That is definitely the reason for the lock up.

2. How can ivybeans be set up to add custom resolvers?

I might have a go at building ivybeans from source with those jars added, 
because I don't really want to hack all our developers' netbeans installation 
to fix that problem.

Original comment by bruce.ch...@gmail.com on 27 Jul 2010 at 11:27

GoogleCodeExporter commented 9 years ago
The question becomes : how to dynamically load a library module ?

And indeed, build Ivybeans from the source with ivysvn libs is the best 
solution for now.

Original comment by laurent....@gmail.com on 29 Jul 2010 at 9:45

GoogleCodeExporter commented 9 years ago
The answer just cropped up on the nbdev mailing list

http://netbeans.org/projects/www/lists/nbdev/archive/2010-08/message/35

Using a URLClassLoader we could probably load ivy itself this way from the 
configured ivy location (not ship it in ivybeans), and do it in such a way that 
ivy plugins get found as well. This would make it easier for users to upgrade 
ivy without ivybeans needing to be re-released.

Original comment by bruce.ch...@gmail.com on 23 Aug 2010 at 9:20

GoogleCodeExporter commented 9 years ago
Good idea and it deserves its own issue !

Original comment by laurent....@gmail.com on 23 Aug 2010 at 1:16

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
It turns out that Ivy has its own mechanism for specifying additional jar 
files. Use that mechanism to tell ivy about all the jars in a directory which 
can be configurable as an option. We DO NOT need to write our own classloader. 
(I tried and it was horrible and didn't work) Just hook into Ivy's existing 
mechanism.

Original comment by bruce.ch...@gmail.com on 1 Sep 2010 at 2:10

GoogleCodeExporter commented 9 years ago
297 Wed Sep 01 14:25:15 NZST 2010   brucechapman@paradise.net.nz
[issue 66] add a preference setting to optionally contain a directory. That 
directory will have all its jar files added to Ivy's classloader for loading 
Ivy extensions such as IvySvn.

There is no UI in this commit, but if you set the preferences manually (regedit 
etc) then it works. UI changes are coming in a later commit.

298 Wed Sep 01 14:30:41 NZST 2010   brucechapman@paradise.net.nz
issue 66. Add a GUI to support the preference directory for Ivy to look in for 
Ivy extensions such as IvySvn.

Original comment by bruce.ch...@gmail.com on 1 Sep 2010 at 2:35