incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r534161 - in /incubator/nmaven/branches/SI_XPT: assemblies/NMaven.Plugin.MojoGenerator/src/main/csharp/NMaven/Plugin/MojoGenerator/ assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/ components/dotnet-core/src/main/resources/...
Date Tue, 01 May 2007 17:06:59 GMT
Author: sisbell
Date: Tue May  1 10:06:57 2007
New Revision: 534161

URL: http://svn.apache.org/viewvc?view=rev&rev=534161
Log:
support for anging vendor information in the pom for .NET plugins and fixed ome bugs in the
mojo generation that cause runtime errors.

Added:
    incubator/nmaven/branches/SI_XPT/plugins/NMaven.Plugin.Settings/pom-java.xml   (with props)
    incubator/nmaven/branches/SI_XPT/plugins/NMaven.Plugin.Settings/src/main/csharp/NMaven.Plugin.Settings.csproj
    incubator/nmaven/branches/SI_XPT/plugins/NMaven.Plugin.Settings/src/main/java/
    incubator/nmaven/branches/SI_XPT/plugins/NMaven.Plugin.Settings/src/main/java/NMaven/
    incubator/nmaven/branches/SI_XPT/plugins/NMaven.Plugin.Settings/src/main/java/NMaven/Plugin/
    incubator/nmaven/branches/SI_XPT/plugins/NMaven.Plugin.Settings/src/main/java/NMaven/Plugin/Settings/
Removed:
    incubator/nmaven/branches/SI_XPT/net-plugins/
    incubator/nmaven/branches/SI_XPT/plugins/maven-solution-plugin/
