Author: brett Date: Tue Sep 30 04:36:15 2008 New Revision: 700421 URL: http://svn.apache.org/viewvc?rev=700421&view=rev Log: remove local repository from the compiler context. It isn't used, and we want to avoid the temptation to start constructing paths by hand
Modified: incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerConfig.java incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/DotnetCompilerConfig.java incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/NetCompilerConfigTest.java incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java incubator/nmaven/branches/NMAVEN-8-nunit/plugins/maven-dotnet-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java incubator/nmaven/branches/NMAVEN-8-nunit/plugins/maven-dotnet-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/TestCompilerMojo.java Modified: incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerConfig.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerConfig.java?rev=700421&r1=700420&r2=700421&view=diff ============================================================================== --- incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerConfig.java (original) +++ incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerConfig.java Tue Sep 30 04:36:15 2008 @@ -44,13 +44,6 @@ boolean isTestCompile(); /** - * Returns local repository - * - * @return local repository - */ - File getLocalRepository(); - - /** * Sets the artifact type for the compiler plugin: library, module, exe, winexe or nar * * @param artifactType the artifact type for the compiler plugin: library, module, exe, winexe or nar @@ -64,13 +57,6 @@ */ void setTestCompile( boolean testCompile ); - /** - * Sets local repository - * - * @param localRepository - */ - void setLocalRepository( File localRepository ); - void setCompilerSourceDirectory( File sourceDirectory ); /** Modified: incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/DotnetCompilerConfig.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/DotnetCompilerConfig.java?rev=700421&r1=700420&r2=700421&view=diff ============================================================================== --- incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/DotnetCompilerConfig.java (original) +++ incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/DotnetCompilerConfig.java Tue Sep 30 04:36:15 2008 @@ -73,8 +73,6 @@ private boolean isTestCompile; - private File localRepository; - private File compileSourceDirectory; private File targetDirectory; @@ -147,16 +145,6 @@ isTestCompile = testCompile; } - public File getLocalRepository() - { - return localRepository; - } - - public void setLocalRepository( File localRepository ) - { - this.localRepository = localRepository; - } - public File getCompilerDirectory() { return compileSourceDirectory; @@ -210,11 +198,6 @@ throw new IllegalArgumentException( "compilerPlatformVersion" ); } - if ( localRepository == null || !localRepository.exists() ) - { - throw new IllegalArgumentException( "localRepository" ); - } - if ( compileSourceDirectory == null) { throw new IllegalArgumentException( "sourceDirectory" ); @@ -265,10 +248,6 @@ { return false; } - if ( !localRepository.equals( that.getLocalRepository() ) ) - { - return false; - } if ( programmingLanguage != that.getProgrammingLanguage() ) { return false; @@ -296,7 +275,6 @@ result = 29 * result + compilerPlatformVersion.hashCode(); result = 29 * result + artifactType.hashCode(); result = 29 * result + ( isTestCompile ? 1 : 0 ); - result = 29 * result + localRepository.hashCode(); result = 29 * result + compileSourceDirectory.hashCode(); result = 29 * result + targetDirectory.hashCode(); result = 29 * result + programmingLanguage.hashCode(); Modified: incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/NetCompilerConfigTest.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/NetCompilerConfigTest.java?rev=700421&r1=700420&r2=700421&view=diff ============================================================================== --- incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/NetCompilerConfigTest.java (original) +++ incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/NetCompilerConfigTest.java Tue Sep 30 04:36:15 2008 @@ -55,16 +55,6 @@ } @Test(expected = IllegalArgumentException.class) - public void verifyCompilerConfig_WithNullLocalRepository() - throws IllegalArgumentException - { - DotnetCompilerConfig config = getDefaultDotnetCompilerConfig(); - config.setLocalRepository( null); - - config.verifyCompilerConfig(); - } - - @Test(expected = IllegalArgumentException.class) public void verifyCompilerConfig_WithNullProgrammingLanguage() throws IllegalArgumentException { @@ -129,7 +119,6 @@ DotnetCompilerConfig config = DotnetCompilerConfig.Factory.createDefaultCompilerConfig(); config.setArtifactType( ArtifactType.LIBRARY ); config.setCompilerPlatformVersion( DotnetCompilerPlatformVersion.VERSION_2_0_50727 ); - config.setLocalRepository( new File( "." ) ); config.setProgrammingLanguage( ProgrammingLanguage.C_SHARP ); config.setCompilerSourceDirectory( new File( "." ) ); config.setTargetDirectory( new File( "." ) ); Modified: incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java?rev=700421&r1=700420&r2=700421&view=diff ============================================================================== --- incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java (original) +++ incubator/nmaven/branches/NMAVEN-8-nunit/components/maven-dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java Tue Sep 30 04:36:15 2008 @@ -330,7 +330,6 @@ DotnetCompilerConfig config = DotnetCompilerConfig.Factory.createDefaultCompilerConfig(); config.setArtifactType( ArtifactType.LIBRARY ); config.setCompilerPlatformVersion( DotnetCompilerPlatformVersion.VERSION_2_0_50727 ); - config.setLocalRepository( new File( "." ) ); config.setProgrammingLanguage( ProgrammingLanguage.C_SHARP ); config.setCompilerSourceDirectory( new File( "." ) ); config.setTargetDirectory( new File( "." ) ); Modified: incubator/nmaven/branches/NMAVEN-8-nunit/plugins/maven-dotnet-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/NMAVEN-8-nunit/plugins/maven-dotnet-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java?rev=700421&r1=700420&r2=700421&view=diff ============================================================================== --- incubator/nmaven/branches/NMAVEN-8-nunit/plugins/maven-dotnet-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java (original) +++ incubator/nmaven/branches/NMAVEN-8-nunit/plugins/maven-dotnet-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java Tue Sep 30 04:36:15 2008 @@ -59,13 +59,6 @@ private MavenProject project; /** - * The location of the local Maven repository. - * - * @parameter expression="${settings.localRepository}" - */ - private File localRepository; - - /** * Specify a strong name key file. * * @parameter expression = "${keyfile}" @@ -169,7 +162,6 @@ keyInfo.setKeyContainerName( keycontainer ); compilerConfig.setKeyInfo( keyInfo ); - compilerConfig.setLocalRepository( localRepository ); compilerConfig.setProgrammingLanguage( ProgrammingLanguage.C_SHARP ); compilerConfig.setCompilerSourceDirectory( sourceDir ); compilerConfig.setVendor( vendor ); Modified: incubator/nmaven/branches/NMAVEN-8-nunit/plugins/maven-dotnet-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/TestCompilerMojo.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/NMAVEN-8-nunit/plugins/maven-dotnet-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/TestCompilerMojo.java?rev=700421&r1=700420&r2=700421&view=diff ============================================================================== --- incubator/nmaven/branches/NMAVEN-8-nunit/plugins/maven-dotnet-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/TestCompilerMojo.java (original) +++ incubator/nmaven/branches/NMAVEN-8-nunit/plugins/maven-dotnet-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/TestCompilerMojo.java Tue Sep 30 04:36:15 2008 @@ -59,13 +59,6 @@ private MavenProject project; /** - * The location of the local Maven repository. - * - * @parameter expression="${settings.localRepository}" - */ - private File localRepository; - - /** * The framework version to compile under: 1.1, 2.0, 3.0 * * @parameter expression = "${frameworkVersion}" default-value="2.0.50727" @@ -128,7 +121,6 @@ compilerConfig.setArtifactType( ArtifactType.LIBRARY ); compilerConfig.setCompilerPlatformVersion( DotnetCompilerPlatformVersion.valueFromVersion( frameworkVersion ) ); - compilerConfig.setLocalRepository( localRepository ); compilerConfig.setProgrammingLanguage( ProgrammingLanguage.C_SHARP ); compilerConfig.setTestCompile( true ); compilerConfig.setCompilerSourceDirectory( sourceDir );