Hi all,
I am trying to build a .Net / #C project using NMaven. (I have already posted this question on the maven mailing list but have not received any response.) I am using the version of NMaven found at https://svn.apache.org/repos/asf/incubator/nmaven/tags/STABLE-2007-05-18 . However when I start a build using mvn install I receive the following error: >>>>>> [INFO] Scanning for projects... [INFO]------------------------------------------------------------------ ------ [INFO] Building Serial Dyno Client [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [INFO] [dotnet-compiler:generate-assembly-info] [INFO] NMAVEN-902-001: Found AssemblyInfo file(s), so will not generate one [INFO] [dotnet-compiler:process-sources] [INFO] NMAVEN-904-002: Copying source files: From = C:\tmp\DynoServerRefac\DynoClientSerial\., To = C:\tmp\DynoServerRefac\DynoClientSerial\target\build-sources\main-source s, File Count = 16 [INFO] [dotnet-compiler:compile] [INFO] .NET Vendor: MICROSOFT NMAVEN-040-003: Error Log not set: Will use java.util.logging.Logger target\build-sources\main-sources\Classes\DriverNetwork.cs(287,63): error CS0227: Unsafe code may only appear if compiling with /unsafe target\build-sources\main-sources\Classes\DriverNetwork.cs(307,63): error CS0227: Unsafe code may only appear if compiling with /unsafe target\build-sources\main-sources\Classes\DriverSerial.cs(227,63): error CS0227: Unsafe code may only appear if compiling with /unsafe NMAVEN-040-000: Executed command: Commandline = cmd.exe /X /C '"csc /out:C:\tmp\DynoServerRefac\DynoClientSerial\target\dynoClientSerial-1.0 .0.exe /target:exe /recurse:C:\tmp\DynoServerRefac\DynoClientSerial\target\build-sources\** /reference:c:\MavenRepository\au\com\dynoServerRoot\dynoService\1.0.0\dy noService-1.0.0.dll /nologo /warnaserror- /doc:C:\tmp\DynoServerRefac\DynoClientSerial\target\comments.xml"', Result = 1 [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] org.apache.maven.dotnet.compiler.CompilerException: NMAVEN-040-001: Could not execute: Command = cmd.exe /X /C '"csc /out:C:\tmp\DynoServerRefac\DynoClientSerial\target\dynoClientSerial-1.0 .0.exe /target:exe /recurse:C:\tmp\DynoServerRefac\DynoClientSerial\target\build-sources\** /reference:c:\MavenRepository\au\com\dynoServerRoot\dynoService\1.0.0\dy noService-1.0.0.dll /nologo /warnaserror- /doc:C:\tmp\DynoServerRefac\DynoClientSerial\target\comments.xml"', Result = 1 [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 second [INFO] Finished at: Mon Feb 11 15:11:58 EST 2008 [INFO] Final Memory: 5M/10M [INFO] ------------------------------------------------------------------------ <<<<<<< error CS0227: Unsafe code may only appear if compiling with /unsafe How can I specify the /unsafe option? I have googled around but could not find a solution on how to specify build options. Thanks for any pointers Jens
