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 2006/12/31 21:25:58 UTC
svn commit: r491492 - in /incubator/nmaven/trunk: ./
components/dotnet-core/src/main/resources/META-INF/nmaven/
components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/
plugins/ plugins/maven-xsp-plugin/ plugins/maven-xsp-plu...
Author: sisbell
Date: Sun Dec 31 13:25:57 2006
New Revision: 491492
URL: http://svn.apache.org/viewvc?view=rev&rev=491492
Log:
Support for starting and stopping Mono XSP server.
Added:
incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/ThreadedNetExecutable.java (with props)
incubator/nmaven/trunk/plugins/maven-xsp-plugin/
incubator/nmaven/trunk/plugins/maven-xsp-plugin/pom.xml (with props)
incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/
incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/
incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/java/
incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/java/org/
incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/java/org/apache/
incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/java/org/apache/maven/
incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/java/org/apache/maven/dotnet/
incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/java/org/apache/maven/dotnet/plugin/
incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/java/org/apache/maven/dotnet/plugin/xsp/
incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/java/org/apache/maven/dotnet/plugin/xsp/XspStarterMojo.java (with props)
incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/java/org/apache/maven/dotnet/plugin/xsp/XspStopperMojo.java (with props)
Modified:
incubator/nmaven/trunk/components/dotnet-core/src/main/resources/META-INF/nmaven/executable-plugins.xml
incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/NetExecutableFactoryImpl.java
incubator/nmaven/trunk/maven-dotnet.iml
incubator/nmaven/trunk/plugins/pom.xml
Modified: incubator/nmaven/trunk/components/dotnet-core/src/main/resources/META-INF/nmaven/executable-plugins.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-core/src/main/resources/META-INF/nmaven/executable-plugins.xml?view=diff&rev=491492&r1=491491&r2=491492
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-core/src/main/resources/META-INF/nmaven/executable-plugins.xml (original)
+++ incubator/nmaven/trunk/components/dotnet-core/src/main/resources/META-INF/nmaven/executable-plugins.xml Sun Dec 31 13:25:57 2006
@@ -1,173 +1,201 @@
<executablePlugins>
- <executablePlugin>
- <identifier>MONO:XSD</identifier>
- <pluginClass>org.apache.maven.dotnet.executable.impl.DefaultNetExecutable</pluginClass>
- <vendor>MONO</vendor>
- <executable>xsd</executable>
- <profile>XSD:SCHEMA</profile>
- <frameworkVersions>
- <frameworkVersion>2.0.50727</frameworkVersion>
- <frameworkVersion>1.1.4322</frameworkVersion>
- </frameworkVersions>
- <platforms>
- <platform>
- <operatingSystem>Windows</operatingSystem>
- </platform>
- <platform>
- <operatingSystem>Mac OS X</operatingSystem>
- </platform>
- <platform>
- <operatingSystem>Linux</operatingSystem>
- </platform>
- <platform>
- <operatingSystem>Solaris</operatingSystem>
- </platform>
- <platform>
- <operatingSystem>FreeBSD</operatingSystem>
- </platform>
- </platforms>
- <commandFilter>
- <includes>
- <include>classes</include>
- <include>dataset</include>
- <include>element</include>
- <include>namespace</include>
- <include>language</include>
- <include>generator</include>
- <include>o</include>
- <include>type</include>
- <include>uri</include>
- </includes>
- </commandFilter>
- </executablePlugin>
- <executablePlugin>
- <identifier>MONO:XSD:XML_INSTANCE</identifier>
- <pluginClass>org.apache.maven.dotnet.executable.impl.DefaultNetExecutable</pluginClass>
- <vendor>MONO</vendor>
- <executable>xsd</executable>
- <profile>XSD:XML_INSTANCE</profile>
- <frameworkVersions>
- <frameworkVersion>2.0.50727</frameworkVersion>
- <frameworkVersion>1.1.4322</frameworkVersion>
- </frameworkVersions>
- <platforms>
- <platform>
- <operatingSystem>Windows</operatingSystem>
- </platform>
- <platform>
- <operatingSystem>Mac OS X</operatingSystem>
- </platform>
- <platform>
- <operatingSystem>Linux</operatingSystem>
- </platform>
- <platform>
- <operatingSystem>Solaris</operatingSystem>
- </platform>
- <platform>
- <operatingSystem>FreeBSD</operatingSystem>
- </platform>
- </platforms>
- <commandFilter>
- <includes>
- <include>o</include>
- </includes>
- </commandFilter>
- </executablePlugin>
- <executablePlugin>
- <identifier>MS:XSD:XML_INSTANCE</identifier>
- <pluginClass>org.apache.maven.dotnet.executable.impl.DefaultNetExecutable</pluginClass>
- <vendor>MICROSOFT</vendor>
- <executable>xsd</executable>
- <profile>XSD:XML_INSTANCE</profile>
- <frameworkVersions>
- <frameworkVersion>2.0.50727</frameworkVersion>
- <frameworkVersion>1.1.4322</frameworkVersion>
- </frameworkVersions>
- <platforms>
- <platform>
- <operatingSystem>Windows</operatingSystem>
- </platform>
- </platforms>
- <commandFilter>
- <includes>
- <include>o</include>
- </includes>
- </commandFilter>
- </executablePlugin>
- <executablePlugin>
- <identifier>MS:XSD:SCHEMA</identifier>
- <pluginClass>org.apache.maven.dotnet.executable.impl.DefaultNetExecutable</pluginClass>
- <vendor>MICROSOFT</vendor>
- <executable>xsd</executable>
- <profile>XSD:SCHEMA</profile>
- <frameworkVersions>
- <frameworkVersion>2.0.50727</frameworkVersion>
- <frameworkVersion>1.1.4322</frameworkVersion>
- </frameworkVersions>
- <platforms>
- <platform>
- <operatingSystem>Windows</operatingSystem>
- </platform>
- </platforms>
- <commandFilter>
- <includes>
- <include>classes</include>
- <include>dataset</include>
- <include>element</include>
- <include>fields</include>
- <include>enableDataBinding</include>
- <include>namespace</include>
- <include>language</include>
- <include>out</include>
- <include>o</include>
- <include>type</include>
- <include>uri</include>
- <include>parameters</include>
- </includes>
- </commandFilter>
- </executablePlugin>
- <executablePlugin>
- <identifier>MS:RESGEN</identifier>
- <pluginClass>org.apache.maven.dotnet.executable.impl.DefaultNetExecutable</pluginClass>
- <vendor>MICROSOFT</vendor>
- <executable>resgen</executable>
- <profile>RESGEN</profile>
- <frameworkVersions>
- <frameworkVersion>2.0.50727</frameworkVersion>
- <frameworkVersion>1.1.4322</frameworkVersion>
- </frameworkVersions>
- <platforms>
- <platform>
- <operatingSystem>Windows</operatingSystem>
- </platform>
- </platforms>
- </executablePlugin>
- <executablePlugin>
- <identifier>MONO:RESGEN</identifier>
- <pluginClass>org.apache.maven.dotnet.executable.impl.DefaultNetExecutable</pluginClass>
- <vendor>MONO</vendor>
- <executable>resgen</executable>
- <profile>RESGEN</profile>
- <frameworkVersions>
- <frameworkVersion>2.0.50727</frameworkVersion>
- <frameworkVersion>1.1.4322</frameworkVersion>
- </frameworkVersions>
- <platforms>
- <platform>
- <operatingSystem>Windows</operatingSystem>
- </platform>
- <platform>
- <operatingSystem>Mac OS X</operatingSystem>
- </platform>
- <platform>
- <operatingSystem>Linux</operatingSystem>
- </platform>
- <platform>
- <operatingSystem>Solaris</operatingSystem>
- </platform>
- <platform>
- <operatingSystem>FreeBSD</operatingSystem>
- </platform>
- </platforms>
- </executablePlugin>
+ <executablePlugin>
+ <identifier>MONO:XSP</identifier>
+ <pluginClass>org.apache.maven.dotnet.executable.impl.ThreadedNetExecutable</pluginClass>
+ <vendor>MONO</vendor>
+ <executable>startXSP</executable>
+ <profile>XSP:START</profile>
+ <frameworkVersions>
+ <frameworkVersion>2.0.50727</frameworkVersion>
+ <frameworkVersion>1.1.4322</frameworkVersion>
+ </frameworkVersions>
+ <platforms>
+ <platform>
+ <operatingSystem>Windows</operatingSystem>
+ </platform>
+ <platform>
+ <operatingSystem>Mac OS X</operatingSystem>
+ </platform>
+ <platform>
+ <operatingSystem>Linux</operatingSystem>
+ </platform>
+ <platform>
+ <operatingSystem>Solaris</operatingSystem>
+ </platform>
+ <platform>
+ <operatingSystem>FreeBSD</operatingSystem>
+ </platform>
+ </platforms>
+ </executablePlugin>
+ <executablePlugin>
+ <identifier>MONO:XSD</identifier>
+ <pluginClass>org.apache.maven.dotnet.executable.impl.DefaultNetExecutable</pluginClass>
+ <vendor>MONO</vendor>
+ <executable>xsd</executable>
+ <profile>XSD:SCHEMA</profile>
+ <frameworkVersions>
+ <frameworkVersion>2.0.50727</frameworkVersion>
+ <frameworkVersion>1.1.4322</frameworkVersion>
+ </frameworkVersions>
+ <platforms>
+ <platform>
+ <operatingSystem>Windows</operatingSystem>
+ </platform>
+ <platform>
+ <operatingSystem>Mac OS X</operatingSystem>
+ </platform>
+ <platform>
+ <operatingSystem>Linux</operatingSystem>
+ </platform>
+ <platform>
+ <operatingSystem>Solaris</operatingSystem>
+ </platform>
+ <platform>
+ <operatingSystem>FreeBSD</operatingSystem>
+ </platform>
+ </platforms>
+ <commandFilter>
+ <includes>
+ <include>classes</include>
+ <include>dataset</include>
+ <include>element</include>
+ <include>namespace</include>
+ <include>language</include>
+ <include>generator</include>
+ <include>o</include>
+ <include>type</include>
+ <include>uri</include>
+ </includes>
+ </commandFilter>
+ </executablePlugin>
+ <executablePlugin>
+ <identifier>MONO:XSD:XML_INSTANCE</identifier>
+ <pluginClass>org.apache.maven.dotnet.executable.impl.DefaultNetExecutable</pluginClass>
+ <vendor>MONO</vendor>
+ <executable>xsd</executable>
+ <profile>XSD:XML_INSTANCE</profile>
+ <frameworkVersions>
+ <frameworkVersion>2.0.50727</frameworkVersion>
+ <frameworkVersion>1.1.4322</frameworkVersion>
+ </frameworkVersions>
+ <platforms>
+ <platform>
+ <operatingSystem>Windows</operatingSystem>
+ </platform>
+ <platform>
+ <operatingSystem>Mac OS X</operatingSystem>
+ </platform>
+ <platform>
+ <operatingSystem>Linux</operatingSystem>
+ </platform>
+ <platform>
+ <operatingSystem>Solaris</operatingSystem>
+ </platform>
+ <platform>
+ <operatingSystem>FreeBSD</operatingSystem>
+ </platform>
+ </platforms>
+ <commandFilter>
+ <includes>
+ <include>o</include>
+ </includes>
+ </commandFilter>
+ </executablePlugin>
+ <executablePlugin>
+ <identifier>MS:XSD:XML_INSTANCE</identifier>
+ <pluginClass>org.apache.maven.dotnet.executable.impl.DefaultNetExecutable</pluginClass>
+ <vendor>MICROSOFT</vendor>
+ <executable>xsd</executable>
+ <profile>XSD:XML_INSTANCE</profile>
+ <frameworkVersions>
+ <frameworkVersion>2.0.50727</frameworkVersion>
+ <frameworkVersion>1.1.4322</frameworkVersion>
+ </frameworkVersions>
+ <platforms>
+ <platform>
+ <operatingSystem>Windows</operatingSystem>
+ </platform>
+ </platforms>
+ <commandFilter>
+ <includes>
+ <include>o</include>
+ </includes>
+ </commandFilter>
+ </executablePlugin>
+ <executablePlugin>
+ <identifier>MS:XSD:SCHEMA</identifier>
+ <pluginClass>org.apache.maven.dotnet.executable.impl.DefaultNetExecutable</pluginClass>
+ <vendor>MICROSOFT</vendor>
+ <executable>xsd</executable>
+ <profile>XSD:SCHEMA</profile>
+ <frameworkVersions>
+ <frameworkVersion>2.0.50727</frameworkVersion>
+ <frameworkVersion>1.1.4322</frameworkVersion>
+ </frameworkVersions>
+ <platforms>
+ <platform>
+ <operatingSystem>Windows</operatingSystem>
+ </platform>
+ </platforms>
+ <commandFilter>
+ <includes>
+ <include>classes</include>
+ <include>dataset</include>
+ <include>element</include>
+ <include>fields</include>
+ <include>enableDataBinding</include>
+ <include>namespace</include>
+ <include>language</include>
+ <include>out</include>
+ <include>o</include>
+ <include>type</include>
+ <include>uri</include>
+ <include>parameters</include>
+ </includes>
+ </commandFilter>
+ </executablePlugin>
+ <executablePlugin>
+ <identifier>MS:RESGEN</identifier>
+ <pluginClass>org.apache.maven.dotnet.executable.impl.DefaultNetExecutable</pluginClass>
+ <vendor>MICROSOFT</vendor>
+ <executable>resgen</executable>
+ <profile>RESGEN</profile>
+ <frameworkVersions>
+ <frameworkVersion>2.0.50727</frameworkVersion>
+ <frameworkVersion>1.1.4322</frameworkVersion>
+ </frameworkVersions>
+ <platforms>
+ <platform>
+ <operatingSystem>Windows</operatingSystem>
+ </platform>
+ </platforms>
+ </executablePlugin>
+ <executablePlugin>
+ <identifier>MONO:RESGEN</identifier>
+ <pluginClass>org.apache.maven.dotnet.executable.impl.DefaultNetExecutable</pluginClass>
+ <vendor>MONO</vendor>
+ <executable>resgen</executable>
+ <profile>RESGEN</profile>
+ <frameworkVersions>
+ <frameworkVersion>2.0.50727</frameworkVersion>
+ <frameworkVersion>1.1.4322</frameworkVersion>
+ </frameworkVersions>
+ <platforms>
+ <platform>
+ <operatingSystem>Windows</operatingSystem>
+ </platform>
+ <platform>
+ <operatingSystem>Mac OS X</operatingSystem>
+ </platform>
+ <platform>
+ <operatingSystem>Linux</operatingSystem>
+ </platform>
+ <platform>
+ <operatingSystem>Solaris</operatingSystem>
+ </platform>
+ <platform>
+ <operatingSystem>FreeBSD</operatingSystem>
+ </platform>
+ </platforms>
+ </executablePlugin>
</executablePlugins>
Modified: incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/NetExecutableFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/NetExecutableFactoryImpl.java?view=diff&rev=491492&r1=491491&r2=491492
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/NetExecutableFactoryImpl.java (original)
+++ incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/NetExecutableFactoryImpl.java Sun Dec 31 13:25:57 2006
@@ -133,6 +133,8 @@
throws PlatformUnsupportedException
{
+ if(commands == null) commands = new ArrayList<String>();
+
try
{
processor.process( vendorInfo );
Added: incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/ThreadedNetExecutable.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/ThreadedNetExecutable.java?view=auto&rev=491492
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/ThreadedNetExecutable.java (added)
+++ incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/ThreadedNetExecutable.java Sun Dec 31 13:25:57 2006
@@ -0,0 +1,79 @@
+package org.apache.maven.dotnet.executable.impl;
+
+import org.apache.maven.dotnet.executable.NetExecutable;
+import org.apache.maven.dotnet.executable.ExecutableContext;
+import org.apache.maven.dotnet.executable.ExecutionException;
+import org.apache.maven.dotnet.executable.CommandFilter;
+import org.apache.maven.dotnet.executable.CommandExecutor;
+import org.apache.maven.dotnet.NMavenContext;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.logging.Logger;
+
+import java.util.List;
+import java.io.File;
+
+
+public class ThreadedNetExecutable
+ implements NetExecutable, Runnable
+{
+ private ExecutableContext executableContext;
+
+ private MavenProject project;
+
+ private Logger logger;
+
+ public void run()
+ {
+ CommandExecutor commandExecutor = CommandExecutor.Factory.createDefaultCommmandExecutor();
+ try
+ {
+ commandExecutor.setLogger( logger );
+ commandExecutor.executeCommand( getExecutable(), getCommands(), getExecutionPath(), true );
+ }
+ catch ( ExecutionException e )
+ {
+ // throw new ExecutionException( "NMAVEN-063-000: Command = " + commands, e );
+ }
+ if ( commandExecutor.getStandardOut().contains( "error" ) )
+ {
+ // t/w new ExecutionException( "NMAVEN-063-001: Command = " + commands );
+ }
+ }
+
+ public List<String> getCommands()
+ throws ExecutionException
+ {
+ CommandFilter filter = executableContext.getCommandFilter();
+ return filter.filter( executableContext.getExecutableConfig().getCommands() );
+ }
+
+ public File getExecutionPath()
+ {
+ return ( executableContext.getExecutableConfig().getExecutionPath() != null ) ? new File(
+ executableContext.getExecutableConfig().getExecutionPath() ) : null;
+ }
+
+ public void execute()
+ throws ExecutionException
+ {
+ }
+
+
+ public String getExecutable()
+ throws ExecutionException
+ {
+ if ( executableContext == null )
+ {
+ throw new ExecutionException( "NMAVEN-063-002: Executable has not been initialized with a context" );
+ }
+ return executableContext.getExecutableCapability().getExecutable();
+ }
+
+
+ public void init( NMavenContext nmavenContext )
+ {
+ this.executableContext = (ExecutableContext) nmavenContext;
+ this.project = executableContext.getMavenProject();
+ this.logger = executableContext.getLogger();
+ }
+}
Propchange: incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/ThreadedNetExecutable.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/nmaven/trunk/maven-dotnet.iml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/maven-dotnet.iml?view=diff&rev=491492&r1=491491&r2=491492
==============================================================================
--- incubator/nmaven/trunk/maven-dotnet.iml (original)
+++ incubator/nmaven/trunk/maven-dotnet.iml Sun Dec 31 13:25:57 2006
@@ -27,6 +27,7 @@
<sourceFolder url="file://$MODULE_DIR$/plugins/maven-webapp-plugin/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/plugins/maven-wsdl-plugin/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/plugins/maven-xsd-plugin/src/main/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/plugins/maven-xsp-plugin/src/main/java" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
Added: incubator/nmaven/trunk/plugins/maven-xsp-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-xsp-plugin/pom.xml?view=auto&rev=491492
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-xsp-plugin/pom.xml (added)
+++ incubator/nmaven/trunk/plugins/maven-xsp-plugin/pom.xml Sun Dec 31 13:25:57 2006
@@ -0,0 +1,16 @@
+<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-xsp-plugin</artifactId>
+ <packaging>maven-plugin</packaging>
+ <version>0.14-SNAPSHOT</version>
+ <name>maven-xsp-plugin</name>
+ <description>
+ Maven Plugin for .NET
+ </description>
+</project>
\ No newline at end of file
Propchange: incubator/nmaven/trunk/plugins/maven-xsp-plugin/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/java/org/apache/maven/dotnet/plugin/xsp/XspStarterMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/java/org/apache/maven/dotnet/plugin/xsp/XspStarterMojo.java?view=auto&rev=491492
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/java/org/apache/maven/dotnet/plugin/xsp/XspStarterMojo.java (added)
+++ incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/java/org/apache/maven/dotnet/plugin/xsp/XspStarterMojo.java Sun Dec 31 13:25:57 2006
@@ -0,0 +1,90 @@
+/*
+ * 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.xsp;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.dotnet.PlatformUnsupportedException;
+import org.apache.maven.dotnet.vendor.Vendor;
+import org.apache.maven.project.MavenProject;
+
+import java.io.File;
+import java.util.ArrayList;
+
+/**
+ * @author Shane Isbell
+ * @goal start-xsp
+ * @phase pre-integration-test
+ */
+public class XspStarterMojo
+ extends AbstractMojo
+{
+ /**
+ * The maven project.
+ *
+ * @parameter expression="${project}"
+ * @required
+ */
+ private MavenProject project;
+
+ /**
+ * The home directory of your .NET SDK.
+ *
+ * @parameter expression="${netHome}"
+ */
+ private File netHome;
+
+ /**
+ * @parameter expression = "${frameworkVersion}"
+ */
+ private String frameworkVersion;
+
+ /**
+ * The profile that the executable should use.
+ *
+ * @parameter expression = "${profile}" default-value = "XSD:SCHEMA"
+ */
+ private String profile;
+
+ /**
+ * @component
+ */
+ private org.apache.maven.dotnet.executable.NetExecutableFactory netExecutableFactory;
+
+ public void execute()
+ throws MojoExecutionException
+ {
+ try
+ {
+ Runnable executable = (Runnable) netExecutableFactory.getNetExecutableFor( Vendor.MONO.getVendorName(),
+ frameworkVersion, "XSP:START",
+ project, new ArrayList<String>(),
+ netHome );
+ Thread thread = new Thread( executable );
+ getPluginContext().put( "xspThread", thread);
+ thread.start();
+
+ }
+ catch ( PlatformUnsupportedException e )
+ {
+ throw new MojoExecutionException( "NMAVEN-1400-001: Platform Unsupported: Vendor " +
+ ", frameworkVersion = " + frameworkVersion + ", Profile = " + profile, e );
+ }
+ }
+}
Propchange: incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/java/org/apache/maven/dotnet/plugin/xsp/XspStarterMojo.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/java/org/apache/maven/dotnet/plugin/xsp/XspStopperMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/java/org/apache/maven/dotnet/plugin/xsp/XspStopperMojo.java?view=auto&rev=491492
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/java/org/apache/maven/dotnet/plugin/xsp/XspStopperMojo.java (added)
+++ incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/java/org/apache/maven/dotnet/plugin/xsp/XspStopperMojo.java Sun Dec 31 13:25:57 2006
@@ -0,0 +1,73 @@
+/*
+ * 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.xsp;
+
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.AbstractMojo;
+
+import java.io.File;
+
+/**
+ * @author Shane Isbell
+ * @goal stop-xsp
+ * @phase post-integration-test
+ */
+public class XspStopperMojo
+ extends AbstractMojo
+{
+ /**
+ * The maven project.
+ *
+ * @parameter expression="${project}"
+ * @required
+ */
+ private MavenProject project;
+
+ /**
+ * The home directory of your .NET SDK.
+ *
+ * @parameter expression="${netHome}"
+ */
+ private File netHome;
+
+ /**
+ * @parameter expression = "${frameworkVersion}"
+ */
+ private String frameworkVersion;
+
+ /**
+ * The profile that the executable should use.
+ *
+ * @parameter expression = "${profile}" default-value = "XSD:SCHEMA"
+ */
+ private String profile;
+
+ /**
+ * @component
+ */
+ private org.apache.maven.dotnet.executable.NetExecutableFactory netExecutableFactory;
+
+ public void execute()
+ throws MojoExecutionException
+ {
+ Thread thread = (Thread) getPluginContext().get( "xspThread");
+ thread.stop();
+ }
+}
Propchange: incubator/nmaven/trunk/plugins/maven-xsp-plugin/src/main/java/org/apache/maven/dotnet/plugin/xsp/XspStopperMojo.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/nmaven/trunk/plugins/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/pom.xml?view=diff&rev=491492&r1=491491&r2=491492
==============================================================================
--- incubator/nmaven/trunk/plugins/pom.xml (original)
+++ incubator/nmaven/trunk/plugins/pom.xml Sun Dec 31 13:25:57 2006
@@ -12,6 +12,7 @@
<module>maven-test-plugin</module>
<module>maven-webapp-plugin</module>
<module>maven-xsd-plugin</module>
+ <module>maven-xsp-plugin</module>
<module>maven-wsdl-plugin</module>
<module>maven-install-plugin</module>
<module>maven-resgen-plugin</module>