Showing posts with label IVY jayasoft dependency management. Show all posts
Showing posts with label IVY jayasoft dependency management. Show all posts

Monday, January 21, 2008

IVY 2.0 is released as apache project


Delighted to see Apache IVY released its 2.0 version under apache. IVY is a long time sitter under incubator and I surprised about it in this post. Good to see IVY is under apache label now. Even better I see it under ant which will definitely help promoting IVY. I always feel that ivy + ant will always a better option over maven for small and medium proprietary projects. We at hsenid use ivy heavily and it is our major dependency management setup.

Click here to see the release notes.

Congratulations IVY.

Saturday, May 19, 2007

IVY dependency manager (Part1 Introduction) Contd....

Himath requested to discuss the dependency management in detail. Thanks himath for your feed back. I will try to explain this in more detail on this post. Today will discuss on dependency management in detail before go in to the IVY guide lines.

Dependency management is , like its name suggests ,
Managing the project dependencies in a centralized storage.
For example, if we are using spring-1.2.8 in our projects A and B. Then assume spring 1.2.8 has dependencies of commons-logging-1.0.4 and log4j.1.12 dependencies. So what we have to do is , we should have a lib folder inside our projects and have these all dependencies into it. So what are the headaches for doing this.

  1. You have to keep remember of these dependencies each every time you add a new lib. For example if you are going to have new dependency like foo.jar , the you should know which are the dependencies of foo.jar.
  2. You have to keep jar files in your project repositories. For example, we may need to keep spring jars for all the project repositories which uses spring.
  3. Switching from one version to another is very difficult. For example I am moving from spring 1.2.8 to spring 2.0 version. Then again I have to add the new dependencies to my project dependency folder.
  4. Maintaining project artifacts is difficult. For example we have sub modules a, b and c in our project and we need to b and c jars for building a, we may need to build the b and c first before build the a.jar, even though we haven't changed the code base of b and c.

Above are few of the many problems we face when we don't have a centralized dependency management system.

So now lets discuss the advantages of having a centralized dependency management system.
If we have a dependency management system , then all of our artifacts (For us, it is mostly jar files) are in the central repository (Another svn repository). Every artifact has a configuration file where you have your dependency information. This is an extract of a configuration file for a sample. (This is taken from one of our projects etl-server)


Here you can see etl-server-core-1.1.jar is the artifact and dependencies for this artifact are listed inside the dependencies tag. So that tells the story. You have spring 1.2.8 is in the dependency list. So you don't need to separately keep the log4j dependencies here since you have those entries already inside the spring dependency file. If you look this in to more, which ever the projects using the etl-server-core-1.1.jar, they don't have to keep the these dependencies inside their list. Because these dependencies are already referred through etl-core-server jar.

So lets list down the point now.

1) Using dependency management we can maintain the centralized repository. So in your project page, you only need to use a XML file listing your dependencies. Ivy will take care of downloading them from the dependency repository when we build the project using ant.

2) Ivy maintains a local cache directory (possibly inside your /.ivy folder) for your downloaded dependencies, so you don't need to download them each and every time. This download is one off.

3) To publish your project artifact to repository is as easy as using an ant command publish!

4) Due to the chain of dependencies concept, if you refer one artifact foo.jar in your dependency file, then whatever the dependencies needed for foo.jar will be taken care of foo's dependency file. You don't need to keep them inside your dependency file.So it makes your life much easier.

So for more details it is better to have a go through the IVY DOC site before we discuss this matter in to more detail.

Sunday, May 13, 2007

IVY dependency manager (Part1 Introduction)

Its a Sunday noon in Singapore. I just had a chat with Chirantha who is based on Royal Brunei these days. He just joined to our blog. Welcome chirantha. Awaiting few blogs from you on your mysql expertises :)

This is an attempt to introduce our recently setup dependency repository. As a step forward to make full use of version controlled source management, we have started using our own internal artifacts repository for some time now.

I try to split the topic in to three.
1) IVY Dependency manager - Introduction.
2) How to use our repository.
3) How to publish artifacts to IVY.

This week we will discuss on the ROADMAP to IVY :)
Its been long time our engineers have been feeling of using a common repository for our artifacts. Having common dependency manager is good for many reasons. Especially we don't have to keep individual dependencies for each and every product. The version management is very easy. So it was decided to go for a repository internally.

Now we need to decide the right choice. The main two candidates were Maven and IVY . After several considerations we decided to vote for ivy. Lets discuss on what caused us to choose IVY for our repository.

  • We thought IVY is a handy light weight tool on it's own grounds.
  • Considering the scope of our requirement, which we mingle with our own proprietary and open source artifacts we do not need to use maven ibiblio or any other out of box repositories.
  • We all are used to work with ant. The complexity in using maven with ant is a widely known fact! . Probably maven expects users to do everything using maven. Basically maven is a project management tool where IVY targets dependency management.
  • The IVY support to ant is really good. Publishing artifacts to repository can be easily done through ant and IVY.

So we decided to use IVY for our own reasons. Maven has it's goods and bad so IVY too. For more comparisons refer IVY site.

So stay tuned with hsenidians for my next post on how hsenid is using IVY.


BTW It is notable that IVY is still in apache incubator. I don't understand this. Though people used to compare IVY with Maven, they are not competitors :) . They are different tools and the level of scopes are different. So we mark our big +1 for IVY ;)