Author: sisbell Date: Wed Dec 12 10:22:58 2007 New Revision: 603694 URL: http://svn.apache.org/viewvc?rev=603694&view=rev Log: Updated javadocs.
Removed: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-core/src/main/java/org/apache/maven/dotnet/PlatformUnsupportedException.java Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CommandExecutor.java incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerConfig.java incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerContext.java incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerException.java incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/DotnetCompilerConfig.java incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/DotnetCompilerPlatformVersion.java incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/InvalidArtifactException.java incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-core/src/main/java/org/apache/maven/dotnet/BuildDirectories.java incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-core/src/main/java/org/apache/maven/dotnet/ProgrammingLanguage.java incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-core/src/main/java/org/apache/maven/dotnet/Vendor.java incubator/nmaven/branches/SI_MAVEN_INTEGRATION/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CommandExecutor.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CommandExecutor.java?rev=603694&r1=603693&r2=603694&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CommandExecutor.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CommandExecutor.java Wed Dec 12 10:22:58 2007 @@ -30,10 +30,8 @@ import java.io.File; /** - * Provides services for executing commands (executables or compilers). A <code>NetExecutable</code> or - * <code>CompilerExecutable</code> implementation can use the services of this interface for executing commands. - * - * @author Shane Isbell + * Provides services for executing commands such as compilers or executables. A <code>ClassCompiler</code> implementation can use the + * services of this interface for executing commands. */ public interface CommandExecutor { Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerConfig.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerConfig.java?rev=603694&r1=603693&r2=603694&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerConfig.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerConfig.java Wed Dec 12 10:22:58 2007 @@ -24,6 +24,9 @@ import java.io.File; +/** + * Provides configuration Information for the .NET compiler environment. + */ public interface CompilerConfig { /** Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerContext.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerContext.java?rev=603694&r1=603693&r2=603694&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerContext.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerContext.java Wed Dec 12 10:22:58 2007 @@ -23,6 +23,9 @@ import java.io.IOException; +/** + * Interface defining compiler services. + */ public interface CompilerContext { /** @@ -40,8 +43,22 @@ */ ClassCompiler getClassCompiler(); + /** + * Returns the maven project used to initialize this context. + * + * @return the maven project used to initialize this context + */ MavenProject getMavenProject(); - void init( MavenProject project, CompilerConfig compilerConfig) throws InitializationException, IOException; + /** + * Initializes the compiler context. + * + * @param project the maven project + * @param compilerConfig + * @throws InitializationException + * @throws IOException + */ + void init( MavenProject project, CompilerConfig compilerConfig ) + throws InitializationException, IOException; } Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerException.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerException.java?rev=603694&r1=603693&r2=603694&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerException.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerException.java Wed Dec 12 10:22:58 2007 @@ -21,7 +21,6 @@ /** * Exception thrown for compiler errors. * - * @author Shane Isbell */ public class CompilerException extends Exception Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/DotnetCompilerConfig.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/DotnetCompilerConfig.java?rev=603694&r1=603693&r2=603694&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/DotnetCompilerConfig.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/DotnetCompilerConfig.java Wed Dec 12 10:22:58 2007 @@ -89,7 +89,7 @@ return artifactFileName; } - public void setArtifactFileName(String artifactFileName) + public void setArtifactFileName( String artifactFileName ) { this.artifactFileName = artifactFileName; } @@ -189,37 +189,37 @@ { if ( artifactType == null ) { - throw new IllegalArgumentException("artifactType"); + throw new IllegalArgumentException( "artifactType" ); } if ( compilerPlatformVersion == null ) { - throw new IllegalArgumentException("compilerPlatformVersion"); + throw new IllegalArgumentException( "compilerPlatformVersion" ); } if ( localRepository == null || !localRepository.exists() ) { - throw new IllegalArgumentException("localRepository"); + throw new IllegalArgumentException( "localRepository" ); } if ( compileSourceDirectory == null || !compileSourceDirectory.exists() ) { - throw new IllegalArgumentException("sourceDirectory"); + throw new IllegalArgumentException( "sourceDirectory" ); } if ( targetDirectory == null || !targetDirectory.exists() ) { - throw new IllegalArgumentException("targetDirectory"); + throw new IllegalArgumentException( "targetDirectory" ); } - if(programmingLanguage == null) + if ( programmingLanguage == null ) { - throw new IllegalArgumentException("programmingLanguage"); + throw new IllegalArgumentException( "programmingLanguage" ); } - if(vendor == null) + if ( vendor == null ) { - throw new IllegalArgumentException("vendor"); + throw new IllegalArgumentException( "vendor" ); } } Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/DotnetCompilerPlatformVersion.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/DotnetCompilerPlatformVersion.java?rev=603694&r1=603693&r2=603694&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/DotnetCompilerPlatformVersion.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/DotnetCompilerPlatformVersion.java Wed Dec 12 10:22:58 2007 @@ -18,6 +18,9 @@ */ package org.apache.maven.dotnet.compiler; +/** + * Enumeration of the supported .NET platform versions. + */ public enum DotnetCompilerPlatformVersion { VERSION_1_1_4322("1.1.4322"), Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/InvalidArtifactException.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/InvalidArtifactException.java?rev=603694&r1=603693&r2=603694&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/InvalidArtifactException.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/InvalidArtifactException.java Wed Dec 12 10:22:58 2007 @@ -21,7 +21,6 @@ /** * Exception thrown when the framework either does not recognize the target artifact (module, library, exe, winexe) or * the target artifact is not valid for the compiler. - * */ public class InvalidArtifactException extends Exception { Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java?rev=603694&r1=603693&r2=603694&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java Wed Dec 12 10:22:58 2007 @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.maven.dotnet.compiler.impl; import java.io.File; Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java?rev=603694&r1=603693&r2=603694&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java Wed Dec 12 10:22:58 2007 @@ -13,7 +13,6 @@ import org.apache.maven.model.Build; import org.apache.maven.dotnet.compiler.DotnetCompilerConfig; -import org.apache.maven.dotnet.PlatformUnsupportedException; import org.apache.maven.dotnet.ArtifactType; import org.apache.maven.dotnet.compiler.DotnetCompilerPlatformVersion; import org.apache.maven.dotnet.ProgrammingLanguage; Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-core/src/main/java/org/apache/maven/dotnet/BuildDirectories.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-core/src/main/java/org/apache/maven/dotnet/BuildDirectories.java?rev=603694&r1=603693&r2=603694&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-core/src/main/java/org/apache/maven/dotnet/BuildDirectories.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-core/src/main/java/org/apache/maven/dotnet/BuildDirectories.java Wed Dec 12 10:22:58 2007 @@ -18,6 +18,9 @@ */ package org.apache.maven.dotnet; +/** + * Enumeration of build directory names. + */ public enum BuildDirectories { BUILD_SOURCES("build-sources"), Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-core/src/main/java/org/apache/maven/dotnet/ProgrammingLanguage.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-core/src/main/java/org/apache/maven/dotnet/ProgrammingLanguage.java?rev=603694&r1=603693&r2=603694&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-core/src/main/java/org/apache/maven/dotnet/ProgrammingLanguage.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-core/src/main/java/org/apache/maven/dotnet/ProgrammingLanguage.java Wed Dec 12 10:22:58 2007 @@ -18,19 +18,35 @@ */ package org.apache.maven.dotnet; +/** + * Enumeration of the programming languages supported within the framework. + */ public enum ProgrammingLanguage { JAVA("java"), C_SHARP("cs"), VISUAL_BASIC("vb"); + /** + * Class file extension for the programming languqage + */ private String classFileExtension; + /** + * Constructor + * + * @param classFileExtension class file extension for the programming languqage: java, cs, vb + */ private ProgrammingLanguage(String classFileExtension) { this.classFileExtension = classFileExtension; } + /** + * Returns the class file extension for the programming languqage. + * + * @return class file extension for the programming languqage + */ public String getClassFileExtension() { return classFileExtension; Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-core/src/main/java/org/apache/maven/dotnet/Vendor.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-core/src/main/java/org/apache/maven/dotnet/Vendor.java?rev=603694&r1=603693&r2=603694&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-core/src/main/java/org/apache/maven/dotnet/Vendor.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/dotnet-core/src/main/java/org/apache/maven/dotnet/Vendor.java Wed Dec 12 10:22:58 2007 @@ -18,6 +18,9 @@ */ package org.apache.maven.dotnet; +/** + * Enumeration of vendors whose compilers and tools are supported by the framework. + */ public enum Vendor { MICROSOFT, Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java?rev=603694&r1=603693&r2=603694&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java Wed Dec 12 10:22:58 2007 @@ -45,7 +45,6 @@ /** * Maven Mojo for compiling Class files to the .NET Intermediate Language. * - * @author Shane Isbell * @goal compile * @phase compile * @description Maven Mojo for compiling class files to the .NET Intermediate Language @@ -121,7 +120,7 @@ } catch ( URISyntaxException e ) { - e.printStackTrace(); + throw new MojoExecutionException( e.getMessage() ); } } @@ -136,6 +135,7 @@ compilerConfig.setTargetDirectory( new File( project.getBuild().getDirectory() ) ); compilerConfig.setArtifactFileName( project.getBuild().getFinalName() + "." + compilerConfig.getArtifactType().getExtension() ); + DotnetCompilerContext ctx = new DotnetCompilerContextImpl(); try { @@ -143,11 +143,11 @@ } catch ( InitializationException e ) { - e.printStackTrace(); + throw new MojoExecutionException( e.getMessage() ); } catch ( IOException e ) { - e.printStackTrace(); + throw new MojoExecutionException( e.getMessage() ); } try { @@ -155,27 +155,7 @@ } catch ( InvalidArtifactException e ) { - throw new MojoExecutionException(e.getMessage()); + throw new MojoExecutionException( e.getMessage() ); } - - - } - - private static Set<File> getCompilerSourceDirectoriesFrom( List<String> directories ) - throws MojoExecutionException - { - Set<File> compilerSourceDirectories = new HashSet<File>(); - for ( String directory : directories ) - { - File file = new File( directory ); - if ( !file.exists() ) - { - throw new MojoExecutionException( "" ); - } - - compilerSourceDirectories.add( file ); - } - - return compilerSourceDirectories; } }