Menu

#566 Use Apache Ivy to manage and download OpenXava jar dependencies

Not planned
open
None
5
2017-01-02
2016-12-30
No

OpenXava uses Apache Ant for project building. Currently all dependent .jar files are stored in OpenXava source code repository server (SVN), inside two folders:
OpenXava/lib
OpenXava/web/WEB-INF/lib

We can dramatically decrease size of source code repository and increase speed of initial source code download by using Apache Ivy to download required jar files from external repository (Apache Ivy uses Maven repository).
Apache Ivy file [ivy.xml] explicitly defines all external dependencies so it i very easy for everyone to understand what are current versions of every dependent jar.
Apache Ivy allows very easy upgrade and downgrade to new or old versions it is just matter of changing ivy.xml and executing the build.

I have created ivy.xml and modified OpenXava/build.xml to accomplish this task.

build.xml is modified to automatically download Apache Ivy and install it locally, so no additional installation steps are necessary.
I have marked all my changes in build.xml with @Trifon.
I have made Ant "compile" step dependent on "ivy-resolve" step, which automatically download almost all required jar files and places them inside OpenXava/web/WEB-INF/lib folder.
<target name="compile" depends="ivy-resolve">
<antcall target="compileJava">
<antcall target="compileGroovy">
</antcall></antcall></target>

I can do the same for all jar files inside OpenXava/lib folder but I wanted to know your opinion first?
Please give it a try and let me know what you think?

Kind regards,
Trifon

2 Attachments

Discussion

  • Javier Paniza

    Javier Paniza - 2017-01-02

    Hi Trifon,

    decrease size of source code repository

    That is not important

    increase speed of initial source code download

    But if you have to download those jars anyways from maven repositories.

    it i very easy for everyone to understand what are current versions of every dependent jar

    True

    easy upgrade and downgrade to new or old versions

    True. Though newer and olders version of libraries would not be supported.

    I think Ivy is better than Maven, at least it does not imposse a project struture. Anyways, I would prefer to leave this type of changes related with build and project struture for a major version, like 6.0, and expend the 5.x version in functional related features.

    Moreover, my goal is changing the build and project structure in order would be easier to start with OpenXava, specially for those that newcomers to Java. Currently OpenXava distribution is still very difficult to setup, and going to Maven/Ivy and those Java culture things is still worse. I prefer that some Java expert would be a little uneasy because he has no Maven, than a Visual Basic programmer leaves OpenXava because it does not run. However, I still have no idea about the shape of OX6, and Ivy could match on it, who knows.

     
  • Trifon (An ADempiere founder)

    Hi Javi,

    thank you for your answer!

    Anyways, I would prefer to leave this type of changes related with build and project >struture for a major version, like 6.0, and expend the 5.x version in functional related >features.

    Sure, such change is better for major changes, like version 6.x.
    The biggest benefit which I see is the easy way to see all dependent jar files and the easy way to upgrade to newer version.

    Kind regards,
    Trifon

     

Log in to post a comment.