svn commit: r598845 - in /incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler: ./ impl/

2007-11-27 Thread sisbell
Author: sisbell
Date: Tue Nov 27 17:36:09 2007
New Revision: 598845

URL: http://svn.apache.org/viewvc?rev=598845&view=rev
Log:
Tightened up the API and added implementation to the net context. This 
implementation just uses a config, not the platform capability/requirements.

Added:

incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/NetCompilerPlatformVersion.java
   (with props)

incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/PlatformUnsupportedException.java
   (with props)

incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/ProgrammingLanguage.java
   (with props)

incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/Vendor.java
   (with props)
Modified:

incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/CompilerConfig.java

incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/CompilerContext.java

incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/NetCompilerConfig.java

incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/NetCompilerContext.java

incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/impl/NetCompilerContextImpl.java

Modified: 
incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/CompilerConfig.java
URL: 
http://svn.apache.org/viewvc/incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/CompilerConfig.java?rev=598845&r1=598844&r2=598845&view=diff
==
--- 
incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/CompilerConfig.java
 (original)
+++ 
incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/CompilerConfig.java
 Tue Nov 27 17:36:09 2007
@@ -71,12 +71,9 @@
 
 void setProgrammingLanguage( ProgrammingLanguage programLanguage );
 
-String getProgramLanguageVersion();
+void setVendor(Vendor vendor);
 
-void setProgrammingLanguageVersion(String programLanguageVersion);
+Vendor getVendor();
 
-void setVendor(String vendor);
-
-String getVendor();
 
 }

Modified: 
incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/CompilerContext.java
URL: 
http://svn.apache.org/viewvc/incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/CompilerContext.java?rev=598845&r1=598844&r2=598845&view=diff
==
--- 
incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/CompilerContext.java
 (original)
+++ 
incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/CompilerContext.java
 Tue Nov 27 17:36:09 2007
@@ -1,5 +1,7 @@
 package org.apache.maven.dotnet.compiler;
 
+import org.apache.maven.project.MavenProject;
+
 public interface CompilerContext
 {
 /**
@@ -11,10 +13,14 @@
 CompilerConfig getCompilerConfig();
 
 /**
- * Returns an instance of the NetExecutable appropriate for given 
language/vendor/OS.
+ * Returns an instance of the compiler appropriate for this context.
  *
- * @return an instance of the NetExecutable appropriate for given 
language/vendor/OS.
+ * @return an instance of the compiler appropriate for this context
  */
 Compiler getCompiler();
+
+MavenProject getMavenProject();
+
+void init( MavenProject project, CompilerConfig compilerConfig) throws 
PlatformUnsupportedException;
 
 }

Modified: 
incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/NetCompilerConfig.java
URL: 
http://svn.apache.org/viewvc/incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/NetCompilerConfig.java?rev=598845&r1=598844&r2=598845&view=diff
==
--- 
incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/NetCompilerConfig.java
 (original)
+++ 
incubator/nmaven/tags/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable

svn commit: r598871 - in /incubator/nmaven: branches/SI_MAVEN_INTEGRATION/ tags/SI_MAVEN_INTEGRATION/

2007-11-27 Thread sisbell
Author: sisbell
Date: Tue Nov 27 21:28:07 2007
New Revision: 598871

URL: http://svn.apache.org/viewvc?rev=598871&view=rev
Log:
This should be a branch, not a tag

Added:
incubator/nmaven/branches/SI_MAVEN_INTEGRATION/
  - copied from r598870, incubator/nmaven/tags/SI_MAVEN_INTEGRATION/
Removed:
incubator/nmaven/tags/SI_MAVEN_INTEGRATION/



svn commit: r598880 - in /incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler: ArtifactType.java CompilerConfig.java KeyInfo.java N

2007-11-27 Thread sisbell
Author: sisbell
Date: Tue Nov 27 22:41:19 2007
New Revision: 598880

URL: http://svn.apache.org/viewvc?rev=598880&view=rev
Log:
Default CompilerContext and KeyInfo implementations. Better exception checking.

Added:

incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/ArtifactType.java
   (with props)
Modified:

incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/CompilerConfig.java

incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/KeyInfo.java

incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/NetCompilerConfig.java

incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/impl/NetCompilerContextImpl.java

Added: 
incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/ArtifactType.java
URL: 
http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/ArtifactType.java?rev=598880&view=auto
==
--- 
incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/ArtifactType.java
 (added)
