Skip to content
This repository
tree: c0281ad7da
Fetching contributors…

Cannot retrieve contributors at this time

file 505 lines (418 sloc) 18.591 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505
<project name="Quartz.NET" xmlns="http://nant.sf.net/release/0.90/nant.xsd" default="build">

  <!-- what kind of build -->
  <property name="build.configuration" value="debug" overwrite="false" />
  <property name="build.optimize" value="false" overwrite="false" />
  <property name="build.debug" value="Full" overwrite="false" />
  <property name="build.keyfile" value="quartz.net.snk" overwrite="false" />

  <!-- whether to use C5 collection library -->
  <property name="c5-collections" value="true" overwrite="false" />
  <property name="build.defines" value="DEBUG,TRACE" />
  <if test="${c5-collections}" >
    <property name="build.defines" value="${build.defines},C5" />
  </if>

  <call target="init" />

  <target name="init">
   
    <!-- Check target framework -->
    <property name="target.framework" value="3.5" overwrite="false" />

    <!-- set global target framework to 3.5 by default -->
    <property name="nant.settings.currentframework" value="net-3.5" />

    <!-- Set directories -->
    <property name="dir.src" value="src\" />
    <property name="dir.server.src" value="server\"/>
    <property name="dir.doc" value="doc\" />
    <property name="dir.build" value="build\${target.framework}\${build.configuration}" />
    <property name="dir.deployment" value="deployment\${target.framework}" />

    
    <mkdir dir="${dir.build}" />

  </target>


  <target name="build">
    <call target="build-${target.framework}" />
  </target>

  <target name="build-all">
    <call target="build-mono-2.0" />
    <call target="build-3.5" />
    <call target="build-4.0" />
  </target>

  <target name="build-3.5">
    <property name="build.defines" value="${build.defines}" />

    <property name="target.framework" value="3.5" />
    <call target="build-all-csc" />
  </target>

  <target name="build-4.0">
    <property name="build.defines" value="${build.defines},NET_40" />

    <property name="target.framework" value="4.0" />
    <property name="nant.settings.currentframework" value="net-4.0" />
    <call target="build-all-csc" />
  </target>

  <target name="build-mono-2.0">
    <property name="build.defines" value="${build.defines},MONO" />

    <property name="target.framework" value="mono-2.0" />
    <property name="nant.settings.currentframework" value="${target.framework}" />
    <call target="build-all-csc" />

  </target>

  <target name="build-quartz" >

    <mkdir dir="build\${target.framework}\${build.configuration}\Quartz\" />

    <property name="target.dir" value="build\${target.framework}\${build.configuration}\Quartz" />
    <property name="client-profile" value="false" />
    <call target="compile-quartz" />

    <!-- client profile -->
    <property name="original.build.defines" value="${build.defines}" />
    <property name="build.defines" value="${build.defines},ClientProfile" />
    <property name="target.dir" value="build\${target.framework}\${build.configuration}\Quartz\ClientProfile" />
    <property name="client-profile" value="true" />
    <call target="compile-quartz" />
    <property name="build.defines" value="${original.build.defines}" />

    <copy todir="build\${target.framework}\${build.configuration}\Quartz\" flatten="true" >
      <fileset>
        <include name="lib\2.0\Common.Logging.dll" />
        <include name="lib\2.0\C5.dll" if="${c5-collections}" />
      </fileset>
    </copy>


  </target>

  <target name="compile-quartz">
    <csc
      target="library"
      output="${target.dir}\Quartz.dll"
      doc="${target.dir}\Quartz.xml"
      debug="${build.debug}"
      define="${build.defines}"
      optimize="${build.optimize}"
      noconfig="true"
      keyfile="${build.keyfile}">
      <nowarn>
        <!-- do not report warnings for missing XML comments -->
        <warning number="0162" />
        <warning number="0168" />
        <warning number="1591" />
        <warning number="0618" />
      </nowarn>
      <sources>
        <include name="src/AssemblyInfo.cs" />
        <include name="src/Quartz/**/*.cs" />
      </sources>
      <resources dynamicprefix="false" prefix="Quartz">
        <include name="src/Quartz/quartz.config" />
      </resources>
      <resources dynamicprefix="false" prefix="Quartz.Impl.AdoJobStore.Common">
        <include name="src/Quartz/Impl/AdoJobStore/Common/dbproviders.properties" />
      </resources>
      <references>
        <include name="System.dll" />
        <include name="System.Core.dll" />
        <include name="System.Configuration.dll" />
        <include name="System.Data.dll" />
        <include name="System.Runtime.Remoting.dll" />
        <include name="System.Web.dll" unless="${client-profile}" />
        <include name="System.Xml.dll" />
        <include name="lib\2.0\Common.Logging.dll" />
        <include name="lib\2.0\C5.dll" if="${c5-collections}" />
      </references>
    </csc>

  </target>


  <target name="build-examples" depends="build-quartz">

    <mkdir dir="build\${target.framework}\${build.configuration}\Quartz.Examples\" />

    <csc
      target="exe"
      output="build\${target.framework}\${build.configuration}\Quartz.Examples\Quartz.Examples.exe"
      debug="${build.debug}"
      optimize="${build.optimize}"
      define="${build.defines}">
      <nowarn>
        <!-- do not report warnings for missing XML comments -->
        <warning number="0162" />
        <warning number="0168" />
        <!--<warning number="0246" />-->
        <warning number="0618" />
      </nowarn>
      <sources>
        <include name="src/AssemblyInfo.cs" />
        <include name="src/Quartz.Examples/**/*.cs" />
      </sources>
      <references>
        <include name="System.dll" />
        <include name="System.Data.dll" />
        <include name="lib\2.0\Common.Logging.dll" />
        <include name="build\${target.framework}\${build.configuration}\Quartz\Quartz.dll" />
        <include name="lib\2.0\C5.dll" if="${c5-collections}" />
      </references>
    </csc>

    <copy todir="build\${target.framework}\${build.configuration}\Quartz.Examples\" flatten="true" >
      <fileset>
        <include name="build\${target.framework}\${build.configuration}\Quartz\Quartz.*" />
        <include name="lib\2.0\Common.Logging.dll" />
        <include name="lib\2.0\C5.dll" if="${c5-collections}" />
      </fileset>
    </copy>
    <copy file="src\Quartz.Examples\App.config" tofile="build\${target.framework}\${build.configuration}\Quartz.Examples\Quartz.Examples.exe.config" />
  </target>

  <target name="build-server-3.5">
    <property name="lib-dir-version" value="2.0" />
    <property name="build.defines" value="C5" />

    <property name="target.framework" value="3.5" />
    <property name="nant.settings.currentframework" value="net-${target.framework}" />

    <call target="build-server-internal" />
  </target>

  <target name="build-server-4.0">
    <property name="lib-dir-version" value="2.0" />
    <property name="build.defines" value="NET_40,C5" />

    <property name="target.framework" value="4.0" />
    <property name="nant.settings.currentframework" value="net-${target.framework}" />

    <call target="build-server-internal" />
  </target>

  <target name="build-server-internal" depends="build-quartz">

    <mkdir dir="build\${target.framework}\${build.configuration}\Quartz.Server\" />

    <csc
      target="exe"
      output="build\${target.framework}\${build.configuration}\Quartz.Server\Quartz.Server.exe"
      debug="${build.debug}"
      optimize="${build.optimize}"
      define="${build.defines}">
      <nowarn>
      </nowarn>
      <sources>
        <include name="${dir.server.src}/AssemblyInfo.cs" />
        <include name="${dir.server.src}/Quartz.Server/**/*.cs" />
        <include name="${dir.server.src}/Quartz.Server.Core/**/*.cs" />
      </sources>
      <references>
        <include name="System.dll" />
        <include name="System.Data.dll" />
        <include name="lib\2.0\Common.Logging.dll" />
        <include name="lib\other\${target.framework}\TopShelf.dll" />
        <include name="build\${target.framework}\${build.configuration}\Quartz\Quartz.dll" />
        <include name="lib\2.0\C5.dll" if="${c5-collections}" />
      </references>
    </csc>
    <copy todir="build\${target.framework}\${build.configuration}\Quartz.Server\" flatten="true" >
      <fileset>
        <include name="build\${target.framework}\${build.configuration}\Quartz\Quartz.dll" />
        <include name="build\${target.framework}\${build.configuration}\Quartz\Quartz.pdb" />
        <include name="lib\2.0\Common.Logging.dll" />
        <include name="lib\2.0\Common.Logging.Log4Net.dll" />
        <include name="lib\other\log4net.dll" />
        <include name="lib\other\${target.framework}\TopShelf.dll" />
        <include name="lib\2.0\C5.dll" if="${c5-collections}" />
      </fileset>
    </copy>
    
    <copy file="${dir.server.src}\Quartz.Server\App.config" tofile="build\${target.framework}\${build.configuration}\Quartz.Server\Quartz.Server.exe.config" />
    <copy file="${dir.server.src}\Quartz.Server\quartz_jobs.xml" todir="build\${target.framework}\${build.configuration}\Quartz.Server" />
    <copy file="${dir.server.src}\Quartz.Server\quartz.config" todir="build\${target.framework}\${build.configuration}\Quartz.Server" />

  </target>

  <target name="build-tests">
    <property name="test.project" value="Integration" />
    <call target="build-tests-internal" />
    <property name="test.project" value="Unit" />
    <call target="build-tests-internal" />
  </target>

  <target name="build-tests-internal" depends="build-quartz">

    <mkdir dir="build\${target.framework}\${build.configuration}\Quartz.Tests.${test.project}\" />

    <csc
      target="library"
      output="build\${target.framework}\${build.configuration}\Quartz.Tests.${test.project}\Quartz.Tests.${test.project}.dll"
      debug="${build.debug}"
      optimize="${build.optimize}"
      define="${build.defines}">
      <nowarn>
        <!-- do not report warnings for missing XML comments -->
        <warning number="0162" />
        <warning number="0168" />
        <warning number="0618" />
      </nowarn>
      <sources>
        <include name="src/AssemblyInfo.cs" />
        <include name="src/Quartz.Tests.${test.project}/**/*.cs" />
      </sources>
      <resources dynamicprefix="false" prefix="Quartz.Tests.Unit.Xml.TestData">
        <include name="src/Quartz.Tests.Unit/Xml/TestData/MinimalConfiguration.xml" />
        <include name="src/Quartz.Tests.Unit/Xml/TestData/RichConfiguration.xml" />
        <include name="src/Quartz.Tests.Unit/Xml/TestData/MinimalConfiguration_20.xml" />
        <include name="src/Quartz.Tests.Unit/Xml/TestData/RichConfiguration_20.xml" />
      </resources>
      <references>
        <include name="System.dll" />
        <include name="System.Data.dll" />
        <include name="lib\2.0\Common.Logging.dll" />
        <include name="lib\2.0\nunit.framework.dll" />
        <include name="build\${target.framework}\${build.configuration}\Quartz\Quartz.dll" />
        <include name="lib\2.0\Rhino.Mocks.dll" />
        <include name="lib\2.0\C5.dll" if="${c5-collections}" />
      </references>
    </csc>

    <copy todir="build\${target.framework}\${build.configuration}\Quartz.Tests.${test.project}\" flatten="true" >
      <fileset>
        <include name="build\${target.framework}\${build.configuration}\Quartz\Quartz.*" />
        <include name="lib\2.0\Common.Logging.dll" />
        <include name="lib\2.0\nunit.framework.dll" />
        <include name="lib\2.0\Rhino.Mocks.dll" />
        <include name="lib\2.0\C5.dll" if="${c5-collections}" />
      </fileset>
    </copy>

  </target>

  <target name="unit">
    <call target="unit-3.5" />
    <call target="unit-4.0" />
  </target>

  <target name="unit-3.5" depends="build-3.5">
    <call target="unit-internal" />
  </target>

  <target name="unit-4.0" depends="build-4.0">
    <call target="unit-internal" />
  </target>

  <target name="unit-internal" depends="build">
    <property name="test.dll" value="build\${target.framework}\${build.configuration}\Quartz.Tests.Unit\Quartz.Tests.Unit.dll" />
    <echo message="Testing dll: ${test.dll}" />
    <nunit2 verbose="true" failonerror="false">
      <formatter type="Plain" />
      <test assemblyname="${test.dll}" />
    </nunit2>
  </target>


  <target name="clean">
    <echo message="Cleaning old compiled dlls..." />
    <delete failonerror="false" dir="./build" />
    <delete failonerror="false" dir="./CloverBuild" />
    <delete failonerror="false" dir="./CloverReport" />
    <delete failonerror="false" dir="./package" />
    <delete failonerror="false" file="./Quartz-x.x.zip" />
    <echo message="Cleaning old temporary build files (obj and bin dirs)..." />
    <delete>
      <fileset>
        <include name="${dir.src}\**\obj\**" />
        <include name="${dir.src}\**\bin\**" />
      </fileset>
    </delete>
  </target>

  <target name="doc" depends="build">

    <mkdir dir="doc\apidoc" />

    <property name="dir.ndoc.target.binaries" value="${dir.build}\Quartz\" />
    <echo message="Building documentation using binaries found from ${dir.ndoc.target.binaries}" />

    <ndoc>
      <assemblies basedir="${dir.ndoc.target.binaries}">
        <include name="Quartz.dll" />
      </assemblies>

      <summaries basedir="${dir.src}\">
        <include name="NamespaceSummary.xml" />
      </summaries>
      <documenters>
        <documenter name="MSDN">
          <property name="OutputDirectory" value="doc\apidoc" />
          <property name="HtmlHelpName" value="Quartz.NET" />
          <property name="HtmlHelpCompilerFilename" value="hhc.exe" />
          <property name="IncludeFavorites" value="False" />
          <property name="Title" value="Quartz.NET Class Library" />
          <property name="SplitTOCs" value="False" />
          <property name="DefaulTOC" value="" />
          <property name="ShowVisualBasic" value="False" />
          <property name="ShowMissingSummaries" value="False" />
          <property name="ShowMissingRemarks" value="False" />
          <property name="ShowMissingParams" value="False" />
          <property name="ShowMissingReturns" value="False" />
          <property name="ShowMissingValues" value="False" />
          <property name="DocumentInternals" value="False" />
          <property name="DocumentProtected" value="True" />
          <property name="DocumentPrivates" value="False" />
          <property name="DocumentEmptyNamespaces" value="False" />
          <property name="IncludeAssemblyVersion" value="True" />
          <property name="CopyrightText" value="Copyright 2001-2009 Terracotta Inc. and partially Marko Lahma" />
          <property name="CopyrightHref" value="" />
        </documenter>
      </documenters>
    </ndoc>
    <!-- clean unwanted items -->
    <delete>
      <fileset>
        <include name="doc\apidoc\**\ndoc_msdn_temp" />
        <include name="doc\apidoc\**\*.chm" />
        <include name="doc\apidoc\**\*.hhc" />
        <include name="doc\apidoc\**\*.hhk" />
        <include name="doc\apidoc\**\*.hhp" />
      </fileset>
    </delete>
  </target>

  <target name="package-release">

    <call target="init" />

    <property name="build.configuration" value="release" />
    <property name="build.optimize" value="true" />
    <property name="build.debug" value="PdbOnly" />
    <property name="build.defines" value="TRACE,STRONG" />
