Author: sisbell Date: Thu Dec 20 10:52:04 2007 New Revision: 605996 URL: http://svn.apache.org/viewvc?rev=605996&view=rev Log: Mono compiler writes warnings to error output. Fixed so mono won't fail build on warnings.
Modified: incubator/nmaven/trunk/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java incubator/nmaven/trunk/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/compiler/CSharpClassCompiler.java incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java Modified: incubator/nmaven/trunk/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java?rev=605996&r1=605995&r2=605996&view=diff ============================================================================== --- incubator/nmaven/trunk/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java (original) +++ incubator/nmaven/trunk/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java Thu Dec 20 10:52:04 2007 @@ -328,6 +328,13 @@ compilerAnnotation.programmingLanguaqe().equals( compilerConfig.getProgrammingLanguage() ); } + /** + * Returns mono GAC root. First checks path for Mono, then checks MONO_ROOT property, then checks MONO_ROOT + * environmental variable. + * + * @return mono GAC root + * @throws InitializationException + */ private String getGacRootForMono() throws InitializationException { Modified: incubator/nmaven/trunk/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/compiler/CSharpClassCompiler.java URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/compiler/CSharpClassCompiler.java?rev=605996&r1=605995&r2=605996&view=diff ============================================================================== --- incubator/nmaven/trunk/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/compiler/CSharpClassCompiler.java (original) +++ incubator/nmaven/trunk/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/compiler/CSharpClassCompiler.java Thu Dec 20 10:52:04 2007 @@ -48,7 +48,8 @@ public boolean failOnErrorOutput() { - return false; + //MONO writes warnings to standard error: this turns off failing builds on warnings for MONO + return compilerContext.getCompilerConfig().getVendor().equals( Vendor.MICROSOFT); } public List<String> getCommands() @@ -166,15 +167,15 @@ commandExecutor.setLogger( compilerContext.getPlexusLogger() ); try { - commandExecutor.executeCommand( getCompilerFileName(), getCommands() ); + commandExecutor.executeCommand( getCompilerFileName(), getCommands(), failOnErrorOutput()); } catch ( CompilerException e ) { - e.printStackTrace(); + throw new InvalidArtifactException( e ); } if ( compiledArtifact == null || !compiledArtifact.exists() ) { - throw new InvalidArtifactException(); + throw new InvalidArtifactException( "Could not find main artifact" ); } return compiledArtifact; } Modified: incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java?rev=605996&r1=605995&r2=605996&view=diff ============================================================================== --- incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java (original) +++ incubator/nmaven/trunk/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java Thu Dec 20 10:52:04 2007 @@ -108,7 +108,7 @@ public void execute() throws MojoExecutionException, MojoFailureException { - Vendor vendor = Vendor.NULL; + Vendor vendor; if ( vendorName != null ) { vendor = Vendor.valueOf( vendorName.toUpperCase() );