Author: brett
Date: Thu Sep 25 19:47:09 2008
New Revision: 699153
URL: http://svn.apache.org/viewvc?rev=699153&view=rev
Log:
[NMAVEN-147] remove the exception when the toolchain is not found and use the
defaults. If a misconfiguration occurs, propogate the exception
Modified:
incubator/nmaven/trunk/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/ClassCompiler.java
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
Modified:
incubator/nmaven/trunk/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/ClassCompiler.java
URL:
http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/ClassCompiler.java?rev=699153&r1=699152&r2=699153&view=diff
==============================================================================
---
incubator/nmaven/trunk/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/ClassCompiler.java
(original)
+++
incubator/nmaven/trunk/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/ClassCompiler.java
Thu Sep 25 19:47:09 2008
@@ -21,6 +21,8 @@
import java.io.File;
import java.util.List;
+import org.apache.maven.dotnet.ExecutionException;
+
public interface ClassCompiler
{
@@ -56,8 +58,9 @@
* Returns the executable file name that this compiler will use to compile
the application.
*
* @return the executable file name that this compiler will use to compile
the application
+ * @throws ExecutionException
*/
- String getCompilerFileName();
+ String getCompilerFileName() throws ExecutionException;
void init(CompilerContext compilerContext);
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=699153&r1=699152&r2=699153&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 Sep 25 19:47:09 2008
@@ -139,7 +139,7 @@
if ( toolchain == null )
{
- throw new ExecutionException( "No toolchain found." );
+ return null;
}
if ( programmingLanguage.equals( ProgrammingLanguage.C_SHARP ) )
@@ -152,7 +152,8 @@
}
return csharpExecutable;
}
- throw new ExecutionException( "Compiler could not be found: Language =
" + programmingLanguage );
+ logger.info( "Compiler could not be found: Language = " +
programmingLanguage );
+ return null;
}
public MavenProject getMavenProject()
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=699153&r1=699152&r2=699153&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 Sep 25 19:47:09 2008
@@ -192,18 +192,10 @@
return compiledArtifact;
}
- public String getCompilerFileName()
+ public String getCompilerFileName() throws ExecutionException
{
- File compilerExecutable = null;
- try
- {
- compilerExecutable = compilerContext.getCompilerExecutableFor(
- compilerContext.getCompilerConfig().getProgrammingLanguage() );
- }
- catch ( ExecutionException e )
- {
- e.printStackTrace();
- }
+ File compilerExecutable =
+ compilerContext.getCompilerExecutableFor(
compilerContext.getCompilerConfig().getProgrammingLanguage() );
if ( compilerExecutable != null )
{