+++ 
incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/ArtifactType.java
 Tue Nov 27 22:41:19 2007
@@ -0,0 +1,125 @@
+package org.apache.maven.dotnet.compiler;
+
+/**
+ * Enumeration of all the valid target types (module, library, winexe, exe, 
nar) for the .NET platform.
+ *
+ */
+public enum ArtifactType
+{
+MODULE( "module", "module", "netmodule" ),
+LIBRARY( "library", "library", "dll" ),
+EXE( "exe", "exe", "exe" ),
+WINEXE( "winexe", "winexe", "exe" ),
+NAR( "nar", "null", "nar" ),
+EXECONFIG( "exe.config", "null", "exe.config" ),
+NETPLUGIN( "netplugin", "library", "dll" ),
+VISUAL_STUDIO_ADDIN( "visual-studio-addin", "library", "dll" ),
+SHARP_DEVELOP_ADDIN( "sharp-develop-addin", "library", "dll" ),
+NULL( "null", "null", "null" );
+
+/**
+ * The extension used for the artifact(netmodule, dll, exe)
+ */
+private String extension;
+
+/**
+ * The packaging type (as given in the package tag within the pom.xml) of 
the artifact.
+ */
+private String packagingType;
+
+/**
+ * The target types (module, library, winexe, exe) for the .NET platform.
+ */
+private String targetCompileType;
+
+/**
+ * Constructor
+ */
+ArtifactType( String packagingType, String targetCompileType, String 
extension )
+{
+this.packagingType = packagingType;
+this.targetCompileType = targetCompileType;
+this.extension = extension;
+}
+
+/**
+ * Returns extension used for the artifact(netmodule, dll, exe).
+ *
+ * @return Extension used for the artifact(netmodule, dll, exe).
+ */
+public String getExtension()
+{
+return extension;
+}
+
+/**
+ * Returns the packaging type (as given in the package tag within the 
pom.xml) of the artifact.
+ *
+ * @return the packaging type (as given in the package tag within the 
pom.xml) of the artifact.
+ */
+public String getPackagingType()
+{
+return packagingType;
+}
+
+/**
+ * Returns target types (module, library, winexe, exe) for the .NET 
platform.
+ *
+ * @return target types (module, library, winexe, exe) for the .NET 
platform.
+ */
+public String getTargetCompileType()
+{
+return targetCompileType;
+}
+
+/**
+ * Returns artifact type for the specified packaging name
+ *
+ * @param packagingName the package name (as given in the package tag 
within the pom.xml) of the artifact.
+ * @return the artifact type for the specified packaging name
+ */
+public static synchronized ArtifactType getArtifactTypeForPackagingName( 
String packagingName )
+{
+if ( packagingName.equals( ArtifactType.MODULE.getPackagingType() ) )
+{
+return ArtifactType.MODULE;
+}
+else if ( packagingName.equals( 
ArtifactType.LIBRARY.getPackagingType() ) )
+{
+return ArtifactType.LIBRARY;
+}
+else if ( packagingName.equals( ArtifactType.EXE.getPackagingType() ) )
+{
+return ArtifactType.EXE;
+}
+else if ( packagingName.equals( ArtifactType.WINEXE.getPackagingType() 
) )
+{
+return ArtifactType.WINEXE;
+}
+else if ( packagingName.equals( ArtifactType.NAR.getPackagingType() ) )
+{
+ 

svn commit: r598891 - /incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/ProgrammingLanguage.java

2007-11-27 Thread eworley
Author: eworley
Date: Tue Nov 27 23:50:06 2007
New Revision: 598891

URL: http://svn.apache.org/viewvc?rev=598891&view=rev
Log:
Private constructor for enum

Modified:

incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/ProgrammingLanguage.java

Modified: 
incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/ProgrammingLanguage.java
URL: 
http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/ProgrammingLanguage.java?rev=598891&r1=598890&r2=598891&view=diff
==
--- 
incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/ProgrammingLanguage.java
 (original)
+++ 
incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-executable/src/org/apache/maven/dotnet/compiler/ProgrammingLanguage.java
 Tue Nov 27 23:50:06 2007
@@ -8,7 +8,7 @@
 
 private String classFileExtension;
 
-ProgrammingLanguage(String classFileExtension)
+private ProgrammingLanguage(String classFileExtension)
 {
 this.classFileExtension = classFileExtension;
 }