Re: Maven Skepticism

From: Pierce T. Wetter III (pierc..winforces.com)
Date: Wed Jul 02 2008 - 13:20:37 EDT

  • Next message: Anjo Krank: "Re: Maven Skepticism"

    On Jul 2, 2008, at 5:45 AM, Henrique Prange wrote:

    > Andrus did what I want to do today. :)

      Thing is, I'd read all of that, and mostly it just confused me.
    >
    >
    > Just one more tip: If you want to use Maven just because of the way
    > Apple is providing nightly builds, don't do that. You will have a lot
    > of trouble if you don't agree with the Maven concepts to manage and
    > organize projects.

      I'm a big picture guy, so worrying about what folders should be
    named is way too much a detail to bother me. I have real work to do,
    dammmit. If I'm going to whine about something, I'm going to whine
    about how Apple is developing a SproutCore interface layer to WO for
    internal use; they should make it available to us poor benighted WO
    developers. :-)

      That said, I hate details, which is why I'm having a lot of friction
    with the maven stuff I suspect. (Hate ant. Hate xml.)

       But if I'm translating correctly, in WO-land, both Ant/Maven are
    moving towards using the file system to setup project structure, aka
    the "Fluffy Bunny Layout". Resources/* gets copied to Resources/*,
    etc. (It would be a great wiki addition if the FBL was documented,
    hint, hint). This is driven more by _maven_ philosophy then ant
    philosophy: standards over configuration. The Wonder guys have gotten
    sick of maintaining their build.xml files, so they're moving to that
    layout to make their build.xml simpler; in essence their ant build
    will be more maven like.

       Which is good from my point of view, because I don't want to have
    to muck about with some stupid xml file in order to get my project to
    build. If I put a .java file in WebServerResources, then I must want
    it copied into WebServerResources for some reason.

       So maven is sort of like ant (Crappy xml files you have to edit),
    but somewhat more mature because its drawing upon developer experience
    that there are plenty of people like me who are perfectly happy using
    the filesystem as a makefile. So what the maven people like you and
    Andrus have done is come up with some blessed project layout on disk.
    If you use that blessed project layout, things just work.

       Whereas Ant likes to deal with classes of files. *.java, *.class,
    *.wo, etc. and its very task focused: turn .java files into .class
    files -> turn .class files into .jar files. Which seems like it would
    work ok, until you have to figure out how to get your main.jar file to
    go to one place, and your client.jar file to go to another, or what
    you have to do with your stuff.properties file to make it accessible.
    You can do anything with Ant, but the problem is that you have to tell
    it every detail about what to do.

       So with maven, if I buy into the philosophy that inside each
    project, all of my files should be laid out with a certain structure,
    and it should be the same for all projects, and it should be the same
    for all WO developers everywhere, my life will be easier.

       I buy into that philosophy, and I'm all for easier. You could name
    the magic folders after George Carlin's 7 dirty words and I'd be
    perfectly happy: "Oh, I need this Properties file in the deployment,
    so I have to put it in the "Piss" folder"

       Now in addition to all that, Java has this whole issue with
    classpaths that sucks. Eclipse hides a lot of the pain and suffering
    from you, but once you do a deployment, surprise, you're missing
    foo.jar! So maven has some kind of magic for dealing with this as
    well, something I don't understand yet. But it might solve that
    annoying problem, hallelujah. But its not clear to me if I can setup
    the dependencies in a GUI with Eclipse or if I have to edit the pom.xml.

       So...lets say I want to buy into maven. Lets say I want to do the
    absolute minimum amount of pom.xml hacking (though GUI editing in
    eclipse is ok). Are those steps documented anywhere? Lachlan has a
    partially written "kicking the tyres" document and between this and
    the Apple Maven Nightly Builds document I'm gathering that there are
    two competing project layouts:

      Maven Default:
          src/main
               java
                resources
                webserver-resources
                components
          src/test
               java
                resources
                webserver-resources
                components

      Fluffy Bunny:
            Tests
             Sources
            Resources
             Components
             WebServerResources

      Maven will use the FBL if you put the relevant section in your
    pom.xml that Lachlan quotes. Note that the maven version supports test
    only resources, components, etc., while FBL doesn't?
      So its seems like I'm half right. WOLips & Wonder are migrating to
    FBL. The maven plugins have their own layout, and in Wonder use
    pom.xml instructions so that maven groks FBL. Presumably, I could look
    at the Wonder sources (when maven builds are working again) and come
    up with an fbl.xml that I could use in all my project pom.xml files.
    If I did that, I could migrate to maven with a minimum of fuss.

    Meanwhile:

      sierramadre:~ pierce$ mvn wobootstrap:install
    [INFO] Scanning for projects...
    [INFO] Searching repository for plugin with prefix: 'wobootstrap'.
    [INFO]
    ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO]
    ------------------------------------------------------------------------
    [INFO] The plugin 'org.apache.maven.plugins:maven-wobootstrap-plugin'
    does not exist or no valid version could be found

    Per the wiki:

    sierramadre:~ pierce$ mvn wobootstrap:install -DwebObjectsLibFolder=/
    Library/WebServer/Documents/WebObjects/Java -DwebObjectsVersion=5.3
    [INFO] Scanning for projects...
    [INFO] Searching repository for plugin with prefix: 'wobootstrap'.
    [INFO]
    ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO]
    ------------------------------------------------------------------------
    [INFO] The plugin 'org.apache.maven.plugins:maven-wobootstrap-plugin'
    does not exist or no valid version could be found



    This archive was generated by hypermail 2.0.0 : Wed Jul 02 2008 - 13:21:36 EDT