You are viewing a plain text version of this content. The canonical link for it is here.
Posted to nmaven-commits@incubator.apache.org by si...@apache.org on 2007/04/23 23:37:56 UTC
svn commit: r531658 - in /incubator/nmaven/branches/SI_XPT/plugins: ./
maven-compile-plugin/
maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/
maven-compile-plugin/src/main/resources/META-INF/plexus/
maven-install-plugin/ maven...
Author: sisbell
Date: Mon Apr 23 16:37:54 2007
New Revision: 531658
URL: http://svn.apache.org/viewvc?view=rev&rev=531658
Log:
Documentation updates and support for .NET plugins.
Modified:
incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/pom.xml
incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/CompilerMojo.java
incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/resources/META-INF/plexus/components.xml
incubator/nmaven/branches/SI_XPT/plugins/maven-install-plugin/pom.xml
incubator/nmaven/branches/SI_XPT/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java
incubator/nmaven/branches/SI_XPT/plugins/maven-link-plugin/pom.xml
incubator/nmaven/branches/SI_XPT/plugins/maven-resgen-plugin/pom.xml
incubator/nmaven/branches/SI_XPT/plugins/maven-resolver-plugin/pom.xml
incubator/nmaven/branches/SI_XPT/plugins/maven-settings-plugin/pom.xml
incubator/nmaven/branches/SI_XPT/plugins/maven-solution-plugin/pom.xml
incubator/nmaven/branches/SI_XPT/plugins/maven-solution-plugin/src/main/java/org/apache/maven/dotnet/plugin/solution/SolutionMojo.java
incubator/nmaven/branches/SI_XPT/plugins/maven-test-plugin/pom.xml
incubator/nmaven/branches/SI_XPT/plugins/maven-vstudio-plugin/pom.xml
incubator/nmaven/branches/SI_XPT/plugins/maven-wsdl-plugin/pom.xml
incubator/nmaven/branches/SI_XPT/plugins/maven-xsd-plugin/pom.xml
incubator/nmaven/branches/SI_XPT/plugins/maven-xsp-plugin/pom.xml
incubator/nmaven/branches/SI_XPT/plugins/pom-release.xml
incubator/nmaven/branches/SI_XPT/plugins/pom.xml
Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/pom.xml?view=diff&rev=531658&r1=531657&r2=531658
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/pom.xml (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/pom.xml Mon Apr 23 16:37:54 2007
@@ -1,3 +1,21 @@
+<?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>
@@ -12,9 +30,8 @@
<version>0.14-SNAPSHOT</version>
<name>maven-compile-plugin</name>
<description>
- Maven Plugin for .NET
+ Maven Plugin for .NET: Handles source and test compiles
</description>
-
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
@@ -23,7 +40,7 @@
</dependency>
</dependencies>
<build>
- <plugins>
+ <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
@@ -32,15 +49,13 @@
<target>1.5</target>
</configuration>
</plugin>
- </plugins>
-
+ </plugins>
</build>
-
<distributionManagement>
<site>
<id>nmaven-apache-site</id>
<name>NMaven Site</name>
<url>file://${basedir}/../../../www/plugins/maven-compile-plugin</url>
</site>
- </distributionManagement>
+ </distributionManagement>
</project>
Modified: incubator/nmaven/branches/SI_XPT/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_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/CompilerMojo.java?view=diff&rev=531658&r1=531657&r2=531658
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/CompilerMojo.java (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/CompilerMojo.java Mon Apr 23 16:37:54 2007
@@ -20,7 +20,6 @@
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.logging.Log;
import org.apache.maven.project.MavenProject;
import org.apache.maven.dotnet.PlatformUnsupportedException;
@@ -189,7 +188,7 @@
compilerConfig.setCommands( parameters );
}
String artifactTypeName = project.getArtifact().getType();
- ArtifactType artifactType = ArtifactType.getArtifactTypeForName( artifactTypeName );
+ ArtifactType artifactType = ArtifactType.getArtifactTypeForPackagingName( artifactTypeName );
if ( artifactType.equals( ArtifactType.NULL ) )
{
throw new MojoExecutionException( "NMAVEN-900-001: Unrecognized artifact type: Language = " + language +
Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/resources/META-INF/plexus/components.xml?view=diff&rev=531658&r1=531657&r2=531658
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/resources/META-INF/plexus/components.xml (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/resources/META-INF/plexus/components.xml Mon Apr 23 16:37:54 2007
@@ -83,7 +83,6 @@
<component>
<role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
<role-hint>library</role-hint>
-
<implementation>
org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
</implementation>
@@ -122,7 +121,44 @@
<component>
<role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
<role-hint>exe</role-hint>
-
+ <implementation>
+ org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
+ </implementation>
+ <configuration>
+ <phases>
+ <validate>
+ org.apache.maven.dotnet.plugins:maven-compile-plugin:initialize,
+ org.apache.maven.dotnet.plugins:maven-resolver-plugin:resolve,
+ org.apache.maven.dotnet.plugins:maven-settings-plugin:generate-settings
+ </validate>
+ <generate-sources>
+ org.apache.maven.dotnet.plugins:maven-compile-plugin:generate-assembly-info
+ </generate-sources>
+ <process-sources>
+ org.apache.maven.dotnet.plugins:maven-compile-plugin:process-sources,
+ org.apache.maven.dotnet.plugins:maven-compile-plugin:process-test-sources
+ </process-sources>
+ <process-resources>
+ org.apache.maven.dotnet.plugins:maven-resgen-plugin:copy-resources,
+ org.apache.maven.dotnet.plugins:maven-resgen-plugin:generate,
+ </process-resources>
+ <compile>
+ org.apache.maven.dotnet.plugins:maven-compile-plugin:compile,
+ org.apache.maven.dotnet.plugins:maven-compile-plugin:testCompile
+ </compile>
+ <process-classes>
+ org.apache.maven.dotnet.plugins:maven-install-plugin:target-install
+ </process-classes>
+ <test>org.apache.maven.dotnet.plugins:maven-test-plugin:test</test>
+ <install>
+ org.apache.maven.dotnet.plugins:maven-install-plugin:install,
+ </install>
+ </phases>
+ </configuration>
+ </component>
+ <component>
+ <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
+ <role-hint>netplugin</role-hint>
<implementation>
org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
</implementation>
@@ -239,6 +275,15 @@
</configuration>
</component>
<component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>netplugin</role-hint>
+ <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+ <configuration>
+ <extension>dll</extension>
+ <type>netplugin</type>
+ </configuration>
+ </component>
+ <component>
<role>org.apache.maven.dotnet.executable.CapabilityMatcher</role>
<implementation>org.apache.maven.dotnet.executable.impl.CapabilityMatcherImpl</implementation>
<requirements>
@@ -268,5 +313,14 @@
</requirement>
</requirements>
</component>
+ <component>
+ <role>org.apache.maven.dotnet.plugin.DotNetMojo</role>
+ <implementation>org.apache.maven.dotnet.plugin.AbstractMojo</implementation>
+ <requirements>
+ <requirement>
+ <role>org.apache.maven.dotnet.executable.NetExecutableFactory</role>
+ </requirement>
+ </requirements>
+ </component>
</components>
</component-set>
Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-install-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-install-plugin/pom.xml?view=diff&rev=531658&r1=531657&r2=531658
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-install-plugin/pom.xml (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-install-plugin/pom.xml Mon Apr 23 16:37:54 2007
@@ -1,3 +1,21 @@
+<?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>
@@ -12,7 +30,7 @@
<version>0.14-SNAPSHOT</version>
<name>maven-install-plugin</name>
<description>
- Maven Plugin for .NET
+ Maven Plugin for .NET: Installs compiled artifacts into the local repository.
</description>
<dependencies>
<dependency>
Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java?view=diff&rev=531658&r1=531657&r2=531658
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java Mon Apr 23 16:37:54 2007
@@ -75,9 +75,9 @@
{
long startTime = System.currentTimeMillis();
- if(localRepository == null)
+ if ( localRepository == null )
{
- localRepository = new File(System.getProperty("user.home"), ".m2/repository");
+ localRepository = new File( System.getProperty( "user.home" ), ".m2/repository" );
}
Artifact artifact = project.getArtifact();
@@ -91,7 +91,8 @@
}
//To allow executables to be runnable from the repo
- if ( artifact.getType().equals( ArtifactType.EXE.getArtifactTypeName() ) )
+ if ( artifact.getType().equals( ArtifactType.EXE.getPackagingType() ) ||
+ artifact.getType().equals( ArtifactType.NETPLUGIN.getPackagingType() ) )
{
List<Dependency> dependencies = project.getDependencies();
try
@@ -104,8 +105,8 @@
}
}
long endTime = System.currentTimeMillis();
- getLog().info( "Mojo Execution Time = " + (endTime - startTime));
- getLog().info( "Total Time = " + (endTime - ComponentInitializerMojo.sT));
+ getLog().info( "Mojo Execution Time = " + ( endTime - startTime ) );
+ getLog().info( "Total Time = " + ( endTime - ComponentInitializerMojo.sT ) );
//For the IDE: If we see a dll with same name as netmodule, copy dll to the local repo.
/*
File linkedFile =
Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-link-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-link-plugin/pom.xml?view=diff&rev=531658&r1=531657&r2=531658
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-link-plugin/pom.xml (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-link-plugin/pom.xml Mon Apr 23 16:37:54 2007
@@ -1,3 +1,21 @@
+<?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>
@@ -12,7 +30,7 @@
<version>0.14-SNAPSHOT</version>
<name>maven-link-plugin</name>
<description>
- Maven Plugin for .NET
+ Maven Plugin for .NET: Uses AssemblyLinker utility for linking, embedding and adding resources to an assembly.
</description>
<distributionManagement>
<site>
Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-resgen-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-resgen-plugin/pom.xml?view=diff&rev=531658&r1=531657&r2=531658
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-resgen-plugin/pom.xml (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-resgen-plugin/pom.xml Mon Apr 23 16:37:54 2007
@@ -1,3 +1,21 @@
+<?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>
@@ -12,7 +30,7 @@
<version>0.14-SNAPSHOT</version>
<name>maven-resgen-plugin</name>
<description>
- Maven Plugin for .NET
+ Maven Plugin for .NET: Generates assembly resources
</description>
<build>
<plugins>
Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-resolver-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-resolver-plugin/pom.xml?view=diff&rev=531658&r1=531657&r2=531658
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-resolver-plugin/pom.xml (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-resolver-plugin/pom.xml Mon Apr 23 16:37:54 2007
@@ -1,3 +1,21 @@
+<?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>
Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-settings-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-settings-plugin/pom.xml?view=diff&rev=531658&r1=531657&r2=531658
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-settings-plugin/pom.xml (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-settings-plugin/pom.xml Mon Apr 23 16:37:54 2007
@@ -1,3 +1,21 @@
+<?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>
Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-solution-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-solution-plugin/pom.xml?view=diff&rev=531658&r1=531657&r2=531658
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-solution-plugin/pom.xml (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-solution-plugin/pom.xml Mon Apr 23 16:37:54 2007
@@ -1,3 +1,21 @@
+<?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>
Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-solution-plugin/src/main/java/org/apache/maven/dotnet/plugin/solution/SolutionMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-solution-plugin/src/main/java/org/apache/maven/dotnet/plugin/solution/SolutionMojo.java?view=diff&rev=531658&r1=531657&r2=531658
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-solution-plugin/src/main/java/org/apache/maven/dotnet/plugin/solution/SolutionMojo.java (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-solution-plugin/src/main/java/org/apache/maven/dotnet/plugin/solution/SolutionMojo.java Mon Apr 23 16:37:54 2007
@@ -1,16 +1,36 @@
package org.apache.maven.dotnet.plugin.solution;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.dotnet.plugin.AbstractMojo;
+import org.apache.maven.dotnet.executable.NetExecutableFactory;
+import org.apache.maven.dotnet.executable.ExecutionException;
import org.apache.maven.dotnet.vendor.VendorInfo;
import org.apache.maven.dotnet.vendor.VendorFactory;
import org.apache.maven.dotnet.PlatformUnsupportedException;
-import org.apache.maven.dotnet.executable.ExecutionException;
import org.apache.maven.project.MavenProject;
-
-import java.util.List;
-import java.util.ArrayList;
+import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
+import org.apache.maven.model.Model;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.w3c.dom.Node;
+import org.w3c.dom.Element;
+import org.w3c.dom.Document;
+import org.codehaus.plexus.util.IOUtil;
+
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.Source;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.FileWriter;
import java.io.File;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.io.FileOutputStream;
/**
* Generates resources
@@ -19,7 +39,8 @@
* @goal solution
* @phase package
*/
-public class SolutionMojo extends AbstractMojo
+public class SolutionMojo
+ extends AbstractMojo
{
/**
* @parameter expression="${settings.localRepository}"
@@ -58,30 +79,69 @@
*/
private org.apache.maven.dotnet.executable.NetExecutableFactory netExecutableFactory;
- public void execute() throws MojoExecutionException
+ public String getLocalRepository()
+ {
+ return localRepository;
+ }
+
+ public MavenProject getMavenProject()
+ {
+ return project;
+ }
+
+ public DOMSource getDOMSourceFor( Document document )
+ {
+ Element root = document.createElement( "configuration" );
+ document.appendChild( root );
+ Node n1 = document.createElement( "localRepository" );
+ n1.setTextContent( localRepository );
+ root.appendChild( n1 );
+ File mavenProjectFile = writeMavenProjectToTempFile(project);
+ Node mavenProjectFileNode = document.createElement( "mavenProject");
+ mavenProjectFileNode.setTextContent( mavenProjectFile.getAbsolutePath());
+ root.appendChild(mavenProjectFileNode);
+ return new DOMSource( document );
+ }
+
+ public File writeMavenProjectToTempFile(MavenProject project)
+ {
+ String p = ToString( project );
+ try
+ {
+ File tempFile = File.createTempFile( "MavenProject", ".xml");
+ FileOutputStream fos = new FileOutputStream(tempFile );
+ fos.write( p.getBytes() );
+ fos.close();
+ return tempFile;
+ }
+ catch ( IOException e )
+ {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ private String ToString( MavenProject mavenProject )
{
- String profile = System.getProperty( "pomProfile");
- String pomFile = System.getProperty( "pomFile");
-
- String basedir = System.getProperty( "user.dir");
- //String basedir1 = "C:\\Documents and Settings\\shane\\nmaven-apache\\SI_IDE\\assemblies";
- List<String> commands = new ArrayList<String>();
- commands.add("pomFile=" + new File(basedir).getAbsolutePath() + File.separator + "pom.xml");
- if(profile != null) commands.add("pomProfile=" + profile);
+ StringWriter stringWriter = new StringWriter();
try
{
- VendorInfo vendorInfo = VendorInfo.Factory.createDefaultVendorInfo();
- vendorInfo.setVendor( VendorFactory.createVendorFromName( "MICROSOFT" ) );
- netExecutableFactory.getNetExecutableFromRepository( "NMaven.Plugin", "NMaven.Plugin.Solution", vendorInfo,
- project, localRepository, commands ).execute();
+ new MavenXpp3Writer().write( stringWriter, project.getModel() );
}
- catch ( PlatformUnsupportedException e )
+ catch ( IOException e )
{
- throw new MojoExecutionException( "", e );
+ e.printStackTrace();
}
- catch ( ExecutionException e )
+ finally
{
- throw new MojoExecutionException( "", e );
+ IOUtil.close( stringWriter );
}
+ return stringWriter.getBuffer().toString().replaceFirst( "<project>",
+ "<project xmlns=\"http://maven.apache.org/POM/4.0.0\">" );
+ }
+
+ public NetExecutableFactory getNetExecutableFactory()
+ {
+ return netExecutableFactory;
}
}
Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-test-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-test-plugin/pom.xml?view=diff&rev=531658&r1=531657&r2=531658
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-test-plugin/pom.xml (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-test-plugin/pom.xml Mon Apr 23 16:37:54 2007
@@ -1,18 +1,37 @@
-<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>
+<?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>
- <artifactId>maven-test-plugin</artifactId>
- <packaging>maven-plugin</packaging>
<version>0.14-SNAPSHOT</version>
- <name>maven-test-plugin</name>
- <description>
- Maven Plugin for .NET
- </description>
+ <artifactId>maven-dotnet-plugins</artifactId>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven.dotnet.plugins</groupId>
+ <artifactId>maven-test-plugin</artifactId>
+ <packaging>maven-plugin</packaging>
+ <version>0.14-SNAPSHOT</version>
+ <name>maven-test-plugin</name>
+ <description>
+ Maven Plugin for .NET
+ </description>
<distributionManagement>
<site>
<id>nmaven-apache-site</id>
Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-vstudio-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-vstudio-plugin/pom.xml?view=diff&rev=531658&r1=531657&r2=531658
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-vstudio-plugin/pom.xml (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-vstudio-plugin/pom.xml Mon Apr 23 16:37:54 2007
@@ -1,4 +1,21 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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>
<parent>
<groupId>org.apache.maven.dotnet.plugins</groupId>
Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-wsdl-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-wsdl-plugin/pom.xml?view=diff&rev=531658&r1=531657&r2=531658
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-wsdl-plugin/pom.xml (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-wsdl-plugin/pom.xml Mon Apr 23 16:37:54 2007
@@ -1,3 +1,21 @@
+<?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>
@@ -14,7 +32,6 @@
<description>
Maven Plugin for .NET
</description>
-
<distributionManagement>
<site>
<id>nmaven-apache-site</id>
Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-xsd-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-xsd-plugin/pom.xml?view=diff&rev=531658&r1=531657&r2=531658
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-xsd-plugin/pom.xml (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-xsd-plugin/pom.xml Mon Apr 23 16:37:54 2007
@@ -1,3 +1,21 @@
+<?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>
Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-xsp-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-xsp-plugin/pom.xml?view=diff&rev=531658&r1=531657&r2=531658
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-xsp-plugin/pom.xml (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-xsp-plugin/pom.xml Mon Apr 23 16:37:54 2007
@@ -1,3 +1,21 @@
+<?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>
Modified: incubator/nmaven/branches/SI_XPT/plugins/pom-release.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/pom-release.xml?view=diff&rev=531658&r1=531657&r2=531658
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/pom-release.xml (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/pom-release.xml Mon Apr 23 16:37:54 2007
@@ -1,3 +1,21 @@
+<?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">
<modelVersion>4.0.0</modelVersion>
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=531658&r1=531657&r2=531658
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/pom.xml (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/pom.xml Mon Apr 23 16:37:54 2007
@@ -1,3 +1,21 @@
+<?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">
<modelVersion>4.0.0</modelVersion>
@@ -34,6 +52,11 @@
<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>