Jun 06
The first public release of Necessitas is now available.
Necessitas is an Eclipse plug-in that adds a class-path container to manage a projects jars using the ivy dependency manager. In short it gives you many of the advantages of ivy without leaving eclipse.
What it does now
- Downloads the declared dependencies to the ivy cache
- Adds the downloaded jars to your class-path
- Can be configured to update the jars each time the
ivy.xmlfile is updated
Still to come
- The ability to specify an ivy config file to use
- The ability to specify the module configuration to use
- Maybe, the ability to automatically download and associate source files
I’ve found a couple of issues in the way that ivy exposes information about what is in the cache, what it needs to download etc. None of these are irresolvable they will just take some time and co-operation with the ivy crew (who are very responsive)

You can download it via the eclipse update manager from http://eclipse.oneill.id.au/updates/
June 8th, 2005 at 10:08 am
Awesome idea! I have writen a simple ant task that generates the .classpath file based on a fileset, but this is much more appealing.
I’ll give it a go!
Kim
June 8th, 2005 at 10:16 am
I have 4 configurations: compile, runtime, test and etc. Unfortunately, Necessitas includes them all and creates duplicates in the library - most likely because I have no ‘default’ conf.
The ’select’ button is disabled so I can’t change this option.
Kim
June 8th, 2005 at 10:21 am
I’ll be adding support for different configurations in the next release.
June 9th, 2005 at 6:21 pm
Does it works with Eclipse 3.1?
June 9th, 2005 at 6:48 pm
Sure does. In fact it may only work with 3.1 as that is what I develop on. I can tell you it works on Linux and the Mac. I have no idea when it comes to windows.
June 11th, 2005 at 10:25 pm
Great idea !
Is there a chance to have a version of Necessitas working with Eclipse 3.0 ?
June 12th, 2005 at 9:10 am
The will work in 3.0. Where I had issues was clearning tables. So I took the easy way out ;). I’ll see if I can find another way of doing it for version 0.3.
June 15th, 2005 at 10:18 am
Is there anonymous cvs/svn access?
June 15th, 2005 at 10:35 am
Not yet. Need to find a decent place to host. By the way. Don’t we know each other?
June 15th, 2005 at 10:48 am
Does System Stanley mean anything to you?
June 17th, 2005 at 2:00 am
Great plugin, thanks!
I have one issue/feature request. I am unable to add a Source attachment or Javadoc location for any of the jars in the Necessitas Container. Is there a way to enable this?
June 17th, 2005 at 6:09 am
Hi Kevin,
I have similar code to this. I just spoke to Xavier and he said I should contact you. Do you want a hand with anything?
What I have is a similar classpath container. Very alpha as you add the container to your project by manually editting the .classpath. Once editted the eclipse project finds the ivy.xml file and an optional ivy.properties files (you can configure the location of ivycfg and the conf to use for example).
At the end of the day you have a single expandable tree in the eclipse package view that says “Ivy Classpath Container” and if you click on it you see all the jars.
Anyhow let me know I am keen to get something done soon and am not concerned about whose code is used rather there is an eclipse ivy plugin because I MUCH prefer using ivy and ant over Maven (for example). And would like to make it easier for people to use them…
June 17th, 2005 at 6:47 am
Hey Marc,
I’ve been looking ito ways of doing this. The issue is that I need to get the information from ivy but at present Ivy doesn’t “bundle” it together in a way that I can use. I will find a way though as it’s something tht I like to use day to day.
June 17th, 2005 at 6:51 am
Hey Glen,
I’m happy to incorporate anything you might have (and give credit where credit is due). At the moment I’m working on 1.1 integration and support for specifying specific configurations, linking in additional related artifacts (eg source code) and better reporting.
So sure, if yo have anything you’d like to contribute that would be great.
Oh I’m also trying to figure out how to get the source built into the plugin so that it can be imported into eclipse for editing.
June 18th, 2005 at 1:21 am
I thought this would help Eclpise users.
How to install:
1) Start Eclipse
2) Help->Software Updates->Find and Install…
3) Select “Search for new features to install”, click Next
4) Click “New Remote Site…”
5) Enter name: necessitas update site and URL: http://eclipse.oneill.id.au/updates
6) Select the “necessitas update site” and click Finish
Necessitas will be downloaded and installed. Make sure you restart Eclipse.
June 18th, 2005 at 1:46 am
How to use:
1) Right click on an Eclipse java project, select Build Path->Add Libraries
2) Select “Necessitas Managed Dependencies”, click Next
3) The necessitas “Add Library” dialog will appear
I hope this is correct.
I am seeing duplicate jar entries in the “Located Jars:” list that cause a ‘Build path contains duplicate entry:….’ error.
June 18th, 2005 at 6:36 am
Thanks David,
you know I’d neot actually thought to tell people the basics :S.
To answer you question. The released version uses “*” as the configuration to parse so all declared jars are included. This means that if a jar is in two configurations it will be detected twice. I’ve added support for configurations in the dev version and I’ll make sure to remove dupicates.
-k.
July 5th, 2005 at 4:02 pm
Great tool.
Only one problem. Part of the requirements for my project is a JNI library which includes a *.DLL file. Ecplise gives an error because a dll file is in the classpath.
Previously the dll file gets downloaded as part of my ivy ant task but NOT included in the classpath.
How do I get around this??
July 5th, 2005 at 6:07 pm
Humm, probably don’t with version 0.3.1. I probably should check the artifact type before I assign it to the classpath. I’ll take a look and see if I can determine the artifact type and only add jars.
-k.
ps: If you have a config you can share that would be great.
July 6th, 2005 at 12:06 am
Kevin,
First I’d like to say, great job with this project and allowing us to use the power of Ivy from Eclipse. As I use this app and look over the source, if I ever see places where I can contribute, I will be sure to let you know.
Anyways, is there a place on your site, besides a comment on this thread, where you publish your eclipse update site URL?
Thanks!
July 7th, 2005 at 3:08 am
I’m a bit confused. I have an ivy.xml file that declares a zillion jars as dependencies (direct and indirect). When I go thru the add-library I am presented with only four jars. I don’t see any pattern as why these 4 where displayed and not the other 30.
Is there any logging that I look at? Or any other way to debug what is going on?
thanks
July 7th, 2005 at 9:22 am
David,
I’ve been working on a specific project site as time permits, as soon as it is ready I’ll let people know.
July 7th, 2005 at 9:24 am
Barry,
Does ivy declared in ant resolve the jars. More than likely the artifacts can’t be found necessitas links the ones that have been resolved. I’m working on a better ways of displaying this for a future version.
July 8th, 2005 at 3:01 am
Yes, ivy resolves all the jars. I use and everythings is populated in the ivy cache. Then I use as the only source for classpaths in my ant build and everything.
July 8th, 2005 at 3:51 am
(sorry, some of my text above got cut out. I mean to say that I use the ant tasks ivy:resolve and ivy:cachepath)
July 11th, 2005 at 9:05 am
Kevin, Here is the config file for the module in question:
And the dependency line in the projects ivy.xml file is
WIN32″/>
I hope this helps.
Peter
July 11th, 2005 at 7:36 pm
Hi,
I have a custom RepositoryResolver class specified in my ivyconf.xml. How can I tell Necessitas where to find that class?
I have added it to the ivy-1.1.jar which was included in au.id.oneill.necessitas.core_0.3.1.jar, but I get this error when trying to add a library:
java.text.ParseException: failed to configure with file:/C:/working/ph_tcomp/commons/ivyconf.xml: problem in config file
at fr.jayasoft.ivy.xml.XmlIvyConfigurationParser.parse(XmlIvyConfigurationParser.java:64)
at fr.jayasoft.ivy.Ivy.configure(Ivy.java:237)
at au.id.oneill.necessitas.core.classpath.NecessitasClasspathContainer.resolve(NecessitasClasspathContainer.java:170)
at au.id.oneill.necessitas.core.classpath.NecessitasClasspathContainer.refresh(NecessitasClasspathContainer.java:150)
at au.id.oneill.necessitas.core.classpath.NecessitasClasspathContainer.getClasspathEntries(NecessitasClasspathContainer.java:80)
[…]
Caused by: java.lang.ClassNotFoundException: custom.CustomRepositoryResolver
at fr.jayasoft.ivy.xml.XmlIvyConfigurationParser.startElement(XmlIvyConfigurationParser.java:135)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1674)
any idea?
regards,
Maarten
July 12th, 2005 at 2:10 pm
I’ll need to take a look at the ivy class loader. This is something I would like to incorporate for version 1.0. For now you could try adding the jar to the lib directory of the plugin and adding a reference from plugin xml / properties.
July 13th, 2005 at 3:47 pm
If you are interested, we have added maven1 & maven 2 support to Necessitas. We’re happy to contribute the code back if you wish to take it on.
July 28th, 2005 at 6:40 am
Hi,
How do you configure the ivy configuration file, the ivy file and their location?
July 29th, 2005 at 10:13 am
For the moment they are always located in the root of the project.
August 1st, 2005 at 1:21 am
As an FYI when you I put an ivyconf.xml in the project root I had to restart eclipse for it to get picked up by Necessitas…
August 9th, 2005 at 9:52 am
Kevin,
I’ve just noticed that my last post didn’t work. It there another way I can get you the config file?
Peter
August 9th, 2005 at 5:57 pm
email it to kevin at oneill.id.au
September 10th, 2005 at 1:51 am
I was wondering how progress was coming on the “still to come” items?
September 20th, 2005 at 4:21 pm
Looking forward to the next release!
October 7th, 2005 at 8:13 am
Thx for this new release!
First of all, I don’t see anymore the source, why ?
I am using my own resolver and it complains with a ClassNotFoundException , could you please add a way to configure the class used ?
The ivy and ivyconf are not at the root of my project, could you please add a way to set the path to the ivy file and to the ivyconf. By the way Ivy add remote ivyconf , it could be nice to take advantage of.
In the message box, could you add also the errors? I can see them using the PDE error view but it will be much better to have them just there.
one more question ? Why do not share this project so people could improve it?
Good Work!
October 7th, 2005 at 8:34 am
No Source, because I’m a nuff nuff. I really should create an ant script for building the releases. I’ll make sure it’s included in the next version.
I haven’t looked at custom resolvers yet. It will require some classpath manipulation. I’ll take a look at it for a future version.
Internally I make no assumptions about the location of the ivyconf or the ivy files. Ill add a way for you to specify the ones to use in an upcoming version.
The messages box is the information provided via Ivy. The information in the error log is generated from internal exceptions. I’ll see if I can find a way to combine the two.
I’m working on a specific project site as time permits probably to be hosted at javaforge.
December 2nd, 2005 at 8:26 am
Is there a way to specify a web proxy to use? I am having problems with outgoing connections for this plugin. Does it use the Eclipse settings under Install/Update, or do I have to set the the JVM System Property http.proxyHost ? Not sure where I can do that in Eclipse 3.1