[PATCH] Support

From: Jonathan 'Wolf' Rentzsch (ni..edshed.net)
Date: Thu Mar 19 2009 - 12:53:56 EDT

  • Next message: Mike Schrag: "Re: [PATCH] Support"

    Hi all,

    I have a few woproject projects that have been broken by WOCompile's
    NewBuildPathHotness revision. Attached is a patch I'd love to see
    accepted into WOProject that fixes it again for me.

    Here's the patch:

    Backgrounder

    I like to define my frameworks outside of the wocompile and
    woapplication tasks, like so:

    <project name="MyApp" default="build" basedir=".">
            <typedef name="frameworks"
    classname="org.objectstyle.woproject.ant.FrameworkSet"/>
            <frameworks dir=".." id="developer.frameworks" embed="true">
                    <include name="MyFramework1/dist/MyFramework1.framework"/>
                    <include name="MyFramework2/dist/MyFramework2.framework"/>
            </frameworks>
            
            <target name="build" depends="-sub.build">
                    <property file="build.properties" />
                    <property name="wolips.properties" value="${user.home}$
    {file.separator}Library${file.separator}Application Support$
    {file.separator}WOLips${file.separator}wolips.properties" />
                    <property file="${wolips.properties}" />
                    <tstamp />
                    
                    <mkdir dir="bin" />
                    <taskdef name="wocompile"
    classname="org.objectstyle.woproject.ant.WOCompile" />
                    <wocompile srcdir="Sources" destdir="bin">
                            <frameworks refid="developer.frameworks" />
                            <frameworks root="ProjectLocal" embed="false" eclipse="true" />
                            <frameworks root="External" embed="false" eclipse="true" />
                            <frameworks root="Local" embed="false" eclipse="true" />
                            <frameworks root="User" embed="false" eclipse="true" />
                            <frameworks root="System" embed="false" eclipse="true" />
                            <frameworks root="Network" embed="false" eclipse="true" />
                            <classpath>
                                    <fileset dir="Libraries">
                                            <include name="*.jar" />
                                    </fileset>
                                    <fileset dir="${wo.extensions}">
                                            <include name="*.jar" />
                                    </fileset>
                            </classpath>
                    </wocompile>
                    
                    <mkdir dir="dest" />
                    <taskdef name="woapplication"
    classname="org.objectstyle.woproject.ant.WOApplication"/>
                    <woapplication name="${project.name}" destDir="dest"
    principalClass="${principalClass}">
                            <classes dir="${classes.dir}">
                                    <includesfile name="woproject/classes.include.patternset" />
                                    <excludesfile name="woproject/classes.exclude.patternset" />
                            </classes>

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

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

                            <frameworks refid="developer.frameworks" />
                            <frameworks root="ProjectLocal" embed="${embed.ProjectLocal}"
    eclipse="true" />
                            <frameworks root="External" embed="${embed.External}"
    eclipse="true" />
                            <frameworks root="Local" embed="${embed.Local}" eclipse="true" />
                            <frameworks root="User" embed="${embed.User}" eclipse="true" />
                            <frameworks root="System" embed="${embed.System}" eclipse="true" />
                            <frameworks root="Network" embed="${embed.Network}" eclipse="true" />

                            <lib dir="Libraries">
                                    <include name="*.jar" />
                            </lib>
                    </woapplication>
            </target>

            <target name="clean" depends="-sub.clean">
                    <delete dir="bin" />
                    <delete dir="dist" />
            </target>
            
            <!--====================================================
                    Subproject Management.
                    ====================================================-->
            
            <!-- Subproject bottleneck -->
            <target name="-sub">
                    <ant dir="../MyFramework1" target="${target}" inheritAll="false"/>
                    <ant dir="../MyFramework2" target="${target}" inheritAll="false"/>
            </target>
            
            <!-- Subproject targets to allow cross-project dependencies -->
            <target name="-sub.build">
                    <antcall target="-sub">
                            <param name="target" value="build"/>
                    </antcall>
            </target>
            
            <target name="-sub.clean">
                    <antcall target="-sub">
                            <param name="target" value="clean"/>
                    </antcall>
            </target>
    </project>

    (I've bolded the relevant sections of this build.xml file.

    After NewBuildPathHotness, woapplication still worked with a
    FrameworkSet, but wocompile ignored them. This patch restores the
    former functionality.

    - jwr



    This archive was generated by hypermail 2.0.0 : Thu Mar 19 2009 - 12:55:36 EDT