You are viewing a plain text version of this content. The canonical link for it is here.
Posted to nmaven-dev@incubator.apache.org by Brett Porter <br...@apache.org> on 2007/12/21 20:12:35 UTC
Re: svn commit: r606291 - /incubator/nmaven/trunk/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java
Thanks - works on Mac too :)
I'll go ahead and add NMaven to the CI server.
- Brett
On 22/12/2007, at 7:03 AM, sisbell@apache.org wrote:
> Author: sisbell
> Date: Fri Dec 21 12:03:28 2007
> New Revision: 606291
>
> URL: http://svn.apache.org/viewvc?rev=606291&view=rev
> Log:
> Fixed bug in unit test that broke on Linux.
>
> Modified:
> incubator/nmaven/trunk/components/maven-dotnet-compiler/src/main/
> java/org/apache/maven/dotnet/compiler/impl/
> DotnetCompilerContextImpl.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=606291&r1=606290&r2=606291&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 Fri Dec 21 12:03:28 2007
> @@ -188,12 +188,12 @@
>
> ( netCompilerConfig.getCompilerPlatformVersion().compareTo(
>
> DotnetCompilerPlatformVersion.VERSION_2_0_50727 ) >= 0 ) )
> {
> - gacRoot = System.getenv( "SystemRoot" )
> + "\\assembly\\GAC_MSIL\\";
> + gacRoot =
> replaceFileSeparator(System.getenv( "SystemRoot" ) + "\\assembly\
> \GAC_MSIL\\");
> }
> else if
> ( netCompilerConfig.getVendor().equals( Vendor.MICROSOFT ) &&
>
> netCompilerConfig
> .equals( DotnetCompilerPlatformVersion.VERSION_1_1_4322 ) )
> {
> - gacRoot = System.getenv( "SystemRoot" )
> + "\\assembly\\GAC\\";
> + gacRoot =
> replaceFileSeparator(System.getenv( "SystemRoot" ) + "\\assembly\\GAC
> \\");
> }
> else if
> ( netCompilerConfig.getVendor().equals( Vendor.NOVELL ) )
> {
> @@ -209,21 +209,21 @@
> else if ( type.equals( "gac" ) )
> {
> String gacRoot =
> ( netCompilerConfig.getVendor().equals( Vendor.NOVELL ) ) ?
> getGacRootForMono()
> - : System.getenv( "SystemRoot" ) + "\
> \assembly\\GAC\\";
> + :
> replaceFileSeparator(System.getenv( "SystemRoot" ) + "\\assembly\\GAC
> \\");
> setArtifactGacFile( gacRoot,
> dependentArtifact );
> libraryDependencies.add( dependentArtifact );
> }
> else if ( type.equals( "gac_32" ) )
> {
> String gacRoot =
> ( netCompilerConfig.getVendor().equals( Vendor.NOVELL ) ) ?
> getGacRootForMono()
> - : System.getenv( "SystemRoot" ) + "\
> \assembly\\GAC_32\\";
> + :
> replaceFileSeparator(System.getenv( "SystemRoot" ) + "\\assembly\
> \GAC_32\\");
> setArtifactGacFile( gacRoot,
> dependentArtifact );
> libraryDependencies.add( dependentArtifact );
> }
> else if ( type.equals( "gac_msil" ) )
> {
> String gacRoot =
> ( netCompilerConfig.getVendor().equals( Vendor.NOVELL ) ) ?
> getGacRootForMono()
> - : System.getenv( "SystemRoot" ) + "\
> \assembly\\GAC_MSIL\\";
> + :
> replaceFileSeparator(System.getenv( "SystemRoot" ) + "\\assembly\
> \GAC_MSIL\\");
> setArtifactGacFile( gacRoot,
> dependentArtifact );
> libraryDependencies.add( dependentArtifact );
> }
> @@ -385,5 +385,10 @@
> "NMAVEN-061-004: Could not find GAC dependency: File
> = " + gacFile.getAbsolutePath() );
> }
> artifact.setFile( gacFile );
> + }
> +
> + private static String replaceFileSeparator(String value)
> + {
> + return value.replaceAll( "[/\\\\]+", "\\" + File.separator);
> }
> }
>
>