Re: Maven Skepticism

From: Chuck Hill (chil..lobal-village.net)
Date: Wed Jul 02 2008 - 19:38:02 EDT

  • Next message: Chuck Hill: "Re: embedded WSR"

    On Jul 2, 2008, at 10:20 AM, Pierce T. Wetter III wrote:

    >
    > 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.

    That is why there are project templates.

    > 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".

    Not so much the file system as consistency. The original concept
    behind WOProject was for it to be IDE neutral and I don't think that
    they wanted to force anyone into any particular project structure.
    The result was an unmitigated mess of layouts. The logic behind FBL
    was I think, "More consistency, less dicking about with build.xml
    files. Dammit".

    > Resources/* gets copied to Resources/*, etc. (It would be a great
    > wiki addition if the FBL was documented, hint, hint).

    Some day... some day...

    > 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.

    Gosh, I can only hope not!

    > 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.

    If you don't want to muck with XML files, then Maven is probably not
    the tool for you. I see lots of commits changing the pom.xml for
    this, that, and something else.

    > 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.

    You don't need Maven. You need some perspective. Here is my average
    build.xml file for a project:

    <project name="GVCFoundation" default="build" basedir=".">
            <import file="../Ant/common.xml"/>
    </project>

    Yes, three (3) lines. Everything else is common and in one place.

    Just because woproject comes a certain way, does not mean that you
    should use it like that. Make common build files that rely on a
    consistent layout. Reuse them. Need to make a change? Change it in
    one place.

    Note that no Mavens were harmed doing this. It did make my brain hurt
    a bit though. But just the once.

    > 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.

    Most of that classpath nastiness stuff has to do with inconsistencies
    and incompatibilities between WOLips and WOProject. Mike is working
    on fixing this.

    > So...lets say I want to buy into maven. Lets say I want to do the
    > absolute minimum amount of pom.xml hacking

    Have fun with that!

    Chuck

    > (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
    >
    >

    -- 
    

    Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects



    This archive was generated by hypermail 2.0.0 : Wed Jul 02 2008 - 19:38:53 EDT