debian/0000755000000000000000000000000012225773741007200 5ustar debian/control0000644000000000000000000000241012225773544010601 0ustar Source: nant Section: devel Priority: optional Maintainer: Debian CLI Applications Team Uploaders: David Paleino Build-Depends: debhelper (>= 7.0.50~) Build-Depends-Indep: cli-common-dev (>= 0.5.7), liblog4net-cil-dev, libnunit-cil-dev (>= 2.6), mono-devel (>= 2.10.1), pkg-config Standards-Version: 3.9.3 Homepage: http://nant.sourceforge.net/ Vcs-Git: git://anonscm.debian.org/pkg-cli-apps/packages/nant.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-cli-apps/packages/nant.git;a=summary Package: nant Architecture: all Depends: mono-devel (>= 2.0.1), pkg-config, ${cli:Depends}, ${misc:Depends} Description: build tool similar to Ant NAnt is different than Make. Instead of a model where it is extended with shell-based commands, NAnt is extended using task classes. Instead of writing shell commands, the configuration files are XML-based, calling out a target tree where various tasks get executed. Each task is run by an object that implements a particular Task interface. . NAnt supports different target frameworks: - Microsoft .NET Framework version 1.0 through 4.0, plus Silverlight - Mono 1.0 through 4.0 debian/copyright0000644000000000000000000000305712225773544011141 0ustar This package was debianized by John Goerzen on Thu, 26 Aug 2004 10:27:38 -0500. It was downloaded from http://nant.sf.net/ Copyright (C) 2003-2006 Gerry Shaw License: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA In addition, as a special exception, Gerry Shaw gives permission to link the code of this program with the Microsoft .NET library (or with modified versions of Microsoft .NET library that use the same license as the Microsoft .NET library), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than the Microsoft .NET library. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. Debian users can find the GNU General Public License in /usr/share/common-licenses/GPL. debian/compat0000644000000000000000000000000212225773544010377 0ustar 7 debian/changelog0000644000000000000000000003717012225774250011056 0ustar nant (0.92~rc1+dfsg-3) unstable; urgency=low * [93b6f15] Add debian/patches/ use_mono_mcs_common_compiler_infrastructure.patch (Cherry picked from 69c8ee96493c5d953212397c8ca06c2392372ca4) (Closes: #713760, #713768) -- Jo Shields Fri, 11 Oct 2013 15:06:40 +0200 nant (0.92~rc1+dfsg-2) unstable; urgency=low * Upload to unstable. -- Jo Shields Sun, 27 May 2012 16:59:31 +0100 nant (0.92~rc1+dfsg-1) experimental; urgency=low * [73a7503] Standards-Version → 3.9.3, no changes * [4073149] Remove useless DMUA flag * [4af100d] refresh patches * [f16bb89] remove-netDumbster.patch * [6bdd529] s/destdir/DESTDIR/ * [3d0a2ee] add lowercase-docdir.patch: use usr/share/doc/nant as docdir * [2f79f36] wrap-and-sort debian/ * [488bab1] bump nunit b-d to >= 2.6 * [f391286] add get-orig-source * [1c6cddf] use --with cli instead of cli.make -- Julian Taylor Sat, 26 May 2012 21:48:22 +0100 nant (0.91~alpha2+dfsg-4) unstable; urgency=low * Upload to unstable * [fec82c9] Fix spacing in debian/control -- Iain Lane Tue, 17 Jan 2012 22:18:23 +0000 nant (0.91~alpha2+dfsg-3) experimental; urgency=low * [1048e01] Build against Mono 2.10. This causes nant to use the 4.0 profile by default and therefore to be used to compile 4.0 packages hopefully without further changes. -- Iain Lane Fri, 29 Jul 2011 21:42:56 +0100 nant (0.91~alpha2+dfsg-2) experimental; urgency=low * [d130072] Update patches to build against NUnit 2.5, not bundled 2.2. * [06d961e] Mandate NUnit 2.5 in the build-dependencies -- Jo Shields Mon, 04 Jul 2011 17:16:33 +0100 nant (0.91~alpha2+dfsg-1) unstable; urgency=low [ Jelmer Vernooij ] * Remove myself from uploaders. [ Jo Shields ] * [ff1d1e1] Imported Upstream version 0.91~alpha2+dfsg * [9b374bc] Bump Debian Standards Version to 3.9.2. * [8d53875] Refresh package description slightly. * [5087eab] Refresh Vcs-* fields. * [31d87a4] Migrate from dpatch to DebSrc 3.0 (quilt). * [d076fc0] Refresh debian/rules to use dh7-style rules. * [634354c] Reverse order of imported patches, as some depend on others. * [e724652] Refresh debian/patches/000-fix_build_system.patch and DESTDIR. * [f76581e] Refresh debian/patches/001-nant-task-cs-InitializeElement.patch. * [72d654f] Refresh debian/patches/002-nant-load-partial-name.patch. * [f513c5b] Refresh debian/patches/003-nant-use-system-dlls.patch. * [b4fc082] Refresh debian/patches/004-nant-nunit_2.4.patch. * [1424d3d] Remove 005-nant-ExternalProgramBase-race.patch - committed upstream. * [ac1e636] Refresh debian/patches/006-nant-dont-build-ndoc-support.patch. * [d13dc8e] Backport support for 4.0 with Mono from upstream. * [d0cdf99] Downgrade #ziplib API, as bundle version is newer than Mono version. * [327fe55] Tweak destdir for DH7 semantics. -- Jo Shields Fri, 01 Jul 2011 00:07:23 +0100 nant (0.85.dfsg1-9) unstable; urgency=low [ David Paleino ] * debian/control: + Updated my e-mail address [ Jo Shields ] * debian/control: + No-change bump to Standards 3.8.3 + Build-depend on -cil-dev packages * debian/rules, debian/control: + Use mono-csc from mono-devel 2.4.3 as compiler command (Closes: #562366) -- Jo Shields Wed, 06 Jan 2010 15:10:39 +0000 nant (0.85.dfsg1-8) unstable; urgency=low * debian/patches/006-nant-dont-build-ndoc-support.dpatch, debian/control: + Remove support for ndoc task - we don't use it, and it pulls in undesirable dependencies. This also breaks a nasty circular build-dep on libndoc1.3-cil, which is built by nant -- Jo Shields Mon, 15 Jun 2009 20:12:47 +0100 nant (0.85.dfsg1-7) unstable; urgency=low * Upload to unstable. -- Mirco Bauer Thu, 26 Feb 2009 00:23:47 +0100 nant (0.85.dfsg1-6) experimental; urgency=low * debian/control: + removed 1.0 Build-Dependencies + using mono-devel instead of mono-gmcs in runtime Depends + debhelper dependency bumped to >= 7 + added ${misc:Depends} to nant * debian/patches/: + 000-fix_build_system.dpatch added * debian/rules: + Rewritten and switched to dh7-style * debian/compat bumped to 7 * debian/watch updated to version 3 -- David Paleino Wed, 03 Dec 2008 17:46:17 +0100 nant (0.85.dfsg1-5) unstable; urgency=low [ David Paleino ] * debian/control: + Removed Dave Beckett from Uploaders. [ Mirco Bauer ] * debian/control: + Enhanced package description. + Added Vcs-Browser field. + Bumped cli-common-dev build-dep to >= 0.5.4 as we are using dh_clistrip and dh_clifixperms from it. * debian/rules: + Removed -m paramater to dh_clideps call, as it doesn't know such parameter. + Added dh_clistrip and dh_clifixperms calls. + Removed find call to fix file permissions, as dh_clifixperms takes now care of this. + Removed dh_shlibdeps call as this package doesn't contain native binaries or libraries. + Delete examples/StyleTask/SimpleExtensionObject/SimpleExtension.dll before the build to force nant to rebuild it (as the file is shipped in the tarball). * debian/patches/005-nant-ExternalProgramBase-race.dpatch: + New patch to prevent Mono detection failure due to a race on SMP machines. Based on upstream fix for bug 1733671 (Closes: #483073) (thanks goes to Y Giridhar Appaji Nag for investigation and providing the dpatch) -- Mirco Bauer Thu, 16 Oct 2008 22:50:40 +0200 nant (0.85.dfsg1-4) unstable; urgency=low * Use right NDoc directory. (Closes: #492300) -- Jelmer Vernooij Fri, 25 Jul 2008 04:29:19 +0200 nant (0.85.dfsg1-3) unstable; urgency=low * Fix build dependency on renamed libndoc1.3-cil. (Closes: #490322) -- Jelmer Vernooij Tue, 22 Jul 2008 23:34:19 +0200 nant (0.85.dfsg1-2) unstable; urgency=low * Build against version 2.4 of nunit. * Bump standards version to 3.8.0. * Cope with dfsg mangling in watch file. -- Jelmer Vernooij Sat, 14 Jun 2008 16:59:38 +0200 nant (0.85.dfsg1-1) unstable; urgency=low * Remove binaries without source. (Closes: #374634) -- Jelmer Vernooij Mon, 26 May 2008 23:12:50 +0200 nant (0.85-3) unstable; urgency=low * Changed maintainer to Debian CLI Applications Team. (Closes: #477064) * Add myself as uploader. * Use newer nunit (libnunit2.2.6-cil) * Add patch to work around obsolete System.Reflection.Assembly.LoadWithPartialName(). (Closes: #475213) -- Jelmer Vernooij Mon, 26 May 2008 21:15:12 +0200 nant (0.85-2) unstable; urgency=low * Depend on mono-gmcs (Closes: #408395) * Added patch 001-nant-task-cs-InitializeElement.dpatch to get around Mono compiler turning a former warning into an error. Again. (Closes: #422838) -- Dave Beckett Sun, 24 Jun 2007 12:15:53 -0700 nant (0.85-1) unstable; urgency=low * New upstream release * It only took 2 years 11 months to go from 0.84 to 0.85 * Build depend indep on cli-common-dev (>= 0.4.4) -- Dave Beckett Sun, 15 Oct 2006 00:25:05 -0700 nant (0.84+0.85-rc4-1) unstable; urgency=low * New upstream release * Acknowledge NMU (Closes: #372588) * Standards-Version 3.7.2 * Update to latest CLI policy package split. Build-Depends-Indep: on cli-common-dev, libmono-winforms1.0-cil, libmono-winforms2.0-cil and mono-gmcs to get 1.0 and 2.0 packages * Removed patches no longer needed: - 01-AssemblyInfoTask.cs.patch - 02-ScriptTask.cs.patch - 03-XmlResultFormatter.cs.patch - 04-SourceControl.patch - 05-ExceptionTest.cs -- Dave Beckett Mon, 12 Jun 2006 23:30:36 -0700 nant (0.84+0.85-rc3-10.1) unstable; urgency=low * Non-maintainer upload. * Add a build-dep on libmono-winforms1.0-cil to fix FTBFS, thanks Daniel Schepler. (Closes: #370163) [debian/control] -- Loic Minier Sat, 10 Jun 2006 14:37:38 +0200 nant (0.84+0.85-rc3-10) unstable; urgency=low * Remove call to dh_makeclilibs since nant has no public GAC installed libraries (Closes: 361976) -- Dave Beckett Tue, 11 Apr 2006 09:09:30 -0700 nant (0.84+0.85-rc3-9) unstable; urgency=low * Update debian/watch again to use http://qa.debian.org/watch/sf.php to try to follow sourceforge updates. * Depend on cli-common (>= 0.2.0) -- Dave Beckett Sat, 4 Feb 2006 23:03:29 -0800 nant (0.84+0.85-rc3-8) unstable; urgency=low * Depend on libmono-dev to get mono.pc at runtime. -- Dave Beckett Mon, 20 Jun 2005 10:10:51 +0100 nant (0.84+0.85-rc3-7) unstable; urgency=low * Removed obsolete Build-Depend: on mono-jit and mono-utils * Fixed debian/watch file * Added patches from CVS HEAD to build with mono 1.1.8 packages: - 01-AssemblyInfoTask.cs.patch - 02-ScriptTask.cs.patch - 03-XmlResultFormatter.cs.patch - 04-SourceControl.patch - 05-ExceptionTest.cs -- Dave Beckett Sat, 18 Jun 2005 14:49:10 +0100 nant (0.84+0.85-rc3-6) unstable; urgency=low * Upload to unstable now that mono is in unstable * Added debian/watch file -- Dave Beckett Thu, 16 Jun 2005 11:52:30 +0100 nant (0.84+0.85-rc3-5) experimental; urgency=low * Tiny nant.1 fix * Checked pending bugs that were fixed with new upstream or packaging: - Nant builds reliably inside pbuilder using the mono 1.1.x experimental debs (Closes: #300416). - The mono resgen.exe is now correctly invoked by the task (Closes: #283740) -- Dave Beckett Fri, 20 May 2005 19:02:36 +0100 nant (0.84+0.85-rc3-4) experimental; urgency=low * Make /usr/bin/nant exec cli and NAnt.exe rather than use old cli-wrapper * Wrote a manual page for nant -- Dave Beckett Mon, 16 May 2005 12:31:10 +0100 nant (0.84+0.85-rc3-3) experimental; urgency=low * Remove debian/resgen and update debian/dirs to new mono conventions * Depend on mono 1.1.6 -- Dave Beckett Mon, 16 May 2005 11:22:25 +0100 nant (0.84+0.85-rc3-2) experimental; urgency=low * Rebuild against mono 1.1 experimental -- Dave Beckett Mon, 16 May 2005 10:29:31 +0100 nant (0.84+0.85-rc3-1) unstable; urgency=low * New upstream version. -- Dave Beckett Wed, 20 Apr 2005 20:51:57 +0100 nant (0.84+0.85-rc1-2) unstable; urgency=low * New Maintainer (Closes: 305458) -- Dave Beckett Wed, 20 Apr 2005 16:00:37 +0100 nant (0.84+0.85-rc1-1) unstable; urgency=low * New upstream version. -- John Goerzen Mon, 13 Dec 2004 09:08:02 -0600 nant (0.84+0.85-20040825-2) unstable; urgency=low * Added dependencies on pkg-config and related packages. -- John Goerzen Thu, 26 Aug 2004 13:54:55 -0500 nant (0.84+0.85-20040825-1) unstable; urgency=low * Initial Release. Closes: #268207. -- John Goerzen Thu, 26 Aug 2004 10:27:38 -0500 nant (0.85-2) unstable; urgency=low * Depend on mono-gmcs (Closes: #408395) * Added patch 001-nant-task-cs-InitializeElement.dpatch to get around Mono compiler turning a former warning into an error. Again. (Closes: #422838) -- Dave Beckett Sun, 24 Jun 2007 12:15:53 -0700 nant (0.85-1) unstable; urgency=low * New upstream release * It only took 2 years 11 months to go from 0.84 to 0.85 * Build depend indep on cli-common-dev (>= 0.4.4) -- Dave Beckett Sun, 15 Oct 2006 00:25:05 -0700 nant (0.84+0.85-rc4-1) unstable; urgency=low * New upstream release * Acknowledge NMU (Closes: #372588) * Standards-Version 3.7.2 * Update to latest CLI policy package split. Build-Depends-Indep: on cli-common-dev, libmono-winforms1.0-cil, libmono-winforms2.0-cil and mono-gmcs to get 1.0 and 2.0 packages * Removed patches no longer needed: - 01-AssemblyInfoTask.cs.patch - 02-ScriptTask.cs.patch - 03-XmlResultFormatter.cs.patch - 04-SourceControl.patch - 05-ExceptionTest.cs -- Dave Beckett Mon, 12 Jun 2006 23:30:36 -0700 nant (0.84+0.85-rc3-10.1) unstable; urgency=low * Non-maintainer upload. * Add a build-dep on libmono-winforms1.0-cil to fix FTBFS, thanks Daniel Schepler. (Closes: #370163) [debian/control] -- Loic Minier Sat, 10 Jun 2006 14:37:38 +0200 nant (0.84+0.85-rc3-10) unstable; urgency=low * Remove call to dh_makeclilibs since nant has no public GAC installed libraries (Closes: 361976) -- Dave Beckett Tue, 11 Apr 2006 09:09:30 -0700 nant (0.84+0.85-rc3-9) unstable; urgency=low * Update debian/watch again to use http://qa.debian.org/watch/sf.php to try to follow sourceforge updates. * Depend on cli-common (>= 0.2.0) -- Dave Beckett Sat, 4 Feb 2006 23:03:29 -0800 nant (0.84+0.85-rc3-8) unstable; urgency=low * Depend on libmono-dev to get mono.pc at runtime. -- Dave Beckett Mon, 20 Jun 2005 10:10:51 +0100 nant (0.84+0.85-rc3-7) unstable; urgency=low * Removed obsolete Build-Depend: on mono-jit and mono-utils * Fixed debian/watch file * Added patches from CVS HEAD to build with mono 1.1.8 packages: - 01-AssemblyInfoTask.cs.patch - 02-ScriptTask.cs.patch - 03-XmlResultFormatter.cs.patch - 04-SourceControl.patch - 05-ExceptionTest.cs -- Dave Beckett Sat, 18 Jun 2005 14:49:10 +0100 nant (0.84+0.85-rc3-6) unstable; urgency=low * Upload to unstable now that mono is in unstable * Added debian/watch file -- Dave Beckett Thu, 16 Jun 2005 11:52:30 +0100 nant (0.84+0.85-rc3-5) experimental; urgency=low * Tiny nant.1 fix * Checked pending bugs that were fixed with new upstream or packaging: - Nant builds reliably inside pbuilder using the mono 1.1.x experimental debs (Closes: #300416). - The mono resgen.exe is now correctly invoked by the task (Closes: #283740) -- Dave Beckett Fri, 20 May 2005 19:02:36 +0100 nant (0.84+0.85-rc3-4) experimental; urgency=low * Make /usr/bin/nant exec cli and NAnt.exe rather than use old cli-wrapper * Wrote a manual page for nant -- Dave Beckett Mon, 16 May 2005 12:31:10 +0100 nant (0.84+0.85-rc3-3) experimental; urgency=low * Remove debian/resgen and update debian/dirs to new mono conventions * Depend on mono 1.1.6 -- Dave Beckett Mon, 16 May 2005 11:22:25 +0100 nant (0.84+0.85-rc3-2) experimental; urgency=low * Rebuild against mono 1.1 experimental -- Dave Beckett Mon, 16 May 2005 10:29:31 +0100 nant (0.84+0.85-rc3-1) unstable; urgency=low * New upstream version. -- Dave Beckett Wed, 20 Apr 2005 20:51:57 +0100 nant (0.84+0.85-rc1-2) unstable; urgency=low * New Maintainer (Closes: 305458) -- Dave Beckett Wed, 20 Apr 2005 16:00:37 +0100 nant (0.84+0.85-rc1-1) unstable; urgency=low * New upstream version. -- John Goerzen Mon, 13 Dec 2004 09:08:02 -0600 nant (0.84+0.85-20040825-2) unstable; urgency=low * Added dependencies on pkg-config and related packages. -- John Goerzen Thu, 26 Aug 2004 13:54:55 -0500 nant (0.84+0.85-20040825-1) unstable; urgency=low * Initial Release. Closes: #268207. -- John Goerzen Thu, 26 Aug 2004 10:27:38 -0500 debian/nant.10000644000000000000000000000376412225773544010235 0ustar .\" Hey, EMACS: -*- nroff -*- .\" .\" .TH nant 1 "2005-05-16" .SH "NAME" NAnt \- .NET build tool similar to Ant .SH "SYNOPOSIS" .B nant .RB [OPTIONS] ..IR "" .IR " ..." .SH "DESCRIPTION" .B NAnt is a .Net build tool similar to Ant. The build environment is configured using an XML file and extended using .Net classes rather than executing separate shell-based commands. Each task is run by an object that implements a particular Task interface. .SH "COMMON OPTIONS" The following are the most common options .TP .B \-t[argetframework]: Specifies the framework to target .TP .B \-defaultframework: Specifies the framework to target (Short format: /k) .TP .B \-buildfile: Use given buildfile (Short format: /f) .TP .B \-D:= Use value for given property .IP A file ending in .build will be used if no buildfile is specified. .TP .B @ Insert command\-line settings from a text file. .SH "OTHER OPTIONS" .TP .B \-debug[+|\-] Displays debug information during build process .TP .B \-e[macs][+|\-] Produce logging information without adornments .TP .B \-ext[ension]: Load NAnt extensions from the specified assembly .TP .B \-find[+|\-] Search parent directories for build file .TP .B \-h[elp][+|\-] Prints a help message summarising the options. .TP .B \-indent: Indentation level of build output .TP .B \-l[ogfile]: Use value as name of log output file .TP .B \-listener: Add an instance of class as a project listener .TP .B \-logger: Use given type as logger .TP .B \-nologo[+|\-] Suppresses display of the logo banner .TP .B \-projecthelp[+|\-] Prints project help information .TP .B \-q[uiet][+|\-] Displays only error or warning messages during build process .TP .B \-v[erbose][+|\-] Displays more information during build process .SH "SEE ALSO" NAnt Project web site .UR http://nant.sourceforge.net/ http://nant.sourceforge.net/ .UE .LP Man page by Dave Beckett, made available under the same terms as NAnt debian/dirs0000644000000000000000000000005012225773544010060 0ustar usr/bin usr/lib/NAnt usr/share/doc/nant debian/patches/0000755000000000000000000000000012225773624010627 5ustar debian/patches/002-nant-load-partial-name.patch0000644000000000000000000000177612225773544016410 0ustar From: Debian CLI Applications Team Date: Sat, 26 May 2012 12:43:20 +0200 Subject: 002-nant-load-partial-name @DPATCH@ --- src/NAnt.DotNet/Tasks/ScriptTask.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NAnt.DotNet/Tasks/ScriptTask.cs b/src/NAnt.DotNet/Tasks/ScriptTask.cs index 287e9de..81e635c 100644 --- a/src/NAnt.DotNet/Tasks/ScriptTask.cs +++ b/src/NAnt.DotNet/Tasks/ScriptTask.cs @@ -517,7 +517,7 @@ namespace NAnt.DotNet.Tasks { #region Private Static Methods private static CodeDomProvider CreateCodeDomProvider(string typeName, string assemblyName) { - Assembly providerAssembly = Assembly.LoadWithPartialName(assemblyName); + Assembly providerAssembly = Assembly.Load(assemblyName); if (providerAssembly == null) { throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, ResourceUtils.GetString("NA2037"), assemblyName)); -- debian/patches/use_mono_mcs_common_compiler_infrastructure.patch0000644000000000000000000015012312225773624022742 0ustar diff --git a/src/NAnt.Console/App.config b/src/NAnt.Console/App.config index a3dc8ec..571ba23 100644 --- a/src/NAnt.Console/App.config +++ b/src/NAnt.Console/App.config @@ -1724,6 +1724,7 @@ + @@ -1782,6 +1783,14 @@ + + + + + + + + @@ -1820,7 +1829,8 @@ true - gmcs + ${csc.tool} + ${mcs.sdk} true true true @@ -1912,6 +1922,7 @@ + @@ -1934,6 +1945,14 @@ + + + + + + + + @@ -1972,7 +1991,8 @@ true - gmcs + ${csc.tool} + ${mcs.sdk} true linq true @@ -2067,6 +2087,7 @@ + @@ -2090,6 +2111,14 @@ + + + + + + + + @@ -2128,7 +2157,8 @@ true - dmcs + ${csc.tool} + ${mcs.sdk} true linq true @@ -2212,6 +2242,7 @@ + @@ -2234,6 +2265,14 @@ + + + + + + + + @@ -2267,7 +2306,8 @@ - smcs + ${csc.tool} + ${mcs.sdk} true true true @@ -2502,6 +2542,7 @@ + @@ -2526,13 +2567,22 @@ + + + + + + + + true - gmcs + ${csc.tool} + ${mcs.sdk} true true true @@ -2616,6 +2666,7 @@ + @@ -2628,13 +2679,22 @@ + + + + + + + + true - gmcs + ${csc.tool} + ${mcs.sdk} true linq true @@ -2721,6 +2781,7 @@ + @@ -2734,13 +2795,22 @@ + + + + + + + + true - dmcs + ${csc.tool} + ${mcs.sdk} true linq true @@ -2824,6 +2894,7 @@ + @@ -2835,10 +2906,19 @@ + + + + + + + + - smcs + ${csc.tool} + ${mcs.sdk} true true true diff --git a/src/NAnt.Core/ConsoleDriver.cs b/src/NAnt.Core/ConsoleDriver.cs old mode 100644 new mode 100755 index 454600c..2d1a6d9 --- a/src/NAnt.Core/ConsoleDriver.cs +++ b/src/NAnt.Core/ConsoleDriver.cs @@ -318,8 +318,9 @@ namespace NAnt.Core { xsltDoc.Load(reader); xsltDoc.DocumentElement.SetAttribute("xmlns:nant",buildDoc.DocumentElement.NamespaceURI); - XslTransform transform = new XslTransform(); - transform.Load(xsltDoc); + XslCompiledTransform transform = new XslCompiledTransform(); + XsltSettings settings = new XsltSettings(false, true); + transform.Load(xsltDoc, settings, new XmlUrlResolver()); StringBuilder sb = new StringBuilder(); StringWriter writer = new StringWriter(sb, CultureInfo.InvariantCulture); diff --git a/src/NAnt.Core/Resources/ProjectHelp.xslt b/src/NAnt.Core/Resources/ProjectHelp.xslt old mode 100644 new mode 100755 index 04756d9..e180bcd --- a/src/NAnt.Core/Resources/ProjectHelp.xslt +++ b/src/NAnt.Core/Resources/ProjectHelp.xslt @@ -26,7 +26,7 @@ diff --git a/src/NAnt.DotNet/Tasks/CscTask.cs b/src/NAnt.DotNet/Tasks/CscTask.cs index 31b1a0a..b0ad97b 100644 --- a/src/NAnt.DotNet/Tasks/CscTask.cs +++ b/src/NAnt.DotNet/Tasks/CscTask.cs @@ -90,6 +90,7 @@ namespace NAnt.DotNet.Tasks { private string _langVersion; // framework configuration settings + private double _mcsSdk = 0; private bool _supportsDocGeneration = true; private bool _supportsPlatform; private bool _supportsLangVersion; @@ -362,6 +363,21 @@ namespace NAnt.DotNet.Tasks { #endregion Public Instance Properties + #region Protected Instance Properties + + /// + /// Gets or sets the mcs sdk version to apply to the new mcs compiler + /// for Mono 3.0+ + /// + [FrameworkConfigurable("mcssdk")] + protected double McsSdk + { + get { return _mcsSdk; } + set { _mcsSdk = value; } + } + + #endregion Protected Instance Properties + #region Override implementation of CompilerBase /// @@ -378,6 +394,16 @@ namespace NAnt.DotNet.Tasks { WriteOption(writer, "baseaddress", BaseAddress); } + // If mcs is the compiler and the specified McsSdk version is specified, append the new + // -sdk: option to the argument list. + if (PlatformHelper.IsMono) + { + if (ExeName.Equals("mcs", StringComparison.InvariantCultureIgnoreCase) && _mcsSdk > 0) + { + WriteOption(writer, "sdk", _mcsSdk.ToString()); + } + } + // XML documentation if (DocFile != null) { if (SupportsDocGeneration) { diff --git a/src/NAnt.NUnit/NAnt.NUnit.build b/src/NAnt.NUnit/NAnt.NUnit.build index f4aba89..9695e24 100644 --- a/src/NAnt.NUnit/NAnt.NUnit.build +++ b/src/NAnt.NUnit/NAnt.NUnit.build @@ -42,6 +42,8 @@ + + diff --git a/src/NDoc.Documenter.NAnt/NDoc.Documenter.NAnt.build b/src/NDoc.Documenter.NAnt/NDoc.Documenter.NAnt.build index f7e3055..2de6374 100644 --- a/src/NDoc.Documenter.NAnt/NDoc.Documenter.NAnt.build +++ b/src/NDoc.Documenter.NAnt/NDoc.Documenter.NAnt.build @@ -11,6 +11,7 @@ + diff --git a/tests/NAnt.Core/Framework.config b/tests/NAnt.Core/Framework.config old mode 100644 new mode 100755 index 62e64ea..319940a --- a/tests/NAnt.Core/Framework.config +++ b/tests/NAnt.Core/Framework.config @@ -467,28 +467,6 @@ key="SOFTWARE\Microsoft\.NETFramework\InstallRoot" hive="LocalMachine" /> - @@ -792,19 +770,6 @@ key="SOFTWARE\Microsoft\.NETFramework\InstallRoot" hive="LocalMachine" /> - @@ -1302,9 +1267,12 @@ + + + @@ -1320,26 +1288,30 @@ + + + in Mono 1.0.x, the framework tools are located + in the \lib directory, except for + mbas and mcs + --> + + Mono 1.0.1 installer incorrectly adds '\mono' to + "MonoConfigDir" registry value + --> + @@ -1354,28 +1326,54 @@ + + + + + + + + + + - - - - + + + + + + - - + + true - gmcs + ${csc.tool} + ${mcs.sdk} true true true @@ -1467,8 +1465,11 @@ + + + @@ -1484,30 +1485,57 @@ + + + + + + + + + + + - - - - + + + + + + - - + + true - gmcs + ${csc.tool} + ${mcs.sdk} true linq true @@ -1602,6 +1630,7 @@ + @@ -1625,6 +1654,14 @@ + + + + + + + + @@ -1663,7 +1700,8 @@ true - dmcs + ${csc.tool} + ${mcs.sdk} true linq true @@ -1699,7 +1737,7 @@ - - + - - + + + + + + + @@ -1743,8 +1785,11 @@ + + + @@ -1760,26 +1805,52 @@ + + + + + + + + + + + - - - - + + + + + + - - smcs + ${csc.tool} + ${mcs.sdk} true true true @@ -2037,7 +2108,10 @@ + + + @@ -2059,13 +2133,22 @@ + + + + + + + + true - gmcs + ${csc.tool} + ${mcs.sdk} true true true @@ -2149,8 +2232,11 @@ + + + @@ -2159,13 +2245,22 @@ + + + + + + + + true - gmcs + ${csc.tool} + ${mcs.sdk} true linq true @@ -2252,6 +2347,7 @@ + @@ -2265,13 +2361,22 @@ + + + + + + + + true - dmcs + ${csc.tool} + ${mcs.sdk} true linq true @@ -2307,8 +2412,8 @@ - - - + + + + + + + @@ -2351,8 +2460,11 @@ + + + @@ -2360,10 +2472,19 @@ + + + + + + + + - smcs + ${csc.tool} + ${mcs.sdk} true true true debian/patches/001-nant-task-cs-InitializeElement.patch0000644000000000000000000000142412225773544020064 0ustar From: Debian CLI Applications Team Date: Sat, 26 May 2012 12:43:20 +0200 Subject: 001-nant-task-cs-InitializeElement @DPATCH@ --- src/NAnt.Core/Task.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/NAnt.Core/Task.cs b/src/NAnt.Core/Task.cs index 782d8d5..8121199 100644 --- a/src/NAnt.Core/Task.cs +++ b/src/NAnt.Core/Task.cs @@ -426,7 +426,6 @@ namespace NAnt.Core { } /// Initializes the task. - [Obsolete("Deprecated. Use Initialize() instead")] protected virtual void InitializeTask(XmlNode taskNode) { } @@ -461,4 +460,4 @@ namespace NAnt.Core { #endregion Protected Instance Methods } -} \ No newline at end of file +} -- debian/patches/000-fix_build_system.patch0000644000000000000000000000723412225773544015525 0ustar From: Debian CLI Applications Team Date: Sat, 26 May 2012 12:43:20 +0200 Subject: 000-fix_build_system @DPATCH@ --- Makefile | 16 ++++++++-------- NAnt.build | 18 ++++++++++-------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 7e1dc47..fad13a2 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ # NAnt make makefile for *nix -MONO=mono -MCS=gmcs +MONO=cli +MCS=mono-csc RESGEN=resgen -TARGET=mono-2.0 +TARGET=mono-4.0 # Contains a list of acceptable targets used to build NAnt VALID_TARGETS := mono-2.0 mono-3.5 mono-4.0 net-2.0 net-3.5 net-4.0 @@ -22,13 +22,13 @@ PLATFORM_REFERENCES = \ endif endif -ifeq ($(MONO),mono) +#ifeq ($(MONO),mono) FRAMEWORK_DIR = mono DEFINE = MONO -else -FRAMEWORK_DIR = net -DEFINE = NET -endif +#else +#FRAMEWORK_DIR = net +#DEFINE = NET +#endif # Validates TARGET var. If the value of TARGET exists # in VALID_TARGETS array, SELECTED_TARGET will contain diff --git a/NAnt.build b/NAnt.build index 5f02491..bccb09a 100644 --- a/NAnt.build +++ b/NAnt.build @@ -815,12 +815,13 @@ - + - + + @@ -834,17 +835,18 @@ - + - - + + + - - + + @@ -874,7 +876,7 @@ the wrapper is created --> #!/bin/sh${environment::newline()} - exec ${path::combine(install.prefix, 'bin')}/mono ${path::combine(install.nant, 'bin')}/NAnt.exe "$@" + exec ${path::combine(install.prefix, 'bin')}/cli ${install.nant}/NAnt.exe "$@" -- debian/patches/add_support_for_mono_4.0_profile.patch0000644000000000000000000000556512225773544020207 0ustar From: Debian CLI Applications Team Date: Sat, 26 May 2012 12:53:33 +0200 Subject: add_support_for_mono_4.0_profile =================================================================== --- src/NAnt.MSBuild/NAnt.MSBuild.build | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/src/NAnt.MSBuild/NAnt.MSBuild.build b/src/NAnt.MSBuild/NAnt.MSBuild.build index c2c4b7c..836da9f 100644 --- a/src/NAnt.MSBuild/NAnt.MSBuild.build +++ b/src/NAnt.MSBuild/NAnt.MSBuild.build @@ -7,25 +7,12 @@ * build.warnaserror - (true|false) treat warnings as errors * current.build.defines - framework-specific build defines --> - - - - - - - - - - - - - - + - + - + @@ -44,14 +31,5 @@ - - - - - - - - - -- debian/patches/series0000644000000000000000000000052412225773624012045 0ustar downgrade_sharpziplib_api.patch add_support_for_mono_4.0_profile.patch 000-fix_build_system.patch 001-nant-task-cs-InitializeElement.patch 002-nant-load-partial-name.patch 003-nant-use-system-dlls.patch 006-nant-dont-build-ndoc-support.patch remove-netDumbster.patch lowercase-docdir.patch use_mono_mcs_common_compiler_infrastructure.patch debian/patches/lowercase-docdir.patch0000644000000000000000000000215112225773544015076 0ustar From: Julian Taylor Date: Sat, 26 May 2012 13:37:35 +0200 Subject: lowercase docdir --- NAnt.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NAnt.build b/NAnt.build index cf47759..631a0b3 100644 --- a/NAnt.build +++ b/NAnt.build @@ -823,9 +823,9 @@ - + - + -- debian/patches/remove-netDumbster.patch0000644000000000000000000020132512225773544015443 0ustar From: Julian Taylor Date: Sat, 26 May 2012 13:26:53 +0200 Subject: remove netDumbster --- tests/NAnt.Core/NAnt.Core.build | 1 - tests/NAnt.Core/Tasks/MailTaskTest.cs | 1722 --------------------------------- 2 files changed, 1723 deletions(-) delete mode 100644 tests/NAnt.Core/Tasks/MailTaskTest.cs diff --git a/tests/NAnt.Core/NAnt.Core.build b/tests/NAnt.Core/NAnt.Core.build index bc032b4..907f95b 100644 --- a/tests/NAnt.Core/NAnt.Core.build +++ b/tests/NAnt.Core/NAnt.Core.build @@ -22,7 +22,6 @@ - diff --git a/tests/NAnt.Core/Tasks/MailTaskTest.cs b/tests/NAnt.Core/Tasks/MailTaskTest.cs deleted file mode 100644 index 064eb24..0000000 --- a/tests/NAnt.Core/Tasks/MailTaskTest.cs +++ /dev/null @@ -1,1722 +0,0 @@ -// NAnt - A .NET build tool -// Copyright (C) 2001-2002 Gerry Shaw -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -// Jay Turpin (recipient2@sourceforge.net) -// Gerry Shaw (gerry_shaw@yahoo.com) -// Ryan Boggs (rmboggs@users.sourceforge.net) - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Reflection; -using System.Text; -using NUnit.Framework; -using NAnt.Core; -using NAnt.Core.Tasks; -using NAnt.Core.Types; - -using netDumbster.smtp; - -namespace Tests.NAnt.Core.Tasks -{ - - [TestFixture] - public class MailTaskTest : BuildTestBase - { - - #region Private Static Fields - - /// - /// The fake Smtp server to use for testing. This ensures that - /// the sample emails generated by these tests do not leave the - /// testing machine. - /// - private static SimpleSmtpServer _smtpServer; - - /// - /// The From email address to use for all testing. - /// - private const string _fromEmail = "nant@sourceforge.net"; - - /// - /// The default mail host to use for testing. - /// - private const string _mailHost = "localhost"; - - /// - /// String format to use when creating email subject text. - /// - private const string _subjectText = "Message from {0} method"; - - /// - /// Valid email address to use for single email scenario testing. - /// - private const string _singleEmail = "jake@example.com"; - - /// - /// Valid (name) Email address pair to use for single email scenario testing. - /// - private const string _singleParenthesisNameEmail = - "(Jake Example) jake@example.com"; - - /// - /// Valid name <Email address> pair to use for single email - /// scenario testing. - /// - private const string _singleAngleBracketNameEmail = - "Jake Example "; - - /// - /// Valid Email address (name) pair to use for single email scenario testing. - /// - private const string _singleParenthesisEmailName = - "jake@example.com (Jake Example)"; - - /// - /// Valid <Email address> name pair to use for single email - /// scenario testing. - /// - private const string _singleAngleBracketEmailName = - " Jake Example"; - - /// - /// Invalid email address to use for single email scenario testing. - /// - /// - /// There is no @ symbol in the email address. - /// - private const string _badEmail = "jake.example.com"; - - /// - /// Invalid (name) Email address pair to use for single email scenario testing. - /// - /// - /// The email address is surrounded by brackets. - /// - private const string _badParenthesisNameEmail = - "(Jake Example) [jake@example.com]"; - - /// - /// Invalid name <Email address> pair to use for single email - /// scenario testing. - /// - /// - /// There is no @ symbol in the email address. - /// - private const string _badAngleBracketNameEmail = - "Jake Example "; - - /// - /// Invalid Email address (name) pair to use for single email scenario testing. - /// - /// - /// The email address is surrounded by parenthesis as well. - /// - private const string _badParenthesisEmailName = - "(jake@example.com) (Jake Example)"; - - /// - /// Invalid <Email address> name pair to use for single email - /// scenario testing. - /// - /// - /// The email address contains angle brackets. - /// - private const string _badAngleBracketEmailName = - "<> Jake Example"; - - #endregion Private Static Fields - - #region Private Instance Fields - - /// - /// Holds the version of NAnt to print in the email messages. - /// - /// - /// A nice to have option just in case these tests are converted to - /// another way (ie: actual working internal smtp server). It would be - /// nice to see which version of NAnt created the test emails. - /// - private Version _nantVersion; - - /// - /// The system temp path to store test message files. - /// - private string _tempPath; - - /// - /// Random number generator used to pick a random port for the - /// fake smtp server to listen on. - /// - private Random _portRand = new Random(); - - /// - /// Contains the Port number for the fake smtp server to listen on. - /// - int _port; - - /// - /// Contains the complete paths of the files used during testing. - /// - List _files; - - // Email address array fields. - // These should be used for multiple email tests (ie: multi To list, etc). - - /// - /// Two format valid email addresses. - /// - string[] _twoEmails = new string[] - { - "jack@example.org", "jane@example.com" - }; - - /// - /// Muliple format valid email addresses. - /// - string[] _multiEmails = new string[] - { - "jack@example.org", "jane@example.com", - "carrie@example.net", "barbara@test.org", - "brad@invalid.com", "jon@test.com" - }; - - /// - /// Two format valid (name) email addresses. - /// - string[] _twoParenthesisNameEmails = new string[] - { - "(Michael Test) michael@test.org", - "(Michele Test) michele@test.net" - }; - - /// - /// Mulitple format valid (name) email addresses. - /// - string[] _multiParenthesisNameEmails = new string[] - { - "(Michael Test) michael@test.org", - "(Michele Test) michele@test.net", - "(Kathy Test) kathy@test.org", - "(Janet Invalid) janet@invalid.net", - "(Shannon Localhost) shannon@localhost.com", - "(Margaret Localhost) margaret@localhost.net" - }; - - /// - /// Two format valid name <email addresses>. - /// - string[] _twoAngleBracketsNameEmails = new string[] - { - "Frank Invalid ", - "Bill Localhost " - }; - - /// - /// Multiple format valid name <email addresses>. - /// - string[] _multiAngleBracketsNameEmails = new string[] - { - "Frank Invalid ", - "Bill Localhost ", - "Morgan Example ", - "Kathy Test ", - "Janet Invalid ", - "Shannon Localhost " - }; - - /// - /// Two format valid email addresses (name). - /// - string[] _twoParenthesisEmailNames = new string[] - { - "michael@test.org (Michael Test)", - "michele@test.net (Michele Test)" - }; - - /// - /// Multiple format valid email addresses (name). - /// - string[] _multiParenthesisEmailNames = new string[] - { - "michael@test.org (Michael Test)", - "michele@test.net (Michele Test)", - "kathy@test.org (Kathy Test)", - "janet@invalid.net (Janet Invalid)", - "shannon@localhost.com (Shannon Localhost)", - "margaret@localhost.net (Margaret Localhost)" - }; - - /// - /// Two format valid <email addresses> name. - /// - string[] _twoAngleBracketsEmailNames = new string[] - { - " Frank Invalid", - " Bill Localhost" - }; - - /// - /// Multiple format valid <email addresses> name. - /// - string[] _multiAngleBracketsEmailNames = new string[] - { - " Frank Invalid", - " Bill Localhost", - " Morgan Example", - " Kathy Test", - " Janet Invalid", - " Shannon Localhost" - }; - - #endregion Private Instance Fields - - #region SetUp/TearDown Methods - - [TestFixtureSetUp] - public void Init() - { - // Assign the fake smtp port - _port = _portRand.Next(50000, 60000); - - // Starts up the fake smtp server. - _smtpServer = SimpleSmtpServer.Start(_port); - - // Gets the current executing version of NAnt to use for some - // of the test emails. - _nantVersion = Assembly.GetExecutingAssembly().GetName().Version; - - // Setup the temp directory - _tempPath = Path.Combine(Path.GetTempPath(), "NAntEmailTesting"); - - if (!Directory.Exists(_tempPath)) - { - Directory.CreateDirectory(_tempPath); - } - - // Create temp files containing messages to load for testing. The - // resulting paths are stored in a List var for location - // purposes. - _files = new List(3); - _files.Add(CreateEmailMessageTempFile("NAntMailFile1.txt")); - _files.Add(CreateEmailMessageTempFile("NAntMailFile2.txt")); - _files.Add(CreateEmailMessageTempFile("NAntMailFile3.txt")); - - } - - [TestFixtureTearDown] - public void Shutdown() - { - // Shuts down the fake smtp server. - _smtpServer.Stop(); - - // Try to remove the temp directory and files from the system. - // If the directory delete fails, print the exception message to - // the console without interrupting the remaining tests. - try - { - Directory.Delete(_tempPath, true); - } - catch (Exception ex) - { - Console.WriteLine("Could not cleanup temp dir: {0}", _tempPath); - Console.WriteLine("Encountered error:"); - Console.WriteLine(ex.Message); - } - } - - protected override void SetUp() - { - base.SetUp(); - // Clears out any existing emails in the fake smtp server - // before running the next test. - _smtpServer.ClearReceivedEmail(); - } - - #endregion SetUp/TearDown Methods - - #region Simple Email Test Methods - - /// - /// Test a simple email scenario with 1 email address. - /// - [Test] - public void SimpleEmailTest() - { - string methodName = "SimpleEmailTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = _singleEmail; - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - } - - /// - /// Test a simple email scenario with 1 email address formatted as - /// (Full Name) address@abcxyz.com in the To address field. - /// - [Test] - public void SimpleNameEmailWithParenthesisTest() - { - string methodName = "SimpleNameEmailWithParenthesisTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = _singleParenthesisNameEmail; - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - } - - /// - /// Test a simple email scenario with 1 email address formatted as - /// address@abcxyz.com (Full Name) in the To address field. - /// - [Test] - public void SimpleEmailNameWithParenthesisTest() - { - string methodName = "SimpleEmailNameWithParenthesisTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = _singleParenthesisEmailName; - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - } - - /// - /// Test a simple email scenario with 1 email address formatted as - /// Full Name <address@abcxyz.com> in the To address field. - /// - [Test] - public void SimpleNameEmailWithAngleBracketsTest() - { - string methodName = "SimpleNameEmailWithAngleBracketsTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = _singleAngleBracketNameEmail; - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - } - - /// - /// Test a simple email scenario with 1 email address formatted as - /// <address@abcxyz.com> Full Name in the To address field. - /// - [Test] - public void SimpleEmailNameWithAngleBracketsTest() - { - string methodName = "SimpleEmailNameWithAngleBracketsTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = _singleAngleBracketEmailName; - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - } - - #endregion Simple Email Test Methods - - #region Mulitple To Email Test Methods - - /// - /// Test a simple email scenario with 2 email addresses in the - /// To Address field. - /// - [Test] - public void TwoToEmailAddressesTest() - { - string methodName = "TwoToEmailAddressesTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = CreateEmailListString(_twoEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(2, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - /// - /// Test a simple email scenario with 6 email addresses in the - /// To Address field. - /// - [Test] - public void ManyToEmailAddressesTest() - { - string methodName = "ManyToEmailAddressesTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = CreateEmailListString(_multiEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(6, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - /// - /// Test a simple email scenario with 2 email addresses formatted as - /// (Full Name) address@abcxyz.com in the To address field. - /// - [Test] - public void TwoToNamesAndEmailAddressesInParenthesisTest() - { - string methodName = "TwoToNamesAndEmailAddressesInParenthesisTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = CreateEmailListString(_twoParenthesisNameEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(2, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - /// - /// Test a simple email scenario with 6 email addresses formatted as - /// (Full Name) address@abcxyz.com in the To address field. - /// - [Test] - public void ManyToNamesAndEmailAddressesInParenthesisTest() - { - string methodName = "ManyToNamesAndEmailAddressesInParenthesisTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = CreateEmailListString(_multiParenthesisNameEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(6, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - /// - /// Test a simple email scenario with 2 email addresses formatted as - /// Full Name <address@abcxyz.com> in the To address field. - /// - [Test] - public void TwoToNamesAndEmailAddressesInAngleBracketsTest() - { - string methodName = "TwoToNamesAndEmailAddressesInAngleBracketsTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = CreateEmailListString(_twoAngleBracketsNameEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(2, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - /// - /// Test a simple email scenario with 6 email addresses formatted as - /// Full Name <address@abcxyz.com> in the To address field. - /// - [Test] - public void ManyToNamesAndEmailAddressesInAngleBracketsTest() - { - string methodName = "ManyToNamesAndEmailAddressesInAngleBracketsTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = CreateEmailListString(_multiAngleBracketsNameEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(6, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - /// - /// Test a simple email scenario with 2 email addresses formatted as - /// address@abcxyz.com (Full Name) in the To address field. - [Test] - public void TwoToEmailAddressesAndNamesInParenthesisTest() - { - string methodName = "TwoToEmailAddressesAndNamesInParenthesisTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = CreateEmailListString(_twoParenthesisEmailNames); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(2, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - /// - /// Test a simple email scenario with 6 email addresses formatted as - /// address@abcxyz.com (Full Name) in the To address field. - [Test] - public void ManyToEmailAddressesAndNamesInParenthesisTest() - { - string methodName = "ManyToEmailAddressesAndNamesInParenthesisTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = CreateEmailListString(_multiParenthesisEmailNames); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(6, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - /// - /// Test a simple email scenario with 2 email addresses formatted as - /// <address@abcxyz.com> Full Name in the To address field. - /// - [Test] - public void TwoToEmailAddressesAndNamesInAngleBracketsTest() - { - string methodName = "TwoToEmailAddressesAndNamesInAngleBracketsTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = CreateEmailListString(_twoAngleBracketsEmailNames); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(2, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - /// - /// Test a simple email scenario with 6 email addresses formatted as - /// <address@abcxyz.com> Full Name in the To address field. - /// - [Test] - public void ManyToEmailAddressesAndNamesInAngleBracketsTest() - { - string methodName = "ManyToEmailAddressesAndNamesInAngleBracketsTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = CreateEmailListString(_multiAngleBracketsEmailNames); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(6, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - #endregion Mulitple To Email Test Methods - - #region Mulitple CC Email Test Methods - - /// - /// Test a simple email scenario with 2 email addresses in the - /// CC Address field. - /// - [Test] - public void TwoCcEmailAddressesTest() - { - string methodName = "TwoCcEmailAddressesTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.CcList = CreateEmailListString(_twoEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - - if (_smtpServer.ReceivedEmail[0].Headers.ContainsKey("Cc")) - { - string[] ccEmails = GetCcAddressesFromSentMail(); - - Assert.AreEqual(2, ccEmails.Length); - } - else - { - Assert.Fail("Test email did not contain addresses in the CC line"); - } - } - - /// - /// Test a simple email scenario with 6 email addresses in the - /// CC Address field. - /// - [Test] - public void ManyCcEmailAddressesTest() - { - string methodName = "ManyCcEmailAddressesTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.CcList = CreateEmailListString(_multiEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - - if (_smtpServer.ReceivedEmail[0].Headers.ContainsKey("Cc")) - { - string[] ccEmails = GetCcAddressesFromSentMail(); - - Assert.AreEqual(6, ccEmails.Length); - } - else - { - Assert.Fail("Test email did not contain addresses in the CC line"); - } - } - - /// - /// Test a simple email scenario with 2 email addresses formatted as - /// (Full Name) address@abcxyz.com in the CC address field. - /// - [Test] - public void TwoCcNamesAndEmailAddressesInParenthesisTest() - { - string methodName = "TwoCcNamesAndEmailAddressesInParenthesisTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.CcList = CreateEmailListString(_twoParenthesisNameEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - - if (_smtpServer.ReceivedEmail[0].Headers.ContainsKey("Cc")) - { - string[] ccEmails = GetCcAddressesFromSentMail(); - - Assert.AreEqual(2, ccEmails.Length); - } - else - { - Assert.Fail("Test email did not contain addresses in the CC line"); - } - } - - /// - /// Test a simple email scenario with 6 email addresses formatted as - /// (Full Name) address@abcxyz.com in the CC address field. - /// - [Test] - public void ManyCcNamesAndEmailAddressesInParenthesisTest() - { - string methodName = "ManyCcNamesAndEmailAddressesInParenthesisTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.CcList = CreateEmailListString(_multiParenthesisNameEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - - if (_smtpServer.ReceivedEmail[0].Headers.ContainsKey("Cc")) - { - string[] ccEmails = GetCcAddressesFromSentMail(); - - Assert.AreEqual(6, ccEmails.Length); - } - else - { - Assert.Fail("Test email did not contain addresses in the CC line"); - } - } - - /// - /// Test a simple email scenario with 2 email addresses formatted as - /// Full Name <address@abcxyz.com> in the CC address field. - /// - [Test] - public void TwoCcNamesAndEmailAddressesInAngleBracketsTest() - { - string methodName = "TwoCcNamesAndEmailAddressesInAngleBracketsTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.CcList = CreateEmailListString(_twoAngleBracketsNameEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - - if (_smtpServer.ReceivedEmail[0].Headers.ContainsKey("Cc")) - { - string[] ccEmails = GetCcAddressesFromSentMail(); - - Assert.AreEqual(2, ccEmails.Length); - } - else - { - Assert.Fail("Test email did not contain addresses in the CC line"); - } - } - - /// - /// Test a simple email scenario with 6 email addresses formatted as - /// Full Name <address@abcxyz.com> in the CC address field. - /// - [Test] - public void ManyCcNamesAndEmailAddressesInAngleBracketsTest() - { - string methodName = "ManyCcNamesAndEmailAddressesInAngleBracketsTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.CcList = CreateEmailListString(_multiAngleBracketsNameEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - - if (_smtpServer.ReceivedEmail[0].Headers.ContainsKey("Cc")) - { - string[] ccEmails = GetCcAddressesFromSentMail(); - - Assert.AreEqual(6, ccEmails.Length); - } - else - { - Assert.Fail("Test email did not contain addresses in the CC line"); - } - } - - /// - /// Test a simple email scenario with 2 email addresses formatted as - /// address@abcxyz.com (Full Name) in the CC address field. - /// - [Test] - public void TwoCcEmailAddressesAndNamesInParenthesisTest() - { - string methodName = "TwoCcEmailAddressesAndNamesInParenthesisTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.CcList = CreateEmailListString(_twoParenthesisEmailNames); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - - if (_smtpServer.ReceivedEmail[0].Headers.ContainsKey("Cc")) - { - string[] ccEmails = GetCcAddressesFromSentMail(); - - Assert.AreEqual(2, ccEmails.Length); - } - else - { - Assert.Fail("Test email did not contain addresses in the CC line"); - } - } - - /// - /// Test a simple email scenario with 6 email addresses formatted as - /// address@abcxyz.com (Full Name) in the CC address field. - /// - [Test] - public void ManyCcEmailAddressesAndNamesInParenthesisTest() - { - string methodName = "ManyCcEmailAddressesAndNamesInParenthesisTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.CcList = CreateEmailListString(_multiParenthesisEmailNames); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - - if (_smtpServer.ReceivedEmail[0].Headers.ContainsKey("Cc")) - { - string[] ccEmails = GetCcAddressesFromSentMail(); - - Assert.AreEqual(6, ccEmails.Length); - } - else - { - Assert.Fail("Test email did not contain addresses in the CC line"); - } - } - - /// - /// Test a simple email scenario with 2 email addresses formatted as - /// <address@abcxyz.com> Full Name in the CC address field. - /// - [Test] - public void TwoCcEmailAddressesAndNamesInAngleBracketsTest() - { - string methodName = "TwoCcEmailAddressesAndNamesInAngleBracketsTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.CcList = CreateEmailListString(_twoAngleBracketsEmailNames); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - - if (_smtpServer.ReceivedEmail[0].Headers.ContainsKey("Cc")) - { - string[] ccEmails = GetCcAddressesFromSentMail(); - - Assert.AreEqual(2, ccEmails.Length); - } - else - { - Assert.Fail("Test email did not contain addresses in the CC line"); - } - } - - /// - /// Test a simple email scenario with 6 email addresses formatted as - /// <address@abcxyz.com> Full Name in the CC address field. - /// - [Test] - public void ManyCcEmailAddressesAndNamesInAngleBracketsTest() - { - string methodName = "ManyCcEmailAddressesAndNamesInAngleBracketsTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.CcList = CreateEmailListString(_multiAngleBracketsEmailNames); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - - if (_smtpServer.ReceivedEmail[0].Headers.ContainsKey("Cc")) - { - string[] ccEmails = GetCcAddressesFromSentMail(); - - Assert.AreEqual(6, ccEmails.Length); - } - else - { - Assert.Fail("Test email did not contain addresses in the CC line"); - } - } - - #endregion Mulitple CC Email Test Methods - - #region Mulitple BCC Email Test Methods - - /// - /// Test a simple email scenario with 2 email addresses in the - /// BCC Address field. - /// - [Test] - public void TwoBccEmailAddressesTest() - { - string methodName = "TwoBccEmailAddressesTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.BccList = CreateEmailListString(_twoEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(2, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - - } - - /// - /// Test a simple email scenario with 6 email addresses in the - /// BCC Address field. - /// - [Test] - public void ManyBccEmailAddressesTest() - { - string methodName = "ManyBccEmailAddressesTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.BccList = CreateEmailListString(_multiEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(6, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - /// - /// Test a simple email scenario with 2 email addresses formatted as - /// (Full Name) address@abcxyz.com in the BCC address field. - /// - [Test] - public void TwoBccNamesAndEmailAddressesInParenthesisTest() - { - string methodName = "TwoBccNamesAndEmailAddressesInParenthesisTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.BccList = CreateEmailListString(_twoParenthesisNameEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(2, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - /// - /// Test a simple email scenario with 6 email addresses formatted as - /// (Full Name) address@abcxyz.com in the BCC address field. - /// - [Test] - public void ManyBccNamesAndEmailAddressesInParenthesisTest() - { - string methodName = "ManyBccNamesAndEmailAddressesInParenthesisTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.BccList = CreateEmailListString(_multiParenthesisNameEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(6, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - /// - /// Test a simple email scenario with 2 email addresses formatted as - /// Full Name <address@abcxyz.com> in the BCC address field. - /// - [Test] - public void TwoBccNamesAndEmailAddressesInAngleBracketsTest() - { - string methodName = "TwoBccNamesAndEmailAddressesInAngleBracketsTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.BccList = CreateEmailListString(_twoAngleBracketsNameEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(2, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - /// - /// Test a simple email scenario with 6 email addresses formatted as - /// Full Name <address@abcxyz.com> in the BCC address field. - /// - [Test] - public void ManyBccNamesAndEmailAddressesInAngleBracketsTest() - { - string methodName = "ManyBccNamesAndEmailAddressesInAngleBracketsTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.BccList = CreateEmailListString(_multiAngleBracketsNameEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(6, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - /// - /// Test a simple email scenario with 2 email addresses formatted as - /// address@abcxyz.com (Full Name) in the BCC address field. - /// - [Test] - public void TwoBccEmailAddressesAndNamesInParenthesisTest() - { - string methodName = "TwoBccEmailAddressesAndNamesInParenthesisTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.BccList = CreateEmailListString(_twoParenthesisEmailNames); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(2, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - /// - /// Test a simple email scenario with 6 email addresses formatted as - /// address@abcxyz.com (Full Name) in the BCC address field. - /// - [Test] - public void ManyBccEmailAddressesAndNamesInParenthesisTest() - { - string methodName = "ManyBccEmailAddressesAndNamesInParenthesisTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.BccList = CreateEmailListString(_multiParenthesisEmailNames); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(6, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - /// - /// Test a simple email scenario with 2 email addresses formatted as - /// <address@abcxyz.com> Full Name in the BCC address field. - /// - [Test] - public void TwoBccEmailAddressesAndNamesInAngleBracketsTest() - { - string methodName = "TwoBccEmailAddressesAndNamesInAngleBracketsTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.BccList = CreateEmailListString(_twoAngleBracketsEmailNames); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(2, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - /// - /// Test a simple email scenario with 6 email addresses formatted as - /// <address@abcxyz.com> Full Name in the BCC address field. - /// - [Test] - public void ManyBccEmailAddressesAndNamesInAngleBracketsTest() - { - string methodName = "ManyBccEmailAddressesAndNamesInAngleBracketsTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.BccList = CreateEmailListString(_multiAngleBracketsEmailNames); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(6, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - #endregion Mulitple BCC Email Test Methods - - #region Misc Email Test Methods - - /// - /// Tests sending an email with the To, CC, and BCC address fields - /// filled in at once. - /// - [Test] - public void AllRecipientListsTest() - { - string methodName = "AllRecipientListsTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = CreateEmailListString(_twoEmails); - mailTask.CcList = CreateEmailListString(_twoParenthesisEmailNames); - mailTask.BccList = CreateEmailListString(_twoAngleBracketsNameEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(6, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - Assert.AreEqual(2, GetCcAddressesFromSentMail().Length); - } - - /// - /// Tests sending an email with multiple email address in the - /// To address field in different formats. - /// - [Test] - public void MixedEmailFormatTest() - { - string methodName = "MixedEmailFormatTest()"; - string[] toEmails = new string[] - { - CreateEmailListString(_twoEmails), - CreateEmailListString(_twoAngleBracketsNameEmails), - CreateEmailListString(_twoParenthesisEmailNames), - CreateEmailListString(_twoAngleBracketsEmailNames), - CreateEmailListString(_twoParenthesisNameEmails) - }; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = CreateEmailListString(toEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - Assert.AreEqual(10, _smtpServer.ReceivedEmail[0].ToAddresses.Length); - } - - #endregion Misc Email Test Methods - - #region Email With External Files Test Methods - - /// - /// Tests sending an email where the body of the email was filled in - /// using external files. - /// - [Test] - public void EmailMessageFromFileTest() - { - string methodName = "EmailMessageFromFileTest()"; - FileSet fileSet = new FileSet(); - fileSet.FileNames.AddRange(_files.ToArray()); - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = CreateEmailListString(_twoEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Files = fileSet; - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - } - - /// - /// Tests sending an email where the body of the email was filled in - /// using external files and specified in the Message property. - /// - [Test] - public void AppendedEmailMessageFromFileTest() - { - string methodName = "AppendedEmailMessageFromFileTest()"; - FileSet fileSet = new FileSet(); - fileSet.FileNames.AddRange(_files.ToArray()); - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = CreateEmailListString(_twoEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - mailTask.Files = fileSet; - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - } - - /// - /// Tests sending an email with attachments. - /// - [Test] - public void EmailAttachmentTest() - { - string methodName = "EmailAttachmentTest()"; - FileSet fileSet = new FileSet(); - fileSet.FileNames.AddRange(_files.ToArray()); - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = CreateEmailListString(_twoEmails); - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - mailTask.Attachments = fileSet; - - mailTask.Execute(); - - Assert.AreEqual(1, _smtpServer.ReceivedEmailCount); - } - - #endregion Email With External Files Test Methods - - #region Exception Test Methods - - /// - /// Tests sending an email with a badly formatted email address. - /// - [Test] - [ExpectedException(typeof(BuildException))] - public void BadEmailTest() - { - string methodName = "BadEmailTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = _badEmail; - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - } - - /// - /// Tests sending an email with a badly formatted email address - /// as Full Name <address@abcxyz.com>. - /// - [Test] - [ExpectedException(typeof(BuildException))] - public void BadAngleBracketNameEmailTest() - { - string methodName = "BadAngleBracketNameEmailTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = _badAngleBracketNameEmail; - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - } - - /// - /// Tests sending an email with a badly formatted email address - /// as <address@abcxyz.com> Full Name. - /// - [Test] - [ExpectedException(typeof(BuildException))] - public void BadAngleBracketEmailNameTest() - { - string methodName = "BadAngleBracketEmailNameTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = _badAngleBracketEmailName; - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - } - - /// - /// Tests sending an email with a badly formatted email address - /// as (Full Name) address@abcxyz.com. - /// - [Test] - [ExpectedException(typeof(BuildException))] - public void BadParenthesisNameEmailTest() - { - string methodName = "BadParenthesisNameEmailTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = _badParenthesisNameEmail; - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - } - - /// - /// Tests sending an email with a badly formatted email address - /// as address@abcxyz.com (Full Name). - /// - [Test] - [ExpectedException(typeof(BuildException))] - public void BadParenthesisEmailNameTest() - { - string methodName = "BadParenthesisEmailNameTest()"; - - MailTask mailTask = new MailTask(); - mailTask.Project = CreateEmptyProject(); - - mailTask.Mailhost = _mailHost; - mailTask.Port = _port; - mailTask.From = _fromEmail; - mailTask.ToList = _badParenthesisEmailName; - mailTask.Subject = String.Format(_subjectText, methodName); - mailTask.Message = CreateSampleEmailMessage(methodName); - - mailTask.Execute(); - } - - #endregion Exception Test Methods - - #region Private Instance Methods - - /// - /// Creates a simple message to use for all - /// email tests that do not retrieve message text from external files. - /// - /// - /// The idea here is rather than simply printing 'Sample message text' - /// in the test email, useful information can easily be put in all test - /// emails just in case tests fail. Any additional information that could - /// prove useful when investigating failed test cases should be added to - /// this method. - /// - /// - /// The name of the test method that created the sample email message. - /// - /// - /// The sample email message. - /// - private string CreateSampleEmailMessage(string methodName) - { - StringBuilder msg = new StringBuilder(); - msg.AppendFormat(CultureInfo.InvariantCulture, - "This test email was generated by the test method: {0}", methodName) - .AppendLine(); - msg.AppendLine(); - msg.AppendFormat(CultureInfo.InvariantCulture, - "This test was conducted on {0} using NAnt version: {1}.", - DateTime.Now, _nantVersion) - .AppendLine(); - - return msg.ToString(); - } - - /// - /// Creates the email message temp file. - /// - /// - /// Name of the file to save the message to with the complete path omitted. - /// - /// - /// The complete path and file name of the temp file that the method - /// created. - /// - private string CreateEmailMessageTempFile(string fileName) - { - // Setup the complete path/filename to write to. - string targetFile = Path.Combine(_tempPath, fileName); - - // Create the message - StringBuilder msg = new StringBuilder(); - msg.AppendFormat(CultureInfo.InvariantCulture, - "This text came from a temporary file named: {0}", fileName) - .AppendLine(); - msg.AppendLine(); - msg.AppendLine( - "It is ok to delete this file after NAnt's test suite finishes its run."); - msg.AppendLine(); - msg.AppendFormat(CultureInfo.InvariantCulture, - "This file was conducted on {0} using NAnt version: {1}.", - DateTime.Now, _nantVersion) - .AppendLine(); - - // Write the above message to the file - using (StreamWriter writer = File.CreateText(targetFile)) - { - writer.Write(msg.ToString()); - writer.Flush(); - writer.Close(); - } - return targetFile; - } - - /// - /// Creates a new email list from an array - /// of email addresses. - /// - /// - /// A array of email addresses to join together. - /// - /// - /// A new list of email addresses separated by a semicolon. - /// - private string CreateEmailListString(string[] emails) - { - return String.Join(";", emails); - } - - /// - /// Retrieves the CC addresses from the first email that was - /// received by the fake smtp server. - /// - /// - /// A array of email addresses that - /// were in the CC line of the first email received by the fake - /// smtp server. If the email did not contain email addresses in - /// the CC line, an empty array is - /// returned. - /// - private string[] GetCcAddressesFromSentMail() - { - if (_smtpServer.ReceivedEmailCount > 0) - { - if (_smtpServer.ReceivedEmail[0].Headers.ContainsKey("Cc")) - { - string ccEmails = - _smtpServer.ReceivedEmail[0].Headers["Cc"].ToString(); - - return ccEmails.Split(',',';'); - } - return new string[0]; - } - // This should not be reached... - throw new ArgumentNullException("Test smtp server has not yet received emails"); - } - - #endregion Private Instance Methods - } -} -- debian/patches/003-nant-use-system-dlls.patch0000644000000000000000000004224012225773544016163 0ustar From: Debian CLI Applications Team Date: Sat, 26 May 2012 12:43:20 +0200 Subject: 003-nant-use-system-dlls @DPATCH@ --- Makefile | 10 +++---- NAnt.build | 2 -- src/NAnt.Compression/NAnt.Compression.build | 2 +- src/NAnt.Console/NAnt.Console.build | 4 ++- src/NAnt.Core/NAnt.Core.build | 4 ++- src/NAnt.DotNet/NAnt.DotNet.build | 4 +-- src/NAnt.NUnit/NAnt.NUnit.build | 31 ++++----------------- src/NAnt.SourceControl/NAnt.SourceControl.build | 8 ++++-- tests/NAnt.Compression/NAnt.Compression.build | 4 ++- tests/NAnt.Console/NAnt.Console.build | 4 ++- tests/NAnt.Core/NAnt.Core.build | 4 ++- tests/NAnt.DotNet/NAnt.DotNet.build | 4 ++- tests/NAnt.MSNet/NAnt.MSNet.build | 4 ++- tests/NAnt.SourceControl/NAnt.SourceControl.build | 4 ++- tests/NAnt.VSNet/NAnt.VSNet.build | 4 ++- tests/NAnt.VisualCpp/NAnt.VisualCpp.build | 4 ++- tests/NAnt.Win32/NAnt.Win32.build | 4 ++- 17 files changed, 51 insertions(+), 50 deletions(-) diff --git a/Makefile b/Makefile index fad13a2..cd7414b 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# NAnt make makefile for *nix +#NAnt make makefile for *nix MONO=cli MCS=mono-csc RESGEN=resgen @@ -85,7 +85,7 @@ run-test: bootstrap $(NANT) $(TARGET_FRAMEWORK) -f:NAnt.build test bootstrap/NAnt.exe: - $(MCS) $(DEBUG) -target:exe -define:$(DEFINE) -out:bootstrap${DIRSEP}NAnt.exe -r:bootstrap${DIRSEP}log4net.dll \ + $(MCS) $(DEBUG) -target:exe -define:$(DEFINE) -out:bootstrap${DIRSEP}NAnt.exe -pkg:log4net \ -r:System.Configuration.dll -recurse:src${DIRSEP}NAnt.Console${DIRSEP}*.cs src${DIRSEP}CommonAssemblyInfo.cs @@ -94,16 +94,14 @@ bootstrap: setup bootstrap/NAnt.exe bootstrap/NAnt.Core.dll bootstrap/NAnt.DotNe setup: mkdir -p bootstrap - cp -R lib/ bootstrap/lib # Mono loads log4net before privatebinpath is set-up, so we need this in the same directory # as NAnt.exe - cp lib/common/neutral/log4net.dll bootstrap cp src/NAnt.Console/App.config bootstrap/NAnt.exe.config bootstrap/NAnt.Core.dll: $(RESGEN) src/NAnt.Core/Resources/Strings.resx bootstrap/NAnt.Core.Resources.Strings.resources $(MCS) $(DEBUG) -target:library -warn:0 -define:$(DEFINE) -out:bootstrap/NAnt.Core.dll -debug \ - -resource:bootstrap/NAnt.Core.Resources.Strings.resources -r:lib${DIRSEP}common${DIRSEP}neutral${DIRSEP}log4net.dll \ + -resource:bootstrap/NAnt.Core.Resources.Strings.resources -pkg:log4net \ -r:System.Web.dll -recurse:src${DIRSEP}NAnt.Core${DIRSEP}*.cs src${DIRSEP}CommonAssemblyInfo.cs bootstrap/NAnt.DotNetTasks.dll: @@ -115,7 +113,7 @@ bootstrap/NAnt.DotNetTasks.dll: bootstrap/NAnt.CompressionTasks.dll: $(MCS) $(DEBUG) -target:library -warn:0 -define:$(DEFINE) -out:bootstrap/NAnt.CompressionTasks.dll \ - -r:./bootstrap/NAnt.Core.dll -r:bootstrap/lib/common/neutral/ICSharpCode.SharpZipLib.dll \ + -r:./bootstrap/NAnt.Core.dll -r:ICSharpCode.SharpZipLib.dll \ -recurse:src${DIRSEP}NAnt.Compression${DIRSEP}*.cs src${DIRSEP}CommonAssemblyInfo.cs bootstrap/NAnt.Win32Tasks.dll: diff --git a/NAnt.build b/NAnt.build index bccb09a..1d4c66d 100644 --- a/NAnt.build +++ b/NAnt.build @@ -41,7 +41,6 @@ - @@ -51,7 +50,6 @@ - diff --git a/src/NAnt.Compression/NAnt.Compression.build b/src/NAnt.Compression/NAnt.Compression.build index 9fe2c41..98c7c1b 100644 --- a/src/NAnt.Compression/NAnt.Compression.build +++ b/src/NAnt.Compression/NAnt.Compression.build @@ -17,7 +17,7 @@ - + diff --git a/src/NAnt.Console/NAnt.Console.build b/src/NAnt.Console/NAnt.Console.build index bd11352..57af676 100644 --- a/src/NAnt.Console/NAnt.Console.build +++ b/src/NAnt.Console/NAnt.Console.build @@ -32,10 +32,12 @@ - + + + diff --git a/src/NAnt.Core/NAnt.Core.build b/src/NAnt.Core/NAnt.Core.build index f6153c4..2d7192e 100644 --- a/src/NAnt.Core/NAnt.Core.build +++ b/src/NAnt.Core/NAnt.Core.build @@ -27,9 +27,11 @@ - + + + diff --git a/src/NAnt.DotNet/NAnt.DotNet.build b/src/NAnt.DotNet/NAnt.DotNet.build index 7c6bea9..12cf326 100644 --- a/src/NAnt.DotNet/NAnt.DotNet.build +++ b/src/NAnt.DotNet/NAnt.DotNet.build @@ -22,8 +22,8 @@ - - + + diff --git a/src/NAnt.NUnit/NAnt.NUnit.build b/src/NAnt.NUnit/NAnt.NUnit.build index f4aba89..b37a560 100644 --- a/src/NAnt.NUnit/NAnt.NUnit.build +++ b/src/NAnt.NUnit/NAnt.NUnit.build @@ -18,27 +18,9 @@ - - - - - - - - - - - - - - - - - - - - - + + + @@ -54,11 +36,10 @@ - - - - + + + diff --git a/src/NAnt.SourceControl/NAnt.SourceControl.build b/src/NAnt.SourceControl/NAnt.SourceControl.build index 4f897e0..c868a54 100644 --- a/src/NAnt.SourceControl/NAnt.SourceControl.build +++ b/src/NAnt.SourceControl/NAnt.SourceControl.build @@ -16,11 +16,13 @@ - - - + + + + + diff --git a/tests/NAnt.Compression/NAnt.Compression.build b/tests/NAnt.Compression/NAnt.Compression.build index ec104e8..612c41a 100644 --- a/tests/NAnt.Compression/NAnt.Compression.build +++ b/tests/NAnt.Compression/NAnt.Compression.build @@ -21,8 +21,10 @@ - + + + diff --git a/tests/NAnt.Console/NAnt.Console.build b/tests/NAnt.Console/NAnt.Console.build index 4e2e27b..78aa4a7 100644 --- a/tests/NAnt.Console/NAnt.Console.build +++ b/tests/NAnt.Console/NAnt.Console.build @@ -22,8 +22,10 @@ - + + + diff --git a/tests/NAnt.Core/NAnt.Core.build b/tests/NAnt.Core/NAnt.Core.build index b93116c..bc032b4 100644 --- a/tests/NAnt.Core/NAnt.Core.build +++ b/tests/NAnt.Core/NAnt.Core.build @@ -22,9 +22,11 @@ - + + + diff --git a/tests/NAnt.DotNet/NAnt.DotNet.build b/tests/NAnt.DotNet/NAnt.DotNet.build index 5389240..e38931a 100644 --- a/tests/NAnt.DotNet/NAnt.DotNet.build +++ b/tests/NAnt.DotNet/NAnt.DotNet.build @@ -29,8 +29,10 @@ - + + + diff --git a/tests/NAnt.MSNet/NAnt.MSNet.build b/tests/NAnt.MSNet/NAnt.MSNet.build index 9baf7ac..9a4c7ff 100644 --- a/tests/NAnt.MSNet/NAnt.MSNet.build +++ b/tests/NAnt.MSNet/NAnt.MSNet.build @@ -21,8 +21,10 @@ - + + + diff --git a/tests/NAnt.SourceControl/NAnt.SourceControl.build b/tests/NAnt.SourceControl/NAnt.SourceControl.build index cc8d2e9..be45766 100644 --- a/tests/NAnt.SourceControl/NAnt.SourceControl.build +++ b/tests/NAnt.SourceControl/NAnt.SourceControl.build @@ -21,8 +21,10 @@ - + + + diff --git a/tests/NAnt.VSNet/NAnt.VSNet.build b/tests/NAnt.VSNet/NAnt.VSNet.build index 7a84c7c..fa0f661 100644 --- a/tests/NAnt.VSNet/NAnt.VSNet.build +++ b/tests/NAnt.VSNet/NAnt.VSNet.build @@ -22,8 +22,10 @@ - + + + diff --git a/tests/NAnt.VisualCpp/NAnt.VisualCpp.build b/tests/NAnt.VisualCpp/NAnt.VisualCpp.build index 8d78a8d..39c8d01 100644 --- a/tests/NAnt.VisualCpp/NAnt.VisualCpp.build +++ b/tests/NAnt.VisualCpp/NAnt.VisualCpp.build @@ -22,8 +22,10 @@ - + + + diff --git a/tests/NAnt.Win32/NAnt.Win32.build b/tests/NAnt.Win32/NAnt.Win32.build index 48099a7..5d1b66b 100644 --- a/tests/NAnt.Win32/NAnt.Win32.build +++ b/tests/NAnt.Win32/NAnt.Win32.build @@ -21,8 +21,10 @@ - + + + -- debian/patches/006-nant-dont-build-ndoc-support.patch0000644000000000000000000005756512225773544017630 0ustar From: Debian CLI Applications Team Date: Sat, 26 May 2012 12:43:20 +0200 Subject: 006-nant-dont-build-ndoc-support Remove support for ndoc task - we don't use it, and it pulls build-dep on libndoc1.3-cil, which is built by nant --- Makefile | 2 +- NAnt.build | 4 - src/NAnt.DotNet/NAnt.DotNet.build | 2 - src/NAnt.DotNet/Tasks/NDocTask.cs | 472 ------------------------------------- 4 files changed, 1 insertion(+), 479 deletions(-) delete mode 100644 src/NAnt.DotNet/Tasks/NDocTask.cs diff --git a/Makefile b/Makefile index cd7414b..b47587f 100644 --- a/Makefile +++ b/Makefile @@ -107,7 +107,7 @@ bootstrap/NAnt.Core.dll: bootstrap/NAnt.DotNetTasks.dll: $(RESGEN) src/NAnt.DotNet/Resources/Strings.resx bootstrap/NAnt.DotNet.Resources.Strings.resources $(MCS) $(DEBUG) -target:library -warn:0 -define:$(DEFINE) -out:bootstrap/NAnt.DotNetTasks.dll \ - -r:./bootstrap/NAnt.Core.dll -r:bootstrap/lib/common/neutral/NDoc.Core.dll \ + -r:./bootstrap/NAnt.Core.dll \ -recurse:src${DIRSEP}NAnt.DotNet${DIRSEP}*.cs -resource:bootstrap/NAnt.DotNet.Resources.Strings.resources \ src${DIRSEP}CommonAssemblyInfo.cs diff --git a/NAnt.build b/NAnt.build index 1d4c66d..cf47759 100644 --- a/NAnt.build +++ b/NAnt.build @@ -161,8 +161,6 @@ - - @@ -330,7 +328,6 @@ - @@ -398,7 +395,6 @@ - diff --git a/src/NAnt.DotNet/NAnt.DotNet.build b/src/NAnt.DotNet/NAnt.DotNet.build index 12cf326..18cfc34 100644 --- a/src/NAnt.DotNet/NAnt.DotNet.build +++ b/src/NAnt.DotNet/NAnt.DotNet.build @@ -22,8 +22,6 @@ - - diff --git a/src/NAnt.DotNet/Tasks/NDocTask.cs b/src/NAnt.DotNet/Tasks/NDocTask.cs deleted file mode 100644 index 5f7ff58..0000000 --- a/src/NAnt.DotNet/Tasks/NDocTask.cs +++ /dev/null @@ -1,472 +0,0 @@ -// NAnt - A .NET build tool -// Copyright (C) 2001-2002 Gerry Shaw -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// Gerry Shaw (gerry_shaw@yahoo.com) -// Ian MacLean (ian_maclean@another.com) -// Giuseppe Greco (giuseppe.greco@agamura.com) - -using System; -using System.Collections; -using System.Collections.Specialized; -using System.Globalization; -using System.IO; -using System.Text; -using System.Xml; - -using NDoc.Core; - -using NAnt.Core; -using NAnt.Core.Attributes; -using NAnt.Core.Types; -using NAnt.Core.Util; - -using NAnt.DotNet.Types; -using System.Reflection; - -namespace NAnt.DotNet.Tasks { - /// - /// Runs NDoc V1.3.1 to create documentation. - /// - /// - /// - /// See the NDoc home page for more - /// information. - /// - /// - /// By default, only the NDoc MSDN documenter ships as part of the NAnt - /// distribution. To make another NDoc documenter from the NDoc V1.3.1 - /// distribution available to the , copy the - /// documenter assembly (and possible dependencies) to the "lib" - /// directory corresponding with the CLR you're running NAnt on - /// (eg. <nant root>/bin/lib/net/1.1). - /// - /// - /// - /// - /// Document two assemblies using the MSDN documenter. The namespaces are - /// documented in NamespaceSummary.xml. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// ]]> - /// - /// Content of NamespaceSummary.xml : - /// - /// - /// - /// The Foo.Bar namespace reinvents the wheel. - /// - /// - /// The Foo.Bar.Tests namespace ensures that the Foo.Bar namespace reinvents the wheel correctly. - /// - /// - /// ]]> - /// - /// - [TaskName("ndoc")] - public class NDocTask : Task { - #region Private Instance Fields - - private XmlNodeList _docNodes; - private AssemblyFileSet _assemblies = new AssemblyFileSet(); - private FileSet _summaries = new FileSet(); - private RawXml _documenters; - private DirSet _referencePaths = new DirSet(); - private string _hhcexe; - #endregion Private Instance Fields - - #region Public Instance Properties - - /// - /// The set of assemblies to document. - /// - [BuildElement("assemblies", Required=true)] - public AssemblyFileSet Assemblies { - get { return _assemblies; } - set { _assemblies = value; } - } - - /// - /// The set of namespace summary files. - /// - [BuildElement("summaries")] - public FileSet Summaries { - get { return _summaries; } - set { _summaries = value; } - } - - /// - /// Specifies the formats in which the documentation should be generated. - /// - [BuildElement("documenters", Required=true)] - public RawXml Documenters { - get { return _documenters; } - set { _documenters = value; } - } - - /// - /// Collection of additional directories to search for referenced - /// assemblies. - /// - [BuildElement("referencepaths")] - public DirSet ReferencePaths { - get { return _referencePaths; } - set { _referencePaths = value; } - } - - #endregion Public Instance Properties - - #region Override implementation of Task - - /// - /// Initializes the taks and verifies the parameters. - /// - protected override void Initialize() { - // expand and store clone of the xml node - _docNodes = Documenters.Xml.Clone().SelectNodes("nant:documenter", - NamespaceManager); - ExpandPropertiesInNodes(_docNodes); - - _hhcexe = ResolveHhcExe(); - } - - /// - /// Generates an NDoc project and builds the documentation. - /// - protected override void ExecuteTask() { - // ensure base directory is set, even if fileset was not initialized - // from XML - if (Assemblies.BaseDirectory == null) { - Assemblies.BaseDirectory = new DirectoryInfo(Project.BaseDirectory); - } - if (Summaries.BaseDirectory == null) { - Summaries.BaseDirectory = new DirectoryInfo(Project.BaseDirectory); - } - if (ReferencePaths.BaseDirectory == null) { - ReferencePaths.BaseDirectory = new DirectoryInfo(Project.BaseDirectory); - } - - // Make sure there is at least one included assembly. This can't - // be done in the Initialize() method because the files might - // not have been built at startup time. - if (Assemblies.FileNames.Count == 0) { - throw new BuildException(ResourceUtils.GetString("NA2020"), Location); - } - - // create NDoc Project - NDoc.Core.Project project = null; - - try { - project = new NDoc.Core.Project(); - } catch (Exception ex) { - throw new BuildException(ResourceUtils.GetString("NA2021"), Location, ex); - } - - // set-up probe path, meaning list of directories where NDoc searches - // for documenters - // by default, NDoc scans the startup path of the app, so we do not - // need to add this explicitly - string privateBinPath = AppDomain.CurrentDomain.SetupInformation.PrivateBinPath; - if (privateBinPath != null) { - // have NDoc also probe for documenters in the privatebinpath - foreach (string relativePath in privateBinPath.Split(Path.PathSeparator)) { - project.AppendProbePath(Path.Combine( - AppDomain.CurrentDomain.BaseDirectory, relativePath)); - } - } - - // check for valid documenters (any other validation can be done by NDoc itself at project load time) - foreach (XmlNode node in _docNodes) { - //skip non-nant namespace elements and special elements like comments, pis, text, etc. - if (!(node.NodeType == XmlNodeType.Element) || !node.NamespaceURI.Equals(NamespaceManager.LookupNamespace("nant"))) { - continue; - } - - string documenterName = node.Attributes["name"].Value; - CheckAndGetDocumenter(project, documenterName); - } - - // write documenter project settings to temp file - string projectFileName = Path.GetTempFileName(); - Log(Level.Verbose, ResourceUtils.GetString("String_WritingProjectSettings"), projectFileName); - - XmlTextWriter writer = new XmlTextWriter(projectFileName, Encoding.UTF8); - writer.Formatting = Formatting.Indented; - writer.WriteStartDocument(); - writer.WriteStartElement("project"); - - // write assemblies section - writer.WriteStartElement("assemblies"); - foreach (string assemblyPath in Assemblies.FileNames) { - string docPath = Path.ChangeExtension(assemblyPath, ".xml"); - writer.WriteStartElement("assembly"); - writer.WriteAttributeString("location", assemblyPath); - if (File.Exists(docPath)) { - writer.WriteAttributeString("documentation", docPath); - } - writer.WriteEndElement(); - } - writer.WriteEndElement(); - - // write summaries section - StringBuilder sb = new StringBuilder(); - foreach (string summaryPath in Summaries.FileNames) { - // write out the namespace summary nodes - try { - XmlTextReader tr = new XmlTextReader(summaryPath); - tr.MoveToContent(); // skip XmlDeclaration and Processing Instructions - sb.Append(tr.ReadOuterXml()); - tr.Close(); - } catch (IOException ex) { - throw new BuildException(string.Format(CultureInfo.InvariantCulture, - ResourceUtils.GetString("NA2022"), summaryPath), Location, ex); - } - } - writer.WriteRaw(sb.ToString()); - - // write out the documenters section - writer.WriteStartElement("documenters"); - foreach (XmlNode node in _docNodes) { - //skip non-nant namespace elements and special elements like comments, pis, text, etc. - if (!(node.NodeType == XmlNodeType.Element) || !node.NamespaceURI.Equals(NamespaceManager.LookupNamespace("nant"))) { - continue; - } - writer.WriteRaw(node.OuterXml); - } - writer.WriteEndElement(); - - // end project element - writer.WriteEndElement(); - writer.Close(); - - try { - // read NDoc project file - Log(Level.Verbose, ResourceUtils.GetString("String_NDocProjectFile"), - Path.GetFullPath(projectFileName)); - project.Read(projectFileName); - - // add additional directories to search for referenced assemblies - if (ReferencePaths.DirectoryNames.Count > 0) { - foreach (string directory in ReferencePaths.DirectoryNames) { - project.ReferencePaths.Add(new ReferencePath(directory)); - } - } - - foreach (XmlNode node in _docNodes) { - //skip non-nant namespace elements and special elements like comments, pis, text, etc. - if (!(node.NodeType == XmlNodeType.Element) || !node.NamespaceURI.Equals(NamespaceManager.LookupNamespace("nant"))) { - continue; - } - - string documenterName = node.Attributes["name"].Value; - IDocumenter documenter = CheckAndGetDocumenter(project, documenterName); - - // hook up events for feedback during the build - documenter.DocBuildingStep += new DocBuildingEventHandler(OnDocBuildingStep); - documenter.DocBuildingProgress += new DocBuildingEventHandler(OnDocBuildingProgress); - - // build documentation - documenter.Build(project); - } - } catch (Exception ex) { - throw new BuildException(ResourceUtils.GetString("NA2023"), Location, ex); - } - } - - #endregion Override implementation of Task - - #region Private Instance Methods - - /// - /// Represents the method that will be called to update the overall - /// percent complete value and the current step name. - /// - /// The source of the event. - /// A that contains the event data. - private void OnDocBuildingStep(object sender, ProgressArgs e) { - Log(Level.Info, e.Status); - if (e.Progress == 25 && null != _hhcexe) { - // right before progress step 25 HtmlHelp object will be created in MSDN Documentor - // so we can set path to hhc.exe per reflection - // determined with ILSpy - SetHtmlHelpCompiler(sender, _hhcexe); - } - - } - - /// - /// Represents the method that will be called to update the current - /// step's precent complete value. - /// - /// The source of the event. - /// A that contains the event data. - private void OnDocBuildingProgress(object sender, ProgressArgs e) { - Log(Level.Verbose, e.Progress + ResourceUtils.GetString("String_PercentageComplete")); - } - - /// - /// Returns the documenter for the given project. - /// - /// - /// Documenter is not found. - /// - /// - /// is . - /// - private IDocumenter CheckAndGetDocumenter(NDoc.Core.Project project, string documenterName){ - IDocumenter documenter = null; - - if (project == null) { - throw new ArgumentNullException("project"); - } - - StringCollection documenters = new StringCollection(); - foreach (IDocumenter d in project.Documenters) { - documenters.Add(d.Name); - - // ignore case when comparing documenter names - if (string.Compare(d.Name, documenterName, true, CultureInfo.InvariantCulture) == 0) { - documenter = (IDocumenter) d; - break; - } - } - - // throw an exception if the documenter could not be found. - if (documenter == null) { - if (documenters.Count == 0) { - throw new BuildException(string.Format(CultureInfo.InvariantCulture, - ResourceUtils.GetString("NA2024"), documenterName), Location); - } else { - throw new BuildException(string.Format(CultureInfo.InvariantCulture, - ResourceUtils.GetString("NA2025"), documenterName, - StringUtils.Join(", ", documenters)), Location); - } - } - return documenter; - } - - /// - /// Performs macro expansion for the given nodes. - /// - /// for which expansion should be performed. - private void ExpandPropertiesInNodes(XmlNodeList nodes) { - foreach (XmlNode node in nodes) { - // do not process comment nodes, or entities and other internal element types. - if (node.NodeType == XmlNodeType.Element) { - ExpandPropertiesInNodes(node.ChildNodes); - foreach (XmlAttribute attr in node.Attributes) { - // use "this" keyword as workaround for Mono bug #71992 - attr.Value = this.Project.ExpandProperties(attr.Value, Location); - } - - // convert output directory to full path relative to project base directory - XmlNode outputDirProperty = (XmlNode) node.SelectSingleNode("property[@name='OutputDirectory']"); - if (outputDirProperty != null) { - XmlAttribute valueAttribute = (XmlAttribute) outputDirProperty.Attributes.GetNamedItem("value"); - if (valueAttribute != null) { - // use "this" keyword as workaround for Mono bug #71992 - valueAttribute.Value = this.Project.GetFullPath(valueAttribute.Value); - } - } - } - } - } - - /// - /// Use Reflection to set HtmplHelp._htmlHelpCompiler private field for MSDN Documentor. - /// Ndoc could not handle 64bit installations and is not actively developed anymore. - /// - /// Active documentor - /// Path to hhc.exe - private void SetHtmlHelpCompiler(object sender, string hhcexe) { - - Log(Level.Debug, "Setting Html Help Compiler per reflection"); - FieldInfo fi = sender.GetType().GetField("htmlHelp", BindingFlags.NonPublic | BindingFlags.Instance); - if (null == fi) - return; - Log(Level.Debug, "Found MSDNDocumenter.htmlHelp field"); - - object htmlHelp = fi.GetValue(sender); - FieldInfo hhc = fi.FieldType.GetField("_htmlHelpCompiler", BindingFlags.NonPublic | BindingFlags.Instance); - if (null == hhc) - return; - - Log(Level.Debug, "Found HtmlHelp._htmlHelpCompiler field"); - hhc.SetValue(htmlHelp, hhcexe); - Log(Level.Verbose, "Set Html Help Compiler to '{0}'", hhcexe); - } - - /// - /// Searches in %ProgramFiles(x86)%\HTML Help Workshop and %ProgramFiles%\HTML Help Workshop - /// for hhc.exe. If not found let ndoc msdn documentor search itself - /// - /// the path to hhc.exe if found, null otherwise - private string ResolveHhcExe() { - StringCollection folders = new StringCollection(); - - string hhwx86 = Environment.GetEnvironmentVariable("ProgramFiles(x86)"); - if (!String.IsNullOrEmpty(hhwx86)) { - folders.Add(Path.Combine(hhwx86, "HTML Help Workshop")); - } - string hhw = Environment.GetEnvironmentVariable("ProgramFiles"); - if (!String.IsNullOrEmpty(hhw)) { - folders.Add(Path.Combine(hhw, "HTML Help Workshop")); - } - - string[] searchFolders = new string[folders.Count]; - for (int i = 0; i < folders.Count; i++) { - searchFolders[i] = folders[i]; - } - - return FileUtils.ResolveFile(searchFolders, "hhc.exe", false); - } - #endregion Private Instance Methods - } -} -- debian/patches/downgrade_sharpziplib_api.patch0000644000000000000000000000303112225773544017060 0ustar From: Debian CLI Applications Team Date: Sat, 26 May 2012 12:53:33 +0200 Subject: downgrade_sharpziplib_api =================================================================== --- src/NAnt.Compression/Tasks/TarTask.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NAnt.Compression/Tasks/TarTask.cs b/src/NAnt.Compression/Tasks/TarTask.cs index 50f0b0d..da28a97 100644 --- a/src/NAnt.Compression/Tasks/TarTask.cs +++ b/src/NAnt.Compression/Tasks/TarTask.cs @@ -160,7 +160,7 @@ namespace NAnt.Compression.Tasks { // do not use convert line endings of text files to \n, as this // converts all content to ASCII - archive.AsciiTranslate = false; + archive.SetAsciiTranslation (false); // process all filesets foreach (TarFileSet fileset in TarFileSets) { @@ -268,7 +268,7 @@ namespace NAnt.Compression.Tasks { } // close the tar archive - archive.Close(); + archive.CloseArchive(); } catch (Exception ex) { // close the tar output stream if (outstream != null) { @@ -277,7 +277,7 @@ namespace NAnt.Compression.Tasks { // close the tar archive if (archive != null) { - archive.Close(); + archive.CloseArchive(); } // delete the (possibly corrupt) tar file -- debian/examples0000644000000000000000000000001312225773544010734 0ustar examples/* debian/rules0000755000000000000000000000145312225773544010264 0ustar #!/usr/bin/make -f export DH_VERBOSE=1 MAKE_FLAGS = MONO=/usr/bin/cli MCS=/usr/bin/mono-csc override_dh_auto_build: $(MAKE) $(MAKE_FLAGS) override_dh_auto_install: $(MAKE) $(MAKE_FLAGS) prefix=/usr DESTDIR=$(CURDIR)/debian/nant install rmdir --ignore-fail-on-non-empty --parents debian/nant %: dh $@ --with cli DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-\+]+)+(\+dfsg)*.*,\1,p') get-orig-source: uscan --force-download --destdir=. --download-version=$(DEB_UPSTREAM_VERSION) tar xfz nant-$(DEB_UPSTREAM_VERSION)-src.tar.gz find nant-$(DEB_UPSTREAM_VERSION)/ -name "*.dll" -delete find nant-$(DEB_UPSTREAM_VERSION)/ -name "*.exe" -delete tar cfz nant_$(DEB_UPSTREAM_VERSION)~rc1+dfsg.orig.tar.gz nant-$(DEB_UPSTREAM_VERSION)/ rm -rf nant-$(DEB_UPSTREAM_VERSION)/ debian/source/0000755000000000000000000000000012225773544010501 5ustar debian/source/format0000644000000000000000000000001412225773544011707 0ustar 3.0 (quilt) debian/manpages0000644000000000000000000000001612225773544010714 0ustar debian/nant.1 debian/watch0000644000000000000000000000013612225773544010232 0ustar version=3 opts=dversionmangle=s/\.dfsg\d+$// \ http://sf.net/nant/nant-([.0-9]+?)-src.tar.gz