You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-commits@incubator.apache.org by lc...@apache.org on 2011/12/16 10:36:35 UTC
svn commit: r1215084 - in
/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl:
CompilerContextImpl.java NetExecutableFactoryImpl.java
Author: lcorneliussen
Date: Fri Dec 16 10:36:34 2011
New Revision: 1215084
URL: http://svn.apache.org/viewvc?rev=1215084&view=rev
Log:
[NPANDAY-499] Fixed a merge error + little bugfix in CompilerContextImpl#init
Modified:
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CompilerContextImpl.java
incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetExecutableFactoryImpl.java
Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CompilerContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CompilerContextImpl.java?rev=1215084&r1=1215083&r2=1215084&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CompilerContextImpl.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CompilerContextImpl.java Fri Dec 16 10:36:34 2011
@@ -52,6 +52,8 @@ import java.util.Iterator;
import java.util.List;
import java.util.Set;
+import static com.google.common.base.Preconditions.checkArgument;
+
/**
* Provides an implementation of the Compiler Context.
*
@@ -365,6 +367,10 @@ public final class CompilerContextImpl
directLibraries = new ArrayList<Artifact>();
modules = new ArrayList<Artifact>();
artifactContext.init( project, project.getRemoteArtifactRepositories(), config.getLocalRepository() );
+ compilerCapability = capability;
+
+ // initialize base class
+ super.init( compilerCapability, config );
Set<Artifact> artifacts = project.getDependencyArtifacts();//Can add WFC deps prior
if ( artifacts != null )
@@ -409,11 +415,6 @@ public final class CompilerContextImpl
}
}
- // TODO: matching the capability for the compiler requirement should be done on the outside
- compilerCapability = capability;
-
- super.init( compilerCapability, config );
-
String basedir = project.getBuild().getDirectory() + File.separator + "assembly-resources" + File.separator;
linkedResources = new File( basedir, "linkresource" ).exists() ? Arrays.asList(
new File( basedir, "linkresource" ).listFiles() ) : new ArrayList<File>();
@@ -570,8 +571,10 @@ public final class CompilerContextImpl
private void setArtifactGacFile( String gacRoot, Artifact artifact )
throws PlatformUnsupportedException
{
- // TODO: Refactor to PathUtil.getGlobalAssemblyCacheFileFor
+ checkArgument( gacRoot != null, "gacRoot must not be null!" );
+ checkArgument( artifact != null, "artifact must not be null!" );
+ // TODO: Refactor to PathUtil.getGlobalAssemblyCacheFileFor
String type = artifact.getType();
logger.debug( "NPANDAY-061-001: Gac Root:" + gacRoot );
logger.debug( "NPANDAY-061-003: Artifact Type:" + type );
Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetExecutableFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetExecutableFactoryImpl.java?rev=1215084&r1=1215083&r2=1215084&view=diff
==============================================================================
--- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetExecutableFactoryImpl.java (original)
+++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/NetExecutableFactoryImpl.java Fri Dec 16 10:36:34 2011
@@ -352,7 +352,7 @@ public class NetExecutableFactoryImpl
Artifact pluginLoaderArtifact =
artifactContext.getArtifactsFor( "org.apache.npanday.plugins", "NPanday.Plugin.Loader", null, null ).get(
0 );
- artifactPath = PathUtil.getPrivateApplicationBaseFileFor( pluginLoaderArtifact, new File( localRepository ), artifactPath );
+ artifactPath = PathUtil.getPrivateApplicationBaseFileFor( pluginLoaderArtifact, new File( localRepository ), targetDir );
commands.add( "startProcessAssembly=" + artifactPath.getAbsolutePath() );
return getNetExecutableFromRepository( "org.apache.npanday.plugins", "NPanday.Plugin.Runner", vendorRequirement,