incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r518032 - in /incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin: ./ src/main/java/org/apache/maven/dotnet/plugin/compile/
Date Wed, 14 Mar 2007 06:12:26 GMT
Author: sisbell
Date: Tue Mar 13 23:12:25 2007
New Revision: 518032

URL: http://svn.apache.org/viewvc?view=rev&rev=518032
Log:
compile plugin now supports a flat directory structure (For IDE support).

Modified:
    incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/pom.xml
    incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/AssemblyInfoGeneratorMojo.java
    incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/CompilerMojo.java
    incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java
    incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java

Modified: incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/pom.xml?view=diff&rev=518032&r1=518031&r2=518032
==============================================================================
--- incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/pom.xml (original)
+++ incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/pom.xml Tue Mar 13 23:12:25
2007
@@ -22,6 +22,19 @@
       <version>2.0.4</version>
     </dependency>
   </dependencies>
+  <build>
+     <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>    
+
+  </build>
 
   <distributionManagement>
     <site>

Modified: incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/AssemblyInfoGeneratorMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/AssemblyInfoGeneratorMojo.java?view=diff&rev=518032&r1=518031&r2=518032
==============================================================================
--- incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/AssemblyInfoGeneratorMojo.java
(original)
+++ incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/AssemblyInfoGeneratorMojo.java
Tue Mar 13 23:12:25 2007
@@ -119,6 +119,7 @@
     public void execute()
         throws MojoExecutionException
     {
+        
         if ( project.getArtifact().getType().equals( "module" ) )
         {
             return;
@@ -144,14 +145,7 @@
         }
         getLog().info( "NMAVEN-902-000: Generating Assembly Info: Language = " + language.trim()
);
 
-        try
-        {
-            assemblerContext.init( project );
-        }
-        catch ( InitializationException e )
-        {
-            throw new MojoExecutionException( "NMAVEN-902-006: Failed to initialize the assembler
context" );
-        }
+
 
         //TODO: Investigate the affect of not setting isDefault and profile. In the case
of executables, this is
         //managed by the framework. I intended to keep vendor info and state machine processor
out of the

Modified: incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/CompilerMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/CompilerMojo.java?view=diff&rev=518032&r1=518031&r2=518032
==============================================================================
--- incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/CompilerMojo.java
(original)
+++ incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/CompilerMojo.java
Tue Mar 13 23:12:25 2007
@@ -27,6 +27,8 @@
 import org.apache.maven.dotnet.executable.ExecutionException;
 import org.apache.maven.dotnet.vendor.VendorFactory;
 import org.apache.maven.dotnet.executable.compiler.*;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.artifact.Artifact;
 
 import java.util.ArrayList;
 import java.io.File;

Modified: incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java?view=diff&rev=518032&r1=518031&r2=518032
==============================================================================
--- incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java
(original)
+++ incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java
Tue Mar 13 23:12:25 2007
@@ -25,6 +25,7 @@
 import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 
 import org.apache.maven.dotnet.InitializationException;
+import org.apache.maven.dotnet.assembler.AssemblerContext;
 import org.apache.maven.dotnet.artifact.AssemblyResolver;
 
 import java.io.File;
@@ -77,6 +78,11 @@
      */
     private org.apache.maven.dotnet.NMavenRepositoryRegistry nmavenRegistry;
 
+    /**
+     * @component
+     */
+    private AssemblerContext assemblerContext;
+
     public void execute()
         throws MojoExecutionException
     {
@@ -92,6 +98,15 @@
         catch ( ArtifactNotFoundException e )
         {
             throw new MojoExecutionException( "NMAVEN-901-001: Unable to resolve assemblies",
e );
+        }
+
+        try
+        {
+            assemblerContext.init( project );
+        }
+        catch ( InitializationException e )
+        {
+            throw new MojoExecutionException( "NMAVEN-901-002: Failed to initialize the assembler
context" );
         }
     }
 }

Modified: incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java?view=diff&rev=518032&r1=518031&r2=518032
==============================================================================
--- incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java
(original)
+++ incubator/nmaven/branches/SI_IDE/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java
Tue Mar 13 23:12:25 2007
@@ -20,6 +20,8 @@
 
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.dotnet.assembler.AssemblerContext;
+import org.apache.maven.dotnet.PlatformUnsupportedException;
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.DirectoryScanner;
 
@@ -67,6 +69,19 @@
      */
     private String[] excludes;
 
+    /**
+     * .NET Language. The default value is <code>C_SHARP</code>. Not case or
white-space sensitive.
+     *
+     * @parameter expression="${language}" default-value = "C_SHARP"
+     * @required
+     */
+    private String language;
+
+    /**
+     * @component
+     */
+    private AssemblerContext assemblerContext;
+
     public void execute()
         throws MojoExecutionException
     {
@@ -79,17 +94,28 @@
         directoryScanner.setBasedir( sourceDirectory );
 
         List<String> excludeList = new ArrayList<String>();
-        excludeList.add( "*.suo" );
-        excludeList.add( "*.csproj" );
-        excludeList.add( "*.sln" );
+        //target files
         excludeList.add( "obj/**" );
+        excludeList.add( "bin/**" );
+        excludeList.add( "target/**" );
+        //Misc
+        excludeList.add( "Resources/**" );
+        excludeList.add( "Test/**" );
 
-        if ( includes != null && includes.length > 0 )
+        List<String> includeList = new ArrayList<String>();
+        try
+        {
+            includeList.add( "*" + assemblerContext.getClassExtensionFor( language));
+        }
+        catch ( PlatformUnsupportedException e )
         {
-            directoryScanner.setIncludes( includes );
+            throw new MojoExecutionException("NMAVEN-904-003: Language is not supported:
Language = " + language, e);
         }
+
+        directoryScanner.setIncludes( includeList.toArray( includes ) );
         directoryScanner.setExcludes( excludeList.toArray( excludes ) );
         directoryScanner.addDefaultExcludes();
+
         directoryScanner.scan();
         String[] files = directoryScanner.getIncludedFiles();
         getLog().info(



Mime
View raw message