incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r533293 - in /incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/maven/ src/main/java/org/apache/maven/dotnet/ src/mai...
Date Sat, 28 Apr 2007 05:13:51 GMT
Author: sisbell
Date: Fri Apr 27 22:13:50 2007
New Revision: 533293

URL: http://svn.apache.org/viewvc?view=rev&rev=533293
Log:
Initial import of mojo generator plugin.

Added:
    incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/
    incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/pom.xml   (with props)
    incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/src/
    incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/src/main/
    incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/src/main/java/
    incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/src/main/java/org/
    incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/src/main/java/org/apache/
    incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/src/main/java/org/apache/maven/
    incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/src/main/java/org/apache/maven/dotnet/
    incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/src/main/java/org/apache/maven/dotnet/plugin/
    incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/src/main/java/org/apache/maven/dotnet/plugin/generator/
    incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/src/main/java/org/apache/maven/dotnet/plugin/generator/MojoGeneratorMojo.java
  (with props)

Added: incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/pom.xml?view=auto&rev=533293
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/pom.xml (added)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/pom.xml Fri Apr 27
22:13:50 2007
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?><!--
+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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.apache.maven.dotnet.plugins</groupId>
+    <version>0.14-SNAPSHOT</version>
+    <artifactId>maven-dotnet-plugins</artifactId>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.dotnet.plugins</groupId>
+  <artifactId>maven-mojo-generator-plugin</artifactId>
+  <packaging>maven-plugin</packaging>
+  <version>0.14-SNAPSHOT</version>
+  <name>maven-mojo-generator-plugin</name>
+  <description>
+    Maven Plugin for .NET
+  </description>
+</project>
\ No newline at end of file

Propchange: incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/src/main/java/org/apache/maven/dotnet/plugin/generator/MojoGeneratorMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/src/main/java/org/apache/maven/dotnet/plugin/generator/MojoGeneratorMojo.java?view=auto&rev=533293
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/src/main/java/org/apache/maven/dotnet/plugin/generator/MojoGeneratorMojo.java
(added)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/src/main/java/org/apache/maven/dotnet/plugin/generator/MojoGeneratorMojo.java
Fri Apr 27 22:13:50 2007
@@ -0,0 +1,116 @@
+/*
+ * 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.plugin.generator;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.project.MavenProject;
+
+import java.io.File;
+import java.util.List;
+import java.util.ArrayList;
+
+import org.apache.maven.dotnet.PlatformUnsupportedException;
+import org.apache.maven.dotnet.executable.ExecutionException;
+import org.apache.maven.dotnet.vendor.VendorFactory;
+import org.apache.maven.dotnet.vendor.VendorInfo;
+import org.apache.maven.artifact.Artifact;
+
+/**
+ * @author Shane Isbell
+ * @goal generate-bindings
+ * @phase deploy
+ */
+public class MojoGeneratorMojo
+    extends AbstractMojo
+{
+
+    /**
+     * @parameter expression="${settings.localRepository}"
+     */
+    private String localRepository;
+
+    /**
+     * The maven project.
+     *
+     * @parameter expression="${project}"
+     * @required
+     */
+    private MavenProject project;
+
+    /**
+     * The Vendor for the executable. Supports MONO and MICROSOFT: the default value is <code>MICROSOFT</code>.
Not
+     * case or white-space sensitive.
+     *
+     * @parameter expression="${vendor}"
+     */
+    private String vendor;
+
+    /**
+     * @parameter expression = "${vendorVersion}"
+     */
+    private String vendorVersion;
+
+    /**
+     * @parameter expression = "${frameworkVersion}"
+     */
+    private String frameworkVersion;
+
+    /**
+     * @component
+     */
+    private org.apache.maven.dotnet.executable.NetExecutableFactory netExecutableFactory;
+
+    /**
+     * @component
+     */
+    private org.apache.maven.dotnet.NMavenRepositoryRegistry nmavenRegistry;
+
+    public void execute()
+        throws MojoExecutionException
+    {
+        if ( System.getProperty( "bootstrap" ) != null )
+        {
+            return;
+        }
+
+        try
+        {
+            List<String> commands = new ArrayList<String>();
+            VendorInfo vendorInfo = VendorInfo.Factory.createDefaultVendorInfo();
+            if ( vendor != null )
+            {
+                vendorInfo.setVendor( VendorFactory.createVendorFromName( vendor ) );
+            }
+            vendorInfo.setFrameworkVersion( frameworkVersion );
+            vendorInfo.setVendorVersion( vendorVersion );
+            netExecutableFactory.getNetExecutableFromRepository( "NMaven.Plugin", "NMaven.Plugin.MojoGenerator",
+                                                                 vendorInfo, project, localRepository,
commands,
+                                                                 true ).execute();
+        }
+        catch ( PlatformUnsupportedException e )
+        {
+            throw new MojoExecutionException( "", e );
+        }
+        catch ( ExecutionException e )
+        {
+            throw new MojoExecutionException( "", e );
+        }
+    }
+}

Propchange: incubator/nmaven/branches/SI_XPT/plugins/maven-mojo-generator-plugin/src/main/java/org/apache/maven/dotnet/plugin/generator/MojoGeneratorMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message