Ivy plugin, anyone want to take over?

I've got the Ivy plugin most of the way there, I think. It creates project libraries and applies them to the correct modules based on the Ivy configuration (thanks very much Christian for the example code!). It needs some touchups to the UI and definitely some work around managing the libraries. The biggest initial hurdle is that the library jar references end up being of the form:

file://path/to/library.jar

whereas the ones created via the settings are of the form:

jar://path/to/library.jar!

so the ones the ivy plugin creates are not actually adding to the classpath for some reason. I'm not sure why this is, as the method to register the classes just takes a VirtualFile, and the VirtualFileManager doesn't seem to like trying to create a VirtualFile with a jar:// prefix, and the VirtualFile I'm passing it is a valid file (jarVirtualFile.isValid() is true).

Anyway, I haven't had a lot of time to play with this over the last couple of weeks, and I'm probably not going to have a lot more time soon, so does someone else want to finish this up? Email me at jcarreira@gmail.com and I can send it to you... Maybe if more than one person is interested then someone can set up a version control repo...

0
10 comments

You can add your code here (https://intellij-idea-plugins.dev.java.net/) if
you'd like and maybe someone will take it over.

"Jason Carreira" <jcarreira@gmail.com> wrote in message
news:23820564.1118692749466.JavaMail.itn@is.intellij.net...

I've got the Ivy plugin most of the way there, I think. It creates project
libraries and applies them to the correct modules based on the Ivy
configuration (thanks very much Christian for the example code!). It needs
some touchups to the UI and definitely some work around managing the
libraries. The biggest initial hurdle is that the library jar references
end up being of the form:

>

file://path/to/library.jar

>

whereas the ones created via the settings are of the form:

>

jar://path/to/library.jar!

>

so the ones the ivy plugin creates are not actually adding to the
classpath for some reason. I'm not sure why this is, as the method to
register the classes just takes a VirtualFile, and the VirtualFileManager
doesn't seem to like trying to create a VirtualFile with a jar:// prefix,
and the VirtualFile I'm passing it is a valid file
(jarVirtualFile.isValid() is true).

>

Anyway, I haven't had a lot of time to play with this over the last couple
of weeks, and I'm probably not going to have a lot more time soon, so does
someone else want to finish this up? Email me at jcarreira@gmail.com and I
can send it to you... Maybe if more than one person is interested then
someone can set up a version control repo...



0

I would if it weren't licensed GPL... I'm not a fan of GPL. If it were Apache I'd put it in there.

You can add your code here
(https://intellij-idea-plugins.dev.java.net/) if
you'd like and maybe someone will take it over.



0

Hi,

You'd get adequate URL via following sample code:
libraryModel.addRoot(
VirtualFileManager.constructUrl(JarFileSystem.PROTOCOL,
directory.getPath() + "/struts.jar" + JarFileSystem.JAR_SEPARATOR),
OrderRootType.CLASSES);

Jason Carreira wrote:

I've got the Ivy plugin most of the way there, I think. It creates project libraries and applies them to the correct modules based on the Ivy configuration (thanks very much Christian for the example code!). It needs some touchups to the UI and definitely some work around managing the libraries. The biggest initial hurdle is that the library jar references end up being of the form:

file://path/to/library.jar

whereas the ones created via the settings are of the form:

jar://path/to/library.jar!

so the ones the ivy plugin creates are not actually adding to the classpath for some reason. I'm not sure why this is, as the method to register the classes just takes a VirtualFile, and the VirtualFileManager doesn't seem to like trying to create a VirtualFile with a jar:// prefix, and the VirtualFile I'm passing it is a valid file (jarVirtualFile.isValid() is true).

Anyway, I haven't had a lot of time to play with this over the last couple of weeks, and I'm probably not going to have a lot more time soon, so does someone else want to finish this up? Email me at jcarreira@gmail.com and I can send it to you... Maybe if more than one person is interested then someone can set up a version control repo...



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Cool! Thanks! Now the Ivy plugin is completely functional... assuming you don't remove dependencies :)

Hi,

You'd get adequate URL via following sample code:
libraryModel.addRoot(
VirtualFileManager.constructUrl(JarFileSystem.PROTOCO
,
directory.getPath() + "/struts.jar" +
JarFileSystem.JAR_SEPARATOR),
OrderRootType.CLASSES);

>

0

Jason Carreira wrote:

I would if it weren't licensed GPL... I'm not a fan of GPL. If it were Apache I'd put it in there.


I guess thats a problem of a "project of projects" isn't it? not every
project may want to be under that of the top level.

Not sure I want to "take over" but I'm keen to see this plugin, and
more-so keen to use it :)

0

Jason Carreira wrote:

Cool! Thanks! Now the Ivy plugin is completely functional... assuming you don't remove dependencies :)


Yeh? Sweet - is it heading up to the plugin repo anytime soon?

0

What's that repo? The one on java.net? I don't want to put something up under a GPL license.

Got any suggestions for somewhere else to put it?

0

What's that repo? The one on java.net? I don't want
to put something up under a GPL license.

Got any suggestions for somewhere else to put it?


http://plugins.intellij.net/

0

Jason Carreira wrote:

Got any suggestions for somewhere else to put it?


I was meaning the plugin manager repository for compiled/installable
plugins.

http://plugins.intellij.net/plugins/

Click the "Add Plugin" link in the upper right and upload the .jar or
.zip plugin.

0

For now this is available in source form from:

http://sf.net/projects/ivytools (which is down right now, typical)

If someone else has stuff they want to add to it, I'm sure Xavier wouldn't mind adding you to the project.

0

Please sign in to leave a comment.