Re: Why Maven?

From: Ulrich Köster (ulric..bjectstyle.org)
Date: Wed Nov 08 2006 - 07:45:51 EST

  • Next message: Ulrich Köster: "maven-woproject-plugin renamed to maven-wolifecycle-plugin"

    Am 08.11.2006 um 13:23 schrieb Anjo Krank:

    > Am 08.11.2006 um 13:09 schrieb Ulrich Köster:
    >>> Uhm, thanks, yeah, whatever... please keep in mind I don't have
    >>> the faintest idea what this is all about :)
    >>
    >> That's perfect :-)
    >
    > Guessed so :)

    Thank you for taking the time.

    >
    >>>
    >>> Is the example supposed to work or not? If not, what can I do to
    >>> fix it? Does it work for you at least? If so, why?
    >>
    >> Yes, it's supposed to work. Due to a bug in maven it's working for
    >> me. The build is different when you build a maven plugin
    >> standalone or as module.
    >>
    >> I've added some stuff to the svn. Please update woproject and
    >> invoke mvn again.
    >>
    >> I've uploaded a new version of the examples too.
    >>
    >> Give it another try.
    >
    > After "svn up; mvn install" a "cd maven2/ExamplesAll/; mvn" works
    > as expected. Thanks!
    >
    > Also, after expanding the created tar.gz the app runs and can be
    > reached in the browser. What I didn't know was that you can
    > actually embed a framework as a built jar file, which is *way*
    > faster to do than copying over the hundreds and thousands of files.
    >
    > I assume that only the woproject/patternset files are used, not the
    > classpath files? And putting jars in /Library/WebObjects is not
    > supported? Not that it would make sense, just asking...

    Normally you're defining resources in maven like: (You're still able
    to do that.)

       <build>

         <resources>
           <resource>
             <directory>foo</directory>
             <filtering>true</filtering>
                            <!-- includes /excludes similar to ant -->
           </resource>
         </resources>

       </build>

    During the mvn build the maven-wolifecycle-plugin is responsable for
    reading our patternset files. From the output:
    [INFO] Defining wo resources
    [INFO] Defining wo resources: loading patternsets
    [INFO] ProjectFolder = /Projekte/woproject/workspace/woproject/maven2/
    ExampleAll/Applications/Example/
    [INFO] Defining wo resources: "woproject" folder found within
    project. Reading patternsets...
    [INFO] Defining wo resources: loading "resources.include.patternset"
    [INFO] ProjectFolder = /Projekte/woproject/workspace/woproject/maven2/
    ExampleAll/Applications/Example/
    [INFO] Defining wo resources: loading "resources.exclude.patternset"
    [INFO] ProjectFolder = /Projekte/woproject/workspace/woproject/maven2/
    ExampleAll/Applications/Example/
    [INFO] ProjectFolder = /Projekte/woproject/workspace/woproject/maven2/
    ExampleAll/Applications/Example/
    [INFO] Defining wo webserverresources: loading patternsets
    [INFO] ProjectFolder = /Projekte/woproject/workspace/woproject/maven2/
    ExampleAll/Applications/Example/
    [INFO] Defining wo webserverresources: "woproject" folder found
    within project. Reading patternsets...
    [INFO] Defining wo resources: loading "wsresources.include.patternset"
    [INFO] ProjectFolder = /Projekte/woproject/workspace/woproject/maven2/
    ExampleAll/Applications/Example/
    [INFO] Defining wo resources: loading "wsresources.exclude.patternset"
    [INFO] ProjectFolder = /Projekte/woproject/workspace/woproject/maven2/
    ExampleAll/Applications/Example/
    [INFO] ProjectFolder = /Projekte/woproject/workspace/woproject/maven2/
    ExampleAll/Applications/Example/
    [INFO] Defining wo resources: defining default folder
    [INFO] ProjectFolder = /Projekte/woproject/workspace/woproject/maven2/
    ExampleAll/Applications/Example/
    [INFO] Defining wo resources: No "Resources" folder found within
    project. Skipping include...
    [INFO] ProjectFolder = /Projekte/woproject/workspace/woproject/maven2/
    ExampleAll/Applications/Example/
    [INFO] Defining wo webserverresources: No "WebServerResources" folder
    found within project. Skipping include...
    [INFO] ProjectFolder = /Projekte/woproject/workspace/woproject/maven2/
    ExampleAll/Applications/Example/

    The idea is to add a pom.xml to your existing project and you're golden.

    To include resoures the maven way:

       <build>

         <resources>
           <resource>
             <directory>foo</directory>
             <targetPath>Resources</filtering>
           </resource>
         </resources>

       </build>

    To include resoures the maven way:

       <build>

         <resources>
           <resource>
             <directory>foo</directory>
             <targetPath>WebServerResources</filtering>
           </resource>
         </resources>

       </build>

    Adding jars to a folder doesn't make sense because it breaks the
    versioning. It's possible to define dependencies as provided in maven
    but that's not supported by our stuff for now.

    There is no need to use the classpath files. The pom has all
    dependencies.

    Uli

    >
    > Cheers, Anjo
    >



    This archive was generated by hypermail 2.0.0 : Wed Nov 08 2006 - 07:45:55 EST