Re: Ant build failing

From: Chuck Hill (chil..lobal-village.net)
Date: Wed Mar 28 2007 - 14:16:52 EDT

  • Next message: Jean Pierre Malrieu: "Re: Ant build failing"

    Hi Jean Pierre.

    On Mar 28, 2007, at 9:13 AM, Jean Pierre Malrieu wrote:

    > Thanks Chuck. I had promised myself not to look at an ant file
    > ever, but for you I'll make a exception.

    :-) They are an learned taste, but not too bad after your first few.

    > I did create the missing folders and my frameworks build fine now.
    >
    > What is the recommended practice?

    I don't think there is one. What you are seeing in this build.xml is
    a mistake. It should be fixed in the next build of WOLips. What we
    are seeing here is the layout for a Project Wonder framework so this
    is the reccomended practice for work on Project Wonder.

    With the correct build file, it does not matter which folder you put
    them in, WOLips does pattern matching to identify what goes where.

    An example will help here. For resources, the pattern file is
    woproject/resources.include.patternset. There is also an exclusion
    file, woproject/resources.exclude.patternset. Here is how it should
    work:

    <resources dir=".">
            <patternset>
                    <includesfile name="woproject/resources.include.patternset"/>
                    <excludesfile name="woproject/resources.exclude.patternset"/>
            </patternset>
    </resources>

    The pattern set would look like this:

    **/Properties
    **/*.eomodeld/
    **/*.d2wmodel
    **/*.wo/
    **/*.api
    **/*.strings
    **/*.plist
    **/*.lproj/

    So it did not matter where in the project the resources lived, they
    would be picked up. This was useful for larger projects as you could
    organize your files without having to edit the build.xml or the
    includes, or anything. I would have ones like:

    Models/
    Strings/
    Configuration/
    AdminPages/
    PublicPages/
    Components/
    CSS/
    JavaScript/
    Images/

    (the last three are for web server resources)

    > EOmodels in the "Resources" folder?
    > WO Frameworks and JRE system Library in "Libraries" folder?

    No, libraries are for other third party jars that your projects
    needs. The standard ones are included on the build path (Projects -
    Properties - Java Build Path on the Libraries tab.

    > Can I put localized folders (French.lproj for example) in the
    > "Components" folder?

    Yes, if you are using the standard pattern matching I describe above
    you can put them anywhere.

    Chuck

    >
    > Le 27 mars 07 à 22:41, Chuck Hill a écrit :
    >
    >> Hi Jean Pierre,
    >>
    >> Someone changed this a while ago and it is making a mess of new
    >> projects (and old ones if you update the build file). I suspect
    >> this may be the work of the maven-ites. ;-) In a way I kind of
    >> like this change, but it should have been accompanied by code to
    >> create these directories if not present and should not force
    >> existing projects to be reorganized.
    >>
    >>
    >>
    >> If you look in the build.xml you will see this:
    >>
    >> <woframework name="${framework.name}" destDir="${dest.dir}"
    >> customInfoPListContent="${customInfoPListContent}"
    >> principalClass="${principalClass}" eoAdaptorClassName="$
    >> {eoAdaptorClassName}">
    >> <classes dir="${classes.dir}">
    >> <patternset>
    >> <includesfile name="woproject/classes.include.patternset"/>
    >> <excludesfile name="woproject/classes.exclude.patternset"/>
    >> </patternset>
    >> </classes>
    >> <wsresources dir="WebServerResources">
    >> <patternset>
    >> <include name="**/*"/>
    >> <exclude name="CVS"/>
    >> <exclude name=".svn"/>
    >> <excludesfile name="woproject/wsresources.exclude.patternset"/>
    >> </patternset>
    >> </wsresources>
    >> <resources dir="Resources">
    >> <patternset>
    >> <include name="**/*"/>
    >> <exclude name="CVS"/>
    >> <exclude name=".svn"/>
    >> <excludesfile name="woproject/resources.exclude.patternset"/>
    >> </patternset>
    >> </resources>
    >> <resources dir="Components">
    >> <patternset>
    >> <include name="**/*"/>
    >> <exclude name="CVS"/>
    >> <exclude name=".svn"/>
    >> <excludesfile name="woproject/resources.exclude.patternset"/>
    >> </patternset>
    >> </resources>
    >> <lib dir="Libraries">
    >> <include name="*.jar"/>
    >> <exclude name="**/*.framework/**"/>
    >> </lib>
    >> </woframework>
    >>
    >>
    >> The source of your problem is
    >> <lib dir="Libraries">
    >>
    >> You can either add a Libraries/ folder to your project or replace
    >> "Libraries" with "." You will have to do a similar thing for
    >> WebServerResources, Resources, and Components,
    >>
    >> Chuck
    >>
    >> On Mar 27, 2007, at 1:04 PM, Jean Pierre Malrieu wrote:
    >>
    >>> In the hope of solving my classpath problems in deployment, I
    >>> have updated my WOLips and Wonder to the latest nightly builds.
    >>> I have also called "WOLips Ant Tools-->Replace with latest
    >>> build.xml" on all my projects.
    >>> But now, one of my frameworks won't build with Ant. I receive the
    >>> following output in the console:
    >>>
    >>>
    >>> Buildfile: /Users/jpm/Documents/EclipseTemp/workspace/TDEOS/
    >>> build.xml
    >>> setProps:
    >>> init.install:
    >>> build.woframework:
    >>> [woframework] Installing TDEOS in //Library/Frameworks
    >>>
    >>> BUILD FAILED
    >>> /Users/jpm/Documents/EclipseTemp/workspace/TDEOS/build.xml:49: /
    >>> Users/jpm/Documents/EclipseTemp/workspace/TDEOS/Libraries not found.
    >>>
    >>> Line 49 is this one:
    >>>
    >>> <woframework name="${framework.name}" destDir="${dest.dir}"
    >>> customInfoPListContent="${customInfoPListContent}"
    >>> principalClass="${principalClass}" eoAdaptorClassName="$
    >>> {eoAdaptorClassName}">
    >>>
    >>> I am rather lost here. At least, before, I could build with ant.
    >>> Now I can't. Could someone help me a little bit to get out of
    >>> this problem?
    >>>
    >>> Thanks.
    >>>
    >>> JPM
    >>
    >> --
    >>
    >> 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
    >>
    >>
    >>
    >>
    >>
    >>
    >
    >

    -- 
    

    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 Mar 28 2007 - 14:17:43 EDT