Changeset 3413

Show
Ignore:
Timestamp:
11/30/11 13:55:07
Author:
douglm
Message:

(Partial updates as full update failed with some conflict)

Major refactoring of code to move all jar building into separate projects outside of the main bedework project which itself becomes an assembly project - that is it builds deployable components from the jars and other information.

This change is to facilitate the move to jboss 7.

Further changes are needed but probably no more major reorganization.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build.xml

    r3333 r3413  
    1919              location="${org.bedework.project.bedework}/libcache"/> 
    2020 
    21   <!-- Where we put other projects --> 
    22   <property name="org.bedework.projects" 
    23             location="${org.bedework.project.bedework}/projects" /> 
    24  
    25   <property name="org.bedework.project.caldavimpl" 
    26             location="${org.bedework.projects}/caldavimpl" /> 
    27  
    28   <property name="org.bedework.project.calendarapi" 
    29             location="${org.bedework.projects}/calendarapi" /> 
    30  
    31   <property name="org.bedework.project.dumprestore" 
    32             location="${org.bedework.projects}/dumprestore" /> 
    33  
    34   <property name="org.bedework.project.indexer" 
    35             location="${org.bedework.projects}/indexer" /> 
    36  
    37   <property name="org.bedework.project.webapps" 
    38             location="${org.bedework.projects}/webapps" /> 
    39  
    4021  <property name="build.dir" location="${org.bedework.project.bedework}/build"/> 
    4122   
     
    5334 
    5435  <property name="project.version" value="${org.bedework.version}"/> 
    55  
    56   <property name="org.bedework.deployutil.jar" 
    57             location="${org.bedework.project.bedework}/bin/${org.bedework.deployutil.jar.name}-${project.version}.jar" /> 
    58  
    59   <ant antfile="${org.bedework.project.bedework}/deployutil/build.xml" inheritrefs="true" 
    60          target="build" /> 
    61    
    62   <copy todir="${build.dir}" file="${org.bedework.deployutil.jar}" /> 
    6336   
    6437  <import file="${build.dir}/buildTools/deftasks.xml"/> 
     
    12497--> 
    12598    <!-- =============================================================== 
    126               Locations and jar files built by this project
     99              This project builds nothing - it just assembles
    127100         =============================================================== --> 
    128101 
     
    141114    <property name="org.bedework.deployment.base" 
    142115              location="${org.bedework.project.bedework}/deployment" /> 
    143  
    144     <property name="org.bedework.build.jar" 
    145               location="${bin.home}/${org.bedework.build.jar.name}-${project.version}.jar" /> 
    146  
    147     <property name="org.bedework.deployutil.jar" 
    148               location="${bin.home}/${org.bedework.deployutil.jar.name}-${project.version}.jar" /> 
    149   </target> 
    150  
    151   <target name="init.build" depends="init"> 
    152     <mkdir dir="${dist.home}" /> 
    153  
    154     <mkdir dir="${bin.home}" /> 
    155  
    156     <mkdir dir="${org.bedework.empty.dir}" /> 
    157116  </target> 
    158117 
     
    161120       ================================================================= --> 
    162121 
    163   <target name="build" depends="init.build,build.deployutil, 
    164                                 build.calendarapi, 
    165                                 build.caldavimpl, 
    166                                 build.webapps,build.indexer, 
    167                                 build.dumprestore" 
     122  <target name="build" depends="init" 
    168123          description="builds the project"> 
    169124  </target> 
    170125 
    171   <target name="build.deployutil" depends="init" 
    172           description="builds the deployutil component"> 
    173     <ant antfile="${org.bedework.project.bedework}/deployutil/build.xml" inheritrefs="true" 
    174            target="build" /> 
    175      
    176     <copy todir="${build.dir}" file="${org.bedework.deployutil.jar}" /> 
     126  <target name="clean" depends="init" 
     127          description="Remove all generated files."> 
     128    <delete dir="${dist.home}" /> 
    177129  </target> 
    178130 
    179   <target name="clean" depends="init, 
    180                                 clean.calendarapi, 
    181                                 clean.caldavimpl, 
    182                                 clean.webapps,clean.indexer, 
    183                                 clean.dumprestore" 
    184           description="Remove all generated files."> 
    185     <delete dir="${dist.home}" /> 
    186     <delete dir="${bin.home}" /> 
    187   </target> 
    188  
    189   <target name="quickstart-clean" depends="init, 
    190                                            clean.calendarapi, 
    191                                            clean.caldavimpl, 
    192                                            clean.webapps,clean.indexer, 
    193                                                clean.dumprestore" 
     131  <target name="quickstart-clean" depends="init" 
    194132          description="partial clean up for quickstart."> 
    195     <delete dir="${bin.home}" /> 
    196133    <delete dir="${org.bedework.temp.dir}" /> 
    197134    <delete dir="${org.bedework.empty.dir}" /> 
    198135    <delete dir="${bw.project.home}/libcache"/> 
    199     <delete dir="${bw.project.home}/applib"/> 
    200136 
    201137    <delete> 
     
    204140  </target> 
    205141 
    206   <target name="clean.build" depends="clean, build" 
    207           description="cleans then builds the project"/> 
    208  
    209142  <!-- ================================================================= 
    210        The "deploy" and "deploy.all" target builds and deploys the applications 
     143       The "deploy" target deploys the applications 
    211144       ================================================================= --> 
    212145 
     
    216149         target="deploy" /> 
    217150  </target> 
    218  
    219   <!-- ================================================================= 
    220        The "clean.deploy" target cleans, builds and deploys the applications 
    221        ================================================================= --> 
    222  
    223   <target name="clean.deploy" depends="clean,deploy" /> 
    224  
    225   <!-- ================================================================= 
    226        The "build.configured" target builds configured applications 
    227        ================================================================= --> 
    228  
    229   <target name="build.configured" depends="build" 
    230           description="Build configured applications" > 
    231     <ant antfile="${org.bedework.project.bedework}/deployment}/build.xml" inheritrefs="true" 
    232          target="build.configured" /> 
    233   </target> 
    234  
    235   <target name="clean.build.configured" depends="clean,build.configured" /> 
    236  
    237   <!-- ======================== javadoc target ======================= 
    238        We build these and copy in turn into the main bedework docs directory. 
    239  
    240        The org.bedework.projectdocs.home property allows each project to 
    241        locate the previously built javadocs so they can link to it. 
    242  
    243        We also assume access to the java api docs. 
    244        ================================================================= --> 
    245  
    246   <target name="javadoc" depends="init" description="Generate javadoc"> 
    247     <property name="docs.home" location="${bw.project.home}/docs"/> 
    248     <property name="org.bedework.projectdocs.home" location="${docs.home}/projectdocs"/> 
    249     <delete dir="${org.bedework.projectdocs.home}" /> 
    250     <mkdir dir="${org.bedework.projectdocs.home}" /> 
    251  
    252     <ant antfile="${org.bedework.project.calendarapi}/build.xml" inheritall="false" 
    253          target="javadoc" > 
    254       <property name="destdir" 
    255                 location="${org.bedework.projectdocs.home}/calendarapi/api" /> 
    256     </ant> 
    257  
    258     <ant antfile="${org.bedework.project.dumprestore}/build.xml" inheritall="false" 
    259          target="javadoc" > 
    260       <property name="destdir" 
    261                 location="${org.bedework.projectdocs.home}/dumprestore/api" /> 
    262     </ant> 
    263  
    264     <ant antfile="${org.bedework.project.caldavimpl}/build.xml" inheritall="false" 
    265          target="javadoc" > 
    266       <property name="destdir" 
    267                 location="${org.bedework.projectdocs.home}/caldavimpl/api" /> 
    268     </ant> 
    269  
    270     <ant antfile="${org.bedework.project.indexer}/build.xml" inheritall="false" 
    271          target="javadoc" > 
    272       <property name="destdir" 
    273                 location="${org.bedework.projectdocs.home}/indexer/api" /> 
    274     </ant> 
    275  
    276     <ant antfile="${org.bedework.project.webapps}/build.xml" inheritall="false" 
    277          target="javadoc" > 
    278       <property name="destdir" 
    279                 location="${org.bedework.projectdocs.home}/webapps/api" /> 
    280     </ant> 
    281   </target> 
    282  
    283   <!-- ================================================================= 
    284        Targets to build sub-projects. 
    285        ================================================================= --> 
    286  
    287   <!-- ................................................................. 
    288                           caldavimpl 
    289        .................................................................. --> 
    290   <target name="build.caldavimpl" depends="init" 
    291           description="builds the caldavimpl project"> 
    292     <ant antfile="${org.bedework.project.caldavimpl}/build.xml" inheritall="false" 
    293        target="build-all"  > 
    294       <property name="org.bedework.libcache.dir" 
    295                 location="${org.bedework.project.bedework}/libcache"/> 
    296     </ant> 
    297   </target> 
    298  
    299   <target name="clean.caldavimpl" depends="init" 
    300           description="clean the caldavimpl project"> 
    301     <ant antfile="${org.bedework.project.caldavimpl}/build.xml" inheritall="false" 
    302          target="deep-clean" /> 
    303   </target> 
    304  
    305   <target name="clean.build.caldavimpl" depends="init" 
    306           description="clean builds the caldavimpl project"/> 
    307  
    308   <!-- ................................................................. 
    309                           calendarapi 
    310        .................................................................. --> 
    311   <target name="build.calendarapi" depends="init" 
    312           description="builds the calendar project"> 
    313     <ant antfile="${org.bedework.project.calendarapi}/build.xml" inheritall="false" 
    314            target="build-all"  > 
    315       <property name="org.bedework.libcache.dir" 
    316                 location="${org.bedework.project.bedework}/libcache"/> 
    317     </ant> 
    318   </target> 
    319  
    320   <target name="clean.calendarapi" depends="init" 
    321           description="clean the calendar project"> 
    322     <ant antfile="${org.bedework.project.calendarapi}/build.xml" inheritall="false" 
    323            target="deep-clean" /> 
    324   </target> 
    325  
    326   <target name="clean.build.calendarapi" depends="clean.calendarapi,build.calendarapi" 
    327           description="clean builds the calendarapi project"/> 
    328  
    329   <!-- ................................................................. 
    330                           dumprestore 
    331        .................................................................. --> 
    332   <target name="build.dumprestore" depends="init" 
    333           description="builds the dumprestore project"> 
    334     <ant antfile="${org.bedework.project.dumprestore}/build.xml" inheritall="false" 
    335            target="build-all"  > 
    336       <property name="org.bedework.libcache.dir" 
    337                 location="${org.bedework.project.bedework}/libcache"/> 
    338     </ant> 
    339   </target> 
    340  
    341   <target name="clean.dumprestore" depends="init" 
    342           description="clean the dumprestore project"> 
    343     <ant antfile="${org.bedework.project.dumprestore}/build.xml" inheritall="false" 
    344            target="deep-clean" /> 
    345   </target> 
    346  
    347   <target name="clean.build.dumprestore" depends="clean.dumprestore,build.dumprestore" 
    348           description="builds the dumprestore project"/> 
    349  
    350   <!-- ................................................................. 
    351                           indexer 
    352        .................................................................. --> 
    353   <target name="build.indexer" depends="init" 
    354           description="builds the indexer project"> 
    355     <ant antfile="${org.bedework.project.indexer}/build.xml" inheritall="false" 
    356            target="build-all"  > 
    357       <property name="org.bedework.libcache.dir" 
    358                 location="${org.bedework.project.bedework}/libcache"/> 
    359     </ant> 
    360   </target> 
    361  
    362   <target name="clean.indexer" depends="init" 
    363           description="clean the indexer project"> 
    364     <ant antfile="${org.bedework.project.indexer}/build.xml" inheritall="false" 
    365            target="deep-clean" /> 
    366   </target> 
    367  
    368   <target name="clean.build.indexer" depends="clean.indexer,build.indexer" 
    369           description="builds the indexer project"/> 
    370  
    371   <!-- ................................................................. 
    372                           webapps 
    373        .................................................................. --> 
    374   <target name="build.webapps" depends="init" 
    375           description="builds the webapps project"> 
    376     <ant antfile="${org.bedework.project.webapps}/build.xml" inheritall="false" 
    377            target="build-all"  > 
    378       <property name="org.bedework.libcache.dir" 
    379                 location="${org.bedework.project.bedework}/libcache"/> 
    380     </ant> 
    381   </target> 
    382  
    383   <target name="clean.webapps" depends="init" 
    384           description="clean the webapps project"> 
    385     <ant antfile="${org.bedework.project.webapps}/build.xml" inheritall="false" 
    386            target="deep-clean" /> 
    387   </target> 
    388  
    389   <target name="clean.build.webapps" depends="clean.webapps,build.webapps" 
    390           description="builds the webapps project"/> 
    391  
    392   <!-- ================================================================= 
    393        Targets to build sub-components of this project. 
    394        ================================================================= --> 
    395  
    396   <target name="build.build" depends="init" 
    397           description="builds the java build configuration component"> 
    398     <ant antfile="${org.bedework.project.bedework}/build/build.xml" inheritrefs="true" 
    399            target="build" > 
    400       <property name="build.jar.file" location="${org.bedework.build.jar}" /> 
    401     </ant> 
    402   </target> 
    403  
    404   <!-- Rebuild the http test suite only --> 
    405   <target name="httptest" depends="init" 
    406           description="Run httptest suite" > 
    407     <input message="httptest may destroy this calendar db. Proceed with test" 
    408            validargs="y,n" 
    409            addproperty="do.httptest" /> 
    410     <condition property="do.abort"> 
    411       <equals arg1="n" arg2="${do.httptest}"/> 
    412     </condition> 
    413     <fail if="do.abort">httptest aborted by user.</fail> 
    414  
    415     <ant antfile="${calendar.build.file}" inheritrefs="true" 
    416            target="bld.httptest" /> 
    417  
    418     <ant antfile="${calendar.build.file}" inheritrefs="true" 
    419            target="run.httptest" /> 
    420   </target> 
    421151</project> 
  • trunk/util/svncopy.sh

    r3357 r3413  
    11#!/bin/bash 
    22 
    3 # Copy the current trunk to a new location and adjust the bedework externals property 
     3# Copy all the projects in one branch to a new location 
    44 
    55usage() { 
    6   echo "This script will copy the trunk (or named location) to a new location and" 
    7   echo "adjust the svn:externals property to refer to the new copies" 
     6  echo "This script will copy the trunk (or named location) to a new location" 
    87  echo " " 
    98  echo " $0 help" 
     
    1413  echo " par 3: comment text" 
    1514  echo " " 
    16   echo ' e.g. svncopy branch my-copy "my personal branch"' 
     15  echo " Examples:" 
     16  echo '  svncopy branch my-copy "my personal branch"' 
     17  echo '  svncopy release bedework-4.1 "New release"' 
    1718  echo " " 
    1819  exit 
     
    7071 
    7172# ------------------------------------------------------------------ 
    72 # copyproject - copy a single project. At the same time build up an 
    73 #               externals property file 
     73# copyproject - copy a single project.  
    7474# 
    7575# par 1 - project name 
     
    8080copyproject() { 
    8181  echo "copyproject $1 $2 from $4" 
    82   if [ "${1}" = "caldavimpl" ] 
    83   then 
    84     echo "projects/$1 $SVNREPOSITORY/$1/$2" >> $SCTEMPFILE 
    85   elif [ "${1}" = "calendarapi" ] 
    86   then 
    87     echo "projects/$1 $SVNREPOSITORY/$1/$2" >> $SCTEMPFILE 
    88   elif [ "${1}" = "dumprestore" ] 
    89   then 
    90     echo "projects/$1 $SVNREPOSITORY/$1/$2" >> $SCTEMPFILE 
    91   elif [ "${1}" = "indexer" ] 
    92   then 
    93     echo "projects/$1 $SVNREPOSITORY/$1/$2" >> $SCTEMPFILE 
    94   elif [ "${1}" = "webapps" ] 
    95   then 
    96     echo "projects/$1 $SVNREPOSITORY/$1/$2" >> $SCTEMPFILE 
    97   fi 
     82 
    9883  svn copy -m "$3" -rHEAD $SVNREPOSITORY/$1/$4 $SVNREPOSITORY/$1/$2 
    9984} 
     
    119104PROJECTS="$PROJECTS access" 
    120105PROJECTS="$PROJECTS bedework" 
     106#  bwalarms  - later 
     107PROJECTS="$PROJECTS bwannotations" 
     108PROJECTS="$PROJECTS bwcalcore" 
     109PROJECTS="$PROJECTS bwcaldav" 
     110PROJECTS="$PROJECTS bwcalFacade" 
     111#  bwcrawler - can probably delete 
     112PROJECTS="$PROJECTS bwdeployutil" 
     113PROJECTS="$PROJECTS bwical" 
     114PROJECTS="$PROJECTS bwinterfaces" 
     115PROJECTS="$PROJECTS bwmisc" 
     116PROJECTS="$PROJECTS bwsysevents" 
    121117PROJECTS="$PROJECTS bwtools" 
    122118PROJECTS="$PROJECTS bwtzsvr" 
     119PROJECTS="$PROJECTS bwwebapps" 
    123120PROJECTS="$PROJECTS bwxml" 
    124121PROJECTS="$PROJECTS cachedfeeder" 
    125122PROJECTS="$PROJECTS caldav" 
    126 PROJECTS="$PROJECTS caldavimpl" 
     123#  caldavimpl - dropped in 3.8 release 
    127124PROJECTS="$PROJECTS caldavTest" 
    128 PROJECTS="$PROJECTS calendarapi" 
     125#  calendarapi - dropped in 3.8 release 
    129126PROJECTS="$PROJECTS carddav" 
    130127PROJECTS="$PROJECTS clientapp" 
     
    132129PROJECTS="$PROJECTS davutil" 
    133130PROJECTS="$PROJECTS dumprestore" 
     131#  exchgGateway - later 
     132#  exchgsynch - delete this one  
     133#   freebusy   - aggregator - not supported 
    134134PROJECTS="$PROJECTS indexer" 
    135135PROJECTS="$PROJECTS monitor" 
    136136PROJECTS="$PROJECTS naming" 
    137137PROJECTS="$PROJECTS rpiutil" 
    138 # PROJECTS="$PROJECTS synch" 
     138PROJECTS="$PROJECTS synch" 
     139#   synchml  - delete? 
    139140PROJECTS="$PROJECTS testsuite" 
    140 PROJECTS="$PROJECTS webapps" 
     141#   timezones ? 
     142#   webapps   dropped in 3.8 
     143#   webcache ? 
    141144PROJECTS="$PROJECTS webdav" 
    142  
    143 SCTEMPDIR="${TMPDIR:=/tmp}/svncopydir$$" 
    144 SCTEMPFILE=$SCTEMPDIR/svncopy 
    145  
    146 mkdir $SCTEMPDIR 
    147  
    148 # Assure the file is removed at program termination 
    149 # or after we received a signal: 
    150 trap 'rm -rf "$SCTEMPDIR" >/dev/null 2>&1' 0 
    151 trap "exit 2" 1 2 3 15 
    152145 
    153146for project in $PROJECTS 
     
    155148   copyproject "$project" "$TARGET" "$COMMENT" "$SOURCE" 
    156149done 
    157  
    158 svn co -N $SVNREPOSITORY/bedework/$TARGET $SCTEMPDIR/bedework 
    159 svn propset svn:externals -F $SCTEMPFILE $SCTEMPDIR/bedework 
    160 svn commit -N -m "Change externals to new copies" $SCTEMPDIR/bedework 
    161  
    162 #more $SCTEMPFILE