<property name="build.keyfile" value="Quartz.Net.snk" />

    <if test="${c5-collections}" >
      <property name="build.defines" value="${build.defines},C5" />
    </if>

    <call target="clean" />
    <call target="build-3.5" />
    <call target="build-server-3.5" />
    <call target="build-4.0" />
    <call target="build-server-4.0" />

    <delete dir="package" failonerror="false" />
    <mkdir dir="package" />
    <mkdir dir="package\database" />
    <mkdir dir="package\src" />
    <mkdir dir="package\server" />

    <copy todir="package">
      <fileset>
        <include name="${dir.src}\**" />
        <include name="${dir.server.src}\**" />
        <include name="build\**\Quartz\**" />
        <include name="database\**" />
        <include name="lib\**" />
        <include name="*.sln" />
        <include name="*.txt" />
        <include name="*.build" />

        <exclude name="lib/other" />
        <exclude name="**/.svn/**" />
        <exclude name="**/_svn/**" />
        <exclude name="**/*.suo" />
        <exclude name="**/*.user" />
        <exclude name="**/obj/**" />
      </fileset>
    </copy>

    <copy todir="package\server\bin\4.0" flatten="true">
      <fileset>
        <include name="build\4.0\${build.configuration}\Quartz.Server\**" />
      </fileset>
    </copy>

    <copy todir="package\server\bin\3.5" flatten="true">
      <fileset>
        <include name="build\3.5\${build.configuration}\Quartz.Server\**" />
      </fileset>
    </copy>

    <copy todir="package\doc\xml" flatten="true">
      <fileset>
        <include name="src\**\job_scheduling_data*.xsd" />
      </fileset>
    </copy>

    <copy file="src\Quartz.Tests.Unit\Xml\TestData\RichConfiguration.xml" tofile="package\doc\xml\quartz_sample.xml" />

    <!-- sorry *nix folks, couldn't get move to work as expected.. -->
    <exec program="cmd" commandline="/c move package\build package\bin" />

    <zip zipfile="Quartz.NET-x.x.zip">
      <fileset basedir="package">
        <include name="**/*" />
      </fileset>
    </zip>

<exec program="tools\NuGet\NuGet.exe" commandline="pack Quartz.nuspec" />

  </target>

  <target name="build-all-csc">
    <property name="build.defines" value="" overwrite="false" />
    <property name="lib-dir-version" value="${target.framework}" overwrite="false" />

    <call target="build-quartz" />
    <call target="build-examples" />
    <call target="build-tests" />

  </target>

  <target name="build-website">

    <loadtasks assembly="lib\other\Anakia.dll" verbose="true" />

    <mkdir dir="website" failonerror="false" />
<property name="website.src" value="../website" />

    <anakia
            navigationfile="${website.src}/navigation.xml"
            templatefile="${website.src}/site.vsl"
            projectfile="${website.src}/project.xml"
            targetdir="website\"
            >

      <source basedir="${website.src}">
        <include name="**.*" />

        <exclude name="**/project.xml" />
        <exclude name="**/*.vsl" />
        <exclude name="**/*.dtd" />
      </source>
    </anakia>
  </target>
</project>
Something went wrong with that request. Please try again.