Modified:
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.MojoGenerator/src/main/csharp/NMaven/Plugin/MojoGenerator/Generator.cs
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/Code.cs
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/ImportPackage.cs
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/JavaClassUnmarshaller.cs
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/JavaMethod.cs
    incubator/nmaven/branches/SI_XPT/components/dotnet-core/src/main/resources/META-INF/nmaven/net-dependencies.xml
    incubator/nmaven/branches/SI_XPT/components/dotnet-plugin/src/main/java/org/apache/maven/dotnet/plugin/AbstractMojo.java
    incubator/nmaven/branches/SI_XPT/plugins/pom.xml

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.MojoGenerator/src/main/csharp/NMaven/Plugin/MojoGenerator/Generator.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.MojoGenerator/src/main/csharp/NMaven/Plugin/MojoGenerator/Generator.cs?view=diff&rev=534161&r1=534160&r2=534161
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.MojoGenerator/src/main/csharp/NMaven/Plugin/MojoGenerator/Generator.cs
(original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.MojoGenerator/src/main/csharp/NMaven/Plugin/MojoGenerator/Generator.cs
Tue May  1 10:06:57 2007
@@ -81,7 +81,8 @@
 			JavaClassUnmarshaller jcuLocal = new JavaClassUnmarshaller();
 			
 			char[] delim = {'.'};
-			DirectoryInfo sourceDirectory = new DirectoryInfo(@outputDirectory.FullName + "/src/main/java/");
+			DirectoryInfo sourceDirectory = new DirectoryInfo(@outputDirectory.FullName + "/src/main/java/"

+			                                                  + artifactId.Replace('.', '/'));
 			sourceDirectory.Create();
 			foreach(JavaClass javaClass in javaClasses)
 			{

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/Code.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/Code.cs?view=diff&rev=534161&r1=534160&r2=534161
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/Code.cs
(original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/Code.cs
Tue May  1 10:06:57 2007
@@ -1,3 +1,23 @@
+#region Apache License, Version 2.0 
+//
+// 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.
+//
+#endregion
 using System;
 using System.Collections.Generic;
 

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/ImportPackage.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/ImportPackage.cs?view=diff&rev=534161&r1=534160&r2=534161
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/ImportPackage.cs
(original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/ImportPackage.cs
Tue May  1 10:06:57 2007
@@ -1,3 +1,23 @@
+#region Apache License, Version 2.0 
+//
+// 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.
+//
+#endregion
 using System;
 using System.Collections.Generic;
 

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/JavaClassUnmarshaller.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/JavaClassUnmarshaller.cs?view=diff&rev=534161&r1=534160&r2=534161
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/JavaClassUnmarshaller.cs
(original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/JavaClassUnmarshaller.cs
Tue May  1 10:06:57 2007
@@ -81,8 +81,8 @@
 				if(attribute is ClassAttribute)
 				{
 					ClassAttribute mojo = (ClassAttribute) attribute;			
-					classComments.Add(@"@phase = """ + mojo.Phase + @"""");	
-					classComments.Add(@"@goal = """ + mojo.Goal + @"""");	
+					classComments.Add(@"@phase " + mojo.Phase);	
+					classComments.Add(@"@goal " + mojo.Goal);	
 					break;
 				}
 			}
@@ -95,7 +95,7 @@
 	            foreach (Attribute attribute in field.GetCustomAttributes(true))
 	            {	            	
 					FieldAttribute mojo = (FieldAttribute) attribute;
-					javaFields.Add(CreateJavaField("private", mojo.Type, mojo.Name, 
+					javaFields.Add(CreateJavaField("public", mojo.Type, mojo.Name, 
 					                               CreateMojoComment(mojo.Expression),
 					                               "FieldAnnotation()"));
 	            }
@@ -104,8 +104,10 @@
         	//mojo parameters
         	javaFields.Add(CreateJavaField("private", "String", "localRepository",  
         	                               CreateMojoComment("${settings.localRepository}"),
null));
-        	javaFields.Add(CreateJavaField("private", "String", "vendor",  CreateMojoComment("${vendor}"),
null));
-        	javaFields.Add(CreateJavaField("private", "String", "vendorVersion",  CreateMojoComment("${vendorVersion}"),
null));
+        	javaFields.Add(CreateJavaField("private", "String", "vendor",  
+        	                               CreateMojoComment("${vendor}"), null));
+        	javaFields.Add(CreateJavaField("private", "String", "vendorVersion",  
+        	                               CreateMojoComment("${vendorVersion}"), null));
         	javaFields.Add(CreateJavaField("private", "String", "frameworkVersion", 
         	                               CreateMojoComment("${frameworkVersion}"), null));
         	
@@ -144,8 +146,16 @@
         	                                 CreateCodeWithSimpleReturnType("mavenProject")));

         	                                
         	javaMethods.Add(CreateJavaMethod("public", "String", "getLocalRepository", 
-        	                                 CreateCodeWithSimpleReturnType("localRepository")));
        	                                
-        	                                
+        	                                 CreateCodeWithSimpleReturnType("localRepository")));
 
+        	
+        	javaMethods.Add(CreateJavaMethod("public", "String", "getVendorVersion", 
+        	                                 CreateCodeWithSimpleReturnType("vendorVersion")));
         	
+
+        	javaMethods.Add(CreateJavaMethod("public", "String", "getVendor", 
+        	                                 CreateCodeWithSimpleReturnType("vendor"))); 
+        	
+        	javaMethods.Add(CreateJavaMethod("public", "String", "getFrameworkVersion", 
+        	                                 CreateCodeWithSimpleReturnType("frameworkVersion")));
           	
         	javaClass.JavaMethods = javaMethods;
 		 	javaClass.JavaFields = javaFields;
 		 	return javaClass;

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/JavaMethod.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/JavaMethod.cs?view=diff&rev=534161&r1=534160&r2=534161
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/JavaMethod.cs
(original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin/src/main/csharp/NMaven/Plugin/Generator/JavaMethod.cs
Tue May  1 10:06:57 2007
@@ -1,3 +1,23 @@
+#region Apache License, Version 2.0 
+//
+// 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.
+//
+#endregion
 using System;
 using System.Collections.Generic;
 

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-core/src/main/resources/META-INF/nmaven/net-dependencies.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-core/src/main/resources/META-INF/nmaven/net-dependencies.xml?view=diff&rev=534161&r1=534160&r2=534161
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-core/src/main/resources/META-INF/nmaven/net-dependencies.xml
(original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-core/src/main/resources/META-INF/nmaven/net-dependencies.xml
Tue May  1 10:06:57 2007
@@ -1,4 +1,5 @@
 <netDependencies>
+  <!--Plugins-->
   <netDependency>
     <groupId>NMaven.Plugin</groupId>
     <artifactId>NMaven.Plugin.Resx</artifactId>
@@ -11,22 +12,14 @@
     <version>0.14</version>
     <type>exe</type>
   </netDependency>
-<!--
-  <netDependency>
-    <id>RubyCompiler</id>
-    <groupId>QUT.RubyCompiler</groupId>
-    <artifactId>RubyCompiler</artifactId>
-    <version>1.0.0</version>
-    <type>exe</type>
-  </netDependency>
-  -->
   <netDependency>
     <groupId>NMaven.Plugin</groupId>
     <artifactId>NMaven.Plugin.Solution</artifactId>
     <version>0.14</version>
     <type>netplugin</type>
-    <profile>withIde</profile>
   </netDependency>
+  
+   <!--Plugin Framework-->
   <netDependency>
     <groupId>NMaven.Plugin</groupId>
     <artifactId>NMaven.Plugin</artifactId>
@@ -57,4 +50,13 @@
     <version>0.14</version>
     <type>exe</type>
   </netDependency>
+<!--
+  <netDependency>
+    <id>RubyCompiler</id>
+    <groupId>QUT.RubyCompiler</groupId>
+    <artifactId>RubyCompiler</artifactId>
+    <version>1.0.0</version>
+    <type>exe</type>
+  </netDependency>
+  -->
 </netDependencies>

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-plugin/src/main/java/org/apache/maven/dotnet/plugin/AbstractMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-plugin/src/main/java/org/apache/maven/dotnet/plugin/AbstractMojo.java?view=diff&rev=534161&r1=534160&r2=534161
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-plugin/src/main/java/org/apache/maven/dotnet/plugin/AbstractMojo.java
(original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-plugin/src/main/java/org/apache/maven/dotnet/plugin/AbstractMojo.java
Tue May  1 10:06:57 2007
@@ -119,8 +119,12 @@
         try
         {
             VendorInfo vendorInfo = VendorInfo.Factory.createDefaultVendorInfo();
-            vendorInfo.setVendor( VendorFactory.createVendorFromName( "MICROSOFT" ) );
-            //String className = this.getClass().getName(); Will work with generated classes
+            if ( getVendor() != null )
+            {
+                vendorInfo.setVendor( VendorFactory.createVendorFromName( getVendor() ) );
+            }
+            vendorInfo.setFrameworkVersion( getFrameworkVersion() );
+            vendorInfo.setVendorVersion( getVendorVersion() );
             getNetExecutableFactory().getPluginLoaderFor( getMojoGroupId(), getMojoArtifactId(),
vendorInfo,
                                                           getMavenProject(), getLocalRepository(),
paramFile,
                                                           getClassName() ).execute();
@@ -201,5 +205,11 @@
     public abstract String getMojoArtifactId();
 
     public abstract String getClassName();
+
+    public abstract String getVendor();
+
+    public abstract String getVendorVersion();
+
+    public abstract String getFrameworkVersion();
 
 }

Added: incubator/nmaven/branches/SI_XPT/plugins/NMaven.Plugin.Settings/pom-java.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/NMaven.Plugin.Settings/pom-java.xml?view=auto&rev=534161
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/NMaven.Plugin.Settings/pom-java.xml (added)
+++ incubator/nmaven/branches/SI_XPT/plugins/NMaven.Plugin.Settings/pom-java.xml Tue May 
1 10:06:57 2007
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://maven.apache.org/POM/4.0.0">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>NMaven.Plugin</groupId>
+  <artifactId>NMaven.Plugin.Settings.JavaBinding</artifactId>
+  <packaging>maven-plugin</packaging>
+  <name>NMaven.Plugin.Settings.JavaBinding</name>
+  <version>0.14</version>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.dotnet</groupId>
+      <artifactId>dotnet-assembler</artifactId>
+      <version>0.14-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.dotnet</groupId>
+      <artifactId>dotnet-executable</artifactId>
+      <version>0.14-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.dotnet</groupId>
+      <artifactId>dotnet-artifact</artifactId>
+      <version>0.14-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.dotnet</groupId>
+      <artifactId>dotnet-plugin</artifactId>
+      <version>0.14-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file

Propchange: incubator/nmaven/branches/SI_XPT/plugins/NMaven.Plugin.Settings/pom-java.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/branches/SI_XPT/plugins/NMaven.Plugin.Settings/src/main/csharp/NMaven.Plugin.Settings.csproj
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/NMaven.Plugin.Settings/src/main/csharp/NMaven.Plugin.Settings.csproj?view=auto&rev=534161
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/NMaven.Plugin.Settings/src/main/csharp/NMaven.Plugin.Settings.csproj
(added)
+++ incubator/nmaven/branches/SI_XPT/plugins/NMaven.Plugin.Settings/src/main/csharp/NMaven.Plugin.Settings.csproj
Tue May  1 10:06:57 2007
@@ -0,0 +1,31 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ProjectGuid>{34c7738a-d98c-4cf8-bb48-9b41fee3774e}</ProjectGuid>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <RootNameSpace>NMaven.Plugin</RootNameSpace>
+    <AssemblyName>NMaven.Plugin.Settings</AssemblyName>
+    <BaseIntermediateOutputPath>..\..\..\target\obj\</BaseIntermediateOutputPath>
+    <OutputType>Exe</OutputType>
+  </PropertyGroup>
+  <PropertyGroup>
+    <OutputPath>..\..\..\target\bin\Debug\</OutputPath>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="NMaven.Plugin" />
+    <Reference Include="NUnit.Framework" />
+    <Reference Include="System" />
+    <Reference Include="System.Runtime.Serialization" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="Plugin" />
+    <Folder Include="Plugin\Settings" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Plugin\Settings\ExecutionException.cs" />
+    <Compile Include="Plugin\Settings\nmavenSettings.cs" />
+    <Compile Include="Plugin\Settings\SettingsGenerator.cs" />
+  </ItemGroup>
+  <ItemGroup />
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
+</Project>
\ No newline at end of file

Modified: incubator/nmaven/branches/SI_XPT/plugins/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/pom.xml?view=diff&rev=534161&r1=534160&r2=534161
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/pom.xml (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/pom.xml Tue May  1 10:06:57 2007
@@ -31,7 +31,6 @@
     <module>maven-resgen-plugin</module>
     <module>maven-resolver-plugin</module>
     <module>maven-settings-plugin</module>
-    <module>maven-solution-plugin</module>
     <module>maven-test-plugin</module>
     <module>maven-webapp-plugin</module>
     <module>maven-xsd-plugin</module>



Mime
View raw message