incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ewor...@apache.org
Subject svn commit: r607652 - /incubator/nmaven/trunk/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/compiler/CSharpClassCompiler.java
Date Mon, 31 Dec 2007 02:21:36 GMT
Author: eworley
Date: Sun Dec 30 18:21:35 2007
New Revision: 607652

URL: http://svn.apache.org/viewvc?rev=607652&view=rev
Log:
* Added check if it is a test compile, if so we use test scope'd references and also add a
reference to the main artifact

Modified:
    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-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=607652&r1=607651&r2=607652&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
Sun Dec 30 18:21:35 2007
@@ -56,7 +56,14 @@
     public List<String> getCommands()
     {
         DotnetCompilerConfig config = (DotnetCompilerConfig) compilerContext.getCompilerConfig();
-        Set<Artifact> references = compilerContext.getLibraryDependenciesFor( ArtifactScope.COMPILE);
+        
+        Set<Artifact> references = null;
+        if (compilerContext.getCompilerConfig().isTestCompile()) {
+            references = compilerContext.getLibraryDependenciesFor( ArtifactScope.TEST );
+            references.add( compilerContext.getMavenProject().getArtifact() );
+        } else {
+            references = compilerContext.getLibraryDependenciesFor( ArtifactScope.COMPILE
);
+        }
         Set<Artifact> modules = compilerContext.getDirectModuleDependencies();
 
         File sourceDirectory = config.getCompilerDirectory();



Mime
View raw message