Changeset 10:fc05c2e92aa9 in iobaby


Ignore:
Timestamp:
Jan 30, 2017, 6:22:18 AM (20 months ago)
Author:
Shawn Wilson <shawn@…>
Branch:
default
Phase:
public
Message:

saw_013017_3 - Updated build process for tracking dependent webapp servlet mappings.

Files:
1 added
1 deleted
4 edited
2 moved

Legend:

Unmodified
Added
Removed
  • .hgignore

    r8 r10  
    2727WEB-INF/tmp
    2828
     29WEB-INF/iobaby.web.xml
    2930WEB-INF/web.xml
    3031
  • CHANGELOG

    r9 r10  
    11Copyright (C) 2016-2017 Virgo Venture, Inc.
    22@%@~LICENSE~@%@
     3
     4saw_013017_3 - Updated build process for tracking dependent webapp servlet mappings.
    35
    46saw_013017_2 - Additional excludes for the jar task.
  • build.xml

    r9 r10  
    5454        <fileset dir="${jars.code.tests.dir}" includes="*.jar"/>
    5555    </path>
     56    <property name="jars.iovar.dir" location="${jars.dir}/iovar"/>
     57    <path id="jars.iovar">
     58        <fileset dir="${jars.iovar.dir}" includes="*.jar"/>
     59    </path>
    5660    <property name="jars.run.dir" location="${jars.dir}/run"/>
    5761    <path id="jars.run">
     
    6973        <path refid="jars.code"/>
    7074        <path refid="jars.common"/>
     75        <path refid="jars.iovar"/>
    7176        <path refid="jars.run"/>
    7277        <path refid="jars.servlet-api"/>
     
    7782        <path refid="jars.code"/>
    7883        <path refid="jars.common"/>
     84        <path refid="jars.iovar"/>
    7985        <path refid="jars.servlet-api"/>
    8086    </path>
     
    184190   
    185191    <!-- loads the ant-contrib tasks... needed for 'foreach' -->
    186     <target name="ant.task.contrib">
     192    <target name="ant.task.contrib" depends="tasks.init, code.init">
    187193        <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="tasks.classpath"/>
    188194    </target>
    189195 
    190     <target name="ant.task.WebBuilder">
     196    <target name="ant.task.WebBuilder" depends="tasks.init, code.init">
    191197        <taskdef name="web-build" classname="${iovar.tasks.pkg}.WebBuilder" classpathref="tasks.classpath"/>
    192198    </target>
     
    303309            <fileset dir="${jars.common.dir}" includes="*.url"/>
    304310        </foreach>
     311        <foreach target="project.update.iovar" param="project.update.file">
     312            <fileset dir="${jars.iovar.dir}" includes="*.url"/>
     313        </foreach>
    305314        <foreach target="project.update.run" param="project.update.file">
    306315            <fileset dir="${jars.run.dir}" includes="*.url"/>
     
    318327        <loadfile property="project.update.url" srcFile="${project.update.file}"/>
    319328        <get dest="${jars.common.dir}" src="${project.update.url}" verbose="on" usetimestamp="true"/>
     329    </target>
     330    <target name="project.update.iovar">
     331        <loadfile property="project.update.url" srcFile="${project.update.file}"/>
     332        <get dest="${jars.iovar.dir}" src="${project.update.url}" verbose="on" usetimestamp="true"/>
    320333    </target>
    321334    <target name="project.update.run">
     
    520533                <include name="**/*.class"/>
    521534            </fileset>
    522             <!-- we include the jars/**.url files to other scripts can figure out dependencies from the jar
     535            <!-- we include the jars/**.url files so other scripts can figure out dependencies from the jar
    523536                 (mapped to /sys/jars/*) -->
    524537            <mappedresources>
     
    528541                <globmapper from="*" to="sys/jars/*"/>
    529542            </mappedresources>
     543            <mappedresources>
     544                <fileset dir="${app.dir}" followsymlinks="false">
     545                    <include name="${project.name}.web.xml"/>
     546                </fileset>
     547                <globmapper from="*" to="sys/servlets/*"/>
     548            </mappedresources>
    530549        </jar>
    531550    </target>
     
    533552   
    534553    <target name="app.webxml" depends="ant.task.WebBuilder">
     554        <!-- extract web.xml snippets from any iovar jar dependencies -->
     555        <unzip dest="${tasks.dir}">
     556            <fileset dir="${jars.iovar.dir}">
     557                <include name="**/*.jar"/>
     558            </fileset>
     559            <patternset>
     560                <include name="sys/servlets/**"/>
     561            </patternset>
     562        </unzip>
     563
    535564        <web-build
    536565            dir="${project.dir}"
    537566            src="${project.dir}/etc/web.xml"
    538             include="${project.dir}/etc/iovar.web.xml"
     567            include="${tasks.dir}/sys/servlets"
    539568            dst="${app.dir}/web.xml"
     569            links="${app.dir}/${project.name}.web.xml"
    540570            sqlStart="50"
    541571            excludeDirs="home:pub:tmp:var/cache:var/tmp"
  • etc/sample.web.xml

    r5 r10  
    6060        </init-param>
    6161    </servlet>
    62 
    63     <!-- /bin/login -->
    64     <servlet><servlet-name>me.idfree.bin.Login</servlet-name><servlet-class>me.idfree.bin.Login</servlet-class></servlet>
    65     <servlet-mapping><servlet-name>me.idfree.bin.Login</servlet-name><url-pattern>/bin/login</url-pattern></servlet-mapping>
    66     <servlet-mapping><servlet-name>me.idfree.bin.Login</servlet-name><url-pattern>/bin/login/*</url-pattern></servlet-mapping>
    67 
    68     <!-- /bin/logout -->
    69     <servlet><servlet-name>me.idfree.bin.Logout</servlet-name><servlet-class>me.idfree.bin.Logout</servlet-class></servlet>
    70     <servlet-mapping><servlet-name>me.idfree.bin.Logout</servlet-name><url-pattern>/bin/logout</url-pattern></servlet-mapping>
    71     <servlet-mapping><servlet-name>me.idfree.bin.Logout</servlet-name><url-pattern>/bin/logout/*</url-pattern></servlet-mapping>
    72 
    73     <!-- /bin/user -->
    74     <servlet><servlet-name>me.idfree.bin.User</servlet-name><servlet-class>me.idfree.bin.User</servlet-class></servlet>
    75     <servlet-mapping><servlet-name>me.idfree.bin.User</servlet-name><url-pattern>/bin/user</url-pattern></servlet-mapping>
    76     <servlet-mapping><servlet-name>me.idfree.bin.User</servlet-name><url-pattern>/bin/user/*</url-pattern></servlet-mapping>
    7762
    7863    <!-- [iovar] DO NOT REMOVE THIS LINE -->
Note: See TracChangeset for help on using the changeset viewer.