Re: Cayenne JPA + Maven

From: Bill Dudney (bdudne..pache.org)
Date: Tue Feb 28 2006 - 10:48:07 EST

  • Next message: Ahmed Mohombe: "Re: Cayenne JPA + Maven"

    On Feb 28, 2006, at 2:44 AM, Andrus Adamchik wrote:

    > I just checked in the pom that Bill and switched the JPA project to
    > maven (so now you'll need maven eclipse plugin and M2 installed to
    > build from command line). Also I made one improvement - I deployed
    > a public M2 repository on ObjectStyle:
    >
    > http://objectstyle.org/maven2/
    >

    Thanks Andrus!

    > That always contains up-to-date Cayenne build from CVS (I have a
    > cron job running 4 times a day, updating it).
    >
    > Question: anyone knows how to make Maven automatically detect that
    > a remote signature changes for the same jar version already cached
    > in local repo? Or am I doing something wrong here and there is a
    > better way to setup a dependency that constantly changes?
    >

    I think maven automatically checks once a day. If you use the -cpu
    options together it will check and update any repository item that is
    different (this can take a while as it will check all the
    dependencies as well as the transitive ones). Another solution is to
    'mvn install' from your local copy of the code, that will cause your
    local copy to be updated. Then you can run your dependent project as
    usual and it will use what was just installed. This gives you the
    opportunity to test locally then once you are satisfied you can
    deploy to the objectstyle m2 repo with 'mvn install'.

    > My opinion of Maven after setting up a simple project:
    >
    > Automatic management of software dependencies is an extremely hard
    > task, so some of the Maven complexity is justified. Also Maven's
    > idea of a project model is brilliant (sort of an "object oriented"
    > build).
    >
    > Still it is such a pain to work with. For all the benefits of a
    > build model, there is a huge overhead in setting things up. For
    > example on my customer project I had to setup a private repo and
    > manually repackage a number of third party open source frameworks
    > to ensure that my resulting war is less than 80MB in size (due to
    > multiple versions of the same dependency)! This combined with poor
    > documentation makes it really bad.
    >

    Hmmm, its supposed to 'do the right thing' with multiple versions of
    the same dependency. If the group id and artifact id is the same
    maven will choose the one closest to the root project (i.e. in an
    XPath sense, the one with the shortest XPath will be choosen). On
    another note, if you are using a jar file that is not in a m2 repo
    some where you can use 'mvn install:install-file' to install the
    file. If you run 'mvn install:install-file' with no arguments it will
    print a usage message. This makes it much easier than trying to do a
    manual install.

    I'd be glad to try to help with this if you ping me on aim...

    TTFN,

    Bill Dudney
    MyFaces - myfaces.apache.org
    Wadi - incubator.apache.org/wadi

    > Andrus
    >



    This archive was generated by hypermail 2.0.0 : Tue Feb 28 2006 - 10:48:22 EST