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/10 23:44:12 UTC
svn commit: r485313 [3/15] - in /incubator/nmaven/trunk: components/
components/dotnet-artifact/ components/dotnet-artifact/src/
components/dotnet-artifact/src/main/
components/dotnet-artifact/src/main/java/
components/dotnet-artifact/src/main/java/org...
Added: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfo.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfo.java (added)
+++ incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfo.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,254 @@
+/*
+ * 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.assembler;
+
+/**
+ * Provides the information to be included within the assembly. Class can be extended to add additional assembly info
+ * parameters.
+ *
+ * @author Shane Isbell
+ */
+public class AssemblyInfo
+{
+ /**
+ * Artifact version
+ */
+ private String version;
+
+ /**
+ * Artifact description
+ */
+ private String description;
+
+ /**
+ * Artifact title
+ */
+ private String title;
+
+ /**
+ * Artifact company
+ */
+ private String company;
+
+ /**
+ * Artifact company
+ */
+ private String product;
+
+ /**
+ * Artifact copyright
+ */
+ private String copyright;
+
+ /**
+ * Artifact trademark
+ */
+ private String trademark;
+
+ /**
+ * Artifact culture
+ */
+ private String culture;
+
+ /**
+ * Artifact configuration
+ */
+ private String configuration;
+
+ /**
+ * Default constructor
+ */
+ public AssemblyInfo()
+ {
+ }
+
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer();
+ sb.append( "Version: " ).append( version )
+ .append( "\r\nDescription: " ).append( description )
+ .append( "\r\nTitle: " ).append( title )
+ .append( "\r\nCompany; " ).append( company )
+ .append( "\r\nProduct: " ).append( product )
+ .append( "\r\nCopyright: " ).append( copyright )
+ .append( "\r\nTrademark: " ).append( trademark )
+ .append( "\r\nCulture: " ).append( culture )
+ .append( "\r\nConfiguration: " ).append( configuration );
+ return sb.toString();
+ }
+
+ public String getVersion()
+ {
+ return ( version != null ) ? version : "";
+ }
+
+ public void setVersion( String version )
+ {
+ this.version = version;
+ }
+
+ public String getDescription()
+ {
+ return ( description != null ) ? description : "";
+ }
+
+ public void setDescription( String description )
+ {
+ this.description = description;
+ }
+
+ public String getTitle()
+ {
+ return ( title != null ) ? title : "";
+ }
+
+ public void setTitle( String title )
+ {
+ this.title = title;
+ }
+
+ public String getCompany()
+ {
+ return ( company != null ) ? company : "";
+ }
+
+ public void setCompany( String company )
+ {
+ this.company = company;
+ }
+
+ public String getProduct()
+ {
+ return ( product != null ) ? product : "";
+ }
+
+ public void setProduct( String product )
+ {
+ this.product = product;
+ }
+
+ public String getCopyright()
+ {
+ return ( copyright != null ) ? copyright : "";
+ }
+
+ public void setCopyright( String copyright )
+ {
+ this.copyright = copyright;
+ }
+
+ public String getTrademark()
+ {
+ return ( trademark != null ) ? trademark : "";
+ }
+
+ public void setTrademark( String trademark )
+ {
+ this.trademark = trademark;
+ }
+
+ public String getCulture()
+ {
+ return ( culture != null ) ? culture : "";
+ }
+
+ public void setCulture( String culture )
+ {
+ this.culture = culture;
+ }
+
+ public String getConfiguration()
+ {
+ return ( configuration != null ) ? configuration : "";
+ }
+
+ public void setConfiguration( String configuration )
+ {
+ this.configuration = configuration;
+ }
+
+ public boolean equals( Object o )
+ {
+ if ( this == o )
+ {
+ return true;
+ }
+ if ( o == null || getClass() != o.getClass() )
+ {
+ return false;
+ }
+
+ final AssemblyInfo that = (AssemblyInfo) o;
+
+ if ( company != null ? !company.equals( that.company ) : that.company != null )
+ {
+ return false;
+ }
+ if ( configuration != null ? !configuration.equals( that.configuration ) : that.configuration != null )
+ {
+ return false;
+ }
+ if ( copyright != null ? !copyright.equals( that.copyright ) : that.copyright != null )
+ {
+ return false;
+ }
+ if ( culture != null ? !culture.equals( that.culture ) : that.culture != null )
+ {
+ return false;
+ }
+ if ( description != null ? !description.equals( that.description ) : that.description != null )
+ {
+ return false;
+ }
+ if ( product != null ? !product.equals( that.product ) : that.product != null )
+ {
+ return false;
+ }
+ if ( title != null ? !title.equals( that.title ) : that.title != null )
+ {
+ return false;
+ }
+ if ( trademark != null ? !trademark.equals( that.trademark ) : that.trademark != null )
+ {
+ return false;
+ }
+ if ( version != null ? !version.equals( that.version ) : that.version != null )
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ public int hashCode()
+ {
+ int result;
+ result = ( version != null ? version.hashCode() : 0 );
+ result = 29 * result + ( description != null ? description.hashCode() : 0 );
+ result = 29 * result + ( title != null ? title.hashCode() : 0 );
+ result = 29 * result + ( company != null ? company.hashCode() : 0 );
+ result = 29 * result + ( product != null ? product.hashCode() : 0 );
+ result = 29 * result + ( copyright != null ? copyright.hashCode() : 0 );
+ result = 29 * result + ( trademark != null ? trademark.hashCode() : 0 );
+ result = 29 * result + ( culture != null ? culture.hashCode() : 0 );
+ result = 29 * result + ( configuration != null ? configuration.hashCode() : 0 );
+ return result;
+ }
+
+}
Propchange: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfo.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfoException.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfoException.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfoException.java (added)
+++ incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfoException.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,70 @@
+/*
+ * 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.assembler;
+
+/**
+ * Exception thrown when there is a problem processing the assembly info.
+ *
+ * @author Shane Isbell
+ */
+public class AssemblyInfoException
+ extends Exception
+{
+
+ static final long serialVersionUID = 720673423890L;
+
+ /**
+ * Constructs a <code>AssemblyInfoException</code> with no exception message.
+ */
+ public AssemblyInfoException()
+ {
+ super();
+ }
+
+ /**
+ * Constructs an <code>AssemblyInfoException</code> with the specified exception message.
+ *
+ * @param message the exception message
+ */
+ public AssemblyInfoException( String message )
+ {
+ super( message );
+ }
+
+ /**
+ * Constructs an <code>AssmeblyInfoException</code> with the specified exception message and cause of the exception.
+ *
+ * @param message the exception message
+ * @param cause the cause of the exception
+ */
+ public AssemblyInfoException( String message, Throwable cause )
+ {
+ super( message, cause );
+ }
+
+ /**
+ * Constructs an <code>AssemblyInfoException</code> with the cause of the exception.
+ *
+ * @param cause the cause of the exception
+ */
+ public AssemblyInfoException( Throwable cause )
+ {
+ super( cause );
+ }
+}
Propchange: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfoException.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfoMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfoMarshaller.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfoMarshaller.java (added)
+++ incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfoMarshaller.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,54 @@
+/*
+ * 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.assembler;
+
+import java.io.OutputStream;
+import java.io.IOException;
+
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.dotnet.model.assembly.plugins.AssemblyPlugin;
+
+/**
+ * Provides services for creating an AssemblyInfo class.
+ *
+ * @author Shane Isbell
+ */
+public interface AssemblyInfoMarshaller
+{
+
+ /**
+ * Writes the assembly info to AssemblyInfo.[language-extension].
+ *
+ * @param assemblyInfo the assembly info
+ * @param mavenProject the maven project
+ * @param outputStream the output stream to write to (currently unused)
+ * @throws IOException if there was a problem writing out the class file.
+ */
+ void marshal( AssemblyInfo assemblyInfo, MavenProject mavenProject, OutputStream outputStream )
+ throws IOException;
+
+ /**
+ * Initializes the marshaller.
+ *
+ * @param plugin the assembly plugin model associated with this marshaller (plugin specified within the
+ * assembly-plugins.xml file)
+ */
+ void init( AssemblyPlugin plugin );
+
+}
Propchange: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblyInfoMarshaller.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/AssemblerContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/AssemblerContextImpl.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/AssemblerContextImpl.java (added)
+++ incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/AssemblerContextImpl.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,179 @@
+/*
+ * 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.assembler.impl;
+
+import org.apache.maven.dotnet.assembler.AssemblerContext;
+import org.apache.maven.dotnet.assembler.AssemblyInfo;
+import org.apache.maven.dotnet.assembler.AssemblyInfoMarshaller;
+import org.apache.maven.dotnet.assembler.AssemblyInfoException;
+import org.apache.maven.dotnet.InitializationException;
+import org.apache.maven.dotnet.model.assembly.plugins.AssemblyPlugin;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.model.Organization;
+
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.logging.LogEnabled;
+import org.codehaus.plexus.logging.Logger;
+import org.apache.maven.dotnet.registry.RepositoryRegistry;
+
+import java.io.*;
+
+
+/**
+ * Provides an implementation of the <code>AssemblerContext</code>.
+ *
+ * @author Shane Isbell
+ */
+public final class AssemblerContextImpl
+ implements AssemblerContext, LogEnabled
+{
+
+ /**
+ * A registry component of repository (config) files
+ */
+ private RepositoryRegistry repositoryRegistry;
+
+ /**
+ * The maven project
+ */
+ private MavenProject mavenProject;
+
+ /**
+ * A logger for writing log messages
+ */
+ private Logger logger;
+
+ /**
+ * The assembly plugins repository used for accessing assembly plugin information, which in turn is used for
+ * generating an <code>AssemblyInfo</code> object.
+ */
+ private AssemblyPluginsRepository repository;
+
+ /**
+ * Constructor. This method is intended to by invoked by the plexus-container, not by the application developer.
+ */
+ public AssemblerContextImpl()
+ {
+ }
+
+ /**
+ * @see LogEnabled#enableLogging(org.codehaus.plexus.logging.Logger)
+ */
+ public void enableLogging( Logger logger )
+ {
+ this.logger = logger;
+ }
+
+ /**
+ * @see org.apache.maven.dotnet.assembler.AssemblerContext#getAssemblyInfo()
+ */
+ public AssemblyInfo getAssemblyInfo()
+ {
+ String basedir = mavenProject.getBasedir().toString();
+ AssemblyInfo assemblyInfo = new AssemblyInfo();
+ String description = mavenProject.getDescription();
+ String version = mavenProject.getVersion();
+ String name = mavenProject.getName();
+ Organization org = mavenProject.getOrganization();
+ String company = ( org != null ) ? org.getName() : "";
+ String copyright = "";
+ File file = new File( basedir + "/COPYRIGHT.txt" );
+ if ( file.exists() )
+ {
+ logger.debug( "NMAVEN-020-000: Found Copyright: " + file.getAbsolutePath() );
+ FileInputStream fis = null;
+ try
+ {
+ fis = new FileInputStream( file );
+ copyright = IOUtil.toString( fis ).replace( "\r", "" ).replace( "\n", "" ).replace( "\"", "\\" );
+ }
+ catch ( IOException e )
+ {
+ logger.info( "NMAVEN-020-001: Could not get copyright: File = " + file.getAbsolutePath(), e );
+ }
+ finally
+ {
+ if ( fis != null )
+ {
+ IOUtil.close( fis );
+ }
+ }
+ }
+
+ assemblyInfo.setCompany( company );
+ assemblyInfo.setCopyright( copyright );
+ assemblyInfo.setCulture( "" );
+ assemblyInfo.setDescription( description );
+ assemblyInfo.setProduct( company + "-" + name );
+ assemblyInfo.setTitle( name );
+ assemblyInfo.setTrademark( "" );
+ assemblyInfo.setVersion( version );
+ assemblyInfo.setConfiguration( "" );
+
+ return assemblyInfo;
+ }
+
+ /**
+ * @see AssemblerContext#getAssemblyInfoMarshallerFor(String)
+ */
+ public AssemblyInfoMarshaller getAssemblyInfoMarshallerFor( String language )
+ throws AssemblyInfoException
+ {
+ AssemblyPlugin plugin = repository.getAssemblyPluginFor( language );
+ String className = plugin.getPluginClass();
+ AssemblyInfoMarshaller marshaller = null;
+ try
+ {
+ Class cc = Class.forName( className );
+ marshaller = (AssemblyInfoMarshaller) cc.newInstance();
+ marshaller.init( plugin );
+ }
+ catch ( ClassNotFoundException e )
+ {
+ throw new AssemblyInfoException(
+ "NMAVEN-020-002: Unable to create AssemblyInfoMarshaller: Class Name = " + className, e );
+ }
+ catch ( InstantiationException e )
+ {
+ throw new AssemblyInfoException(
+ "NMAVEN-020-003: Unable to create AssemblyInfoMarshaller: Class Name = " + className, e );
+ }
+ catch ( IllegalAccessException e )
+ {
+ throw new AssemblyInfoException(
+ "NMAVEN-020-004: Unable to create AssemblyInfoMarshaller: Class Name = " + className, e );
+ }
+
+ return marshaller;
+ }
+
+ /**
+ * @see AssemblerContext#init(org.apache.maven.project.MavenProject)
+ */
+ public void init( MavenProject mavenProject )
+ throws InitializationException
+ {
+ this.mavenProject = mavenProject;
+ repository = (AssemblyPluginsRepository) repositoryRegistry.find( "assembly-plugins" );
+ if ( repository == null )
+ {
+ throw new InitializationException( "NMAVEN-020-005: Unable to find the assembly-plugins.xml file" );
+ }
+ }
+}
Propchange: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/AssemblerContextImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/AssemblyPluginsRepository.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/AssemblyPluginsRepository.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/AssemblyPluginsRepository.java (added)
+++ incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/AssemblyPluginsRepository.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,140 @@
+/*
+ * 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.assembler.impl;
+
+import org.apache.maven.dotnet.registry.Repository;
+import org.apache.maven.dotnet.registry.RepositoryRegistry;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.InputStreamReader;
+import java.util.*;
+
+import org.apache.maven.dotnet.assembler.AssemblyInfoException;
+import org.apache.maven.dotnet.model.assembly.plugins.AssemblyPlugin;
+import org.apache.maven.dotnet.model.assembly.plugins.AssemblyPluginsModel;
+import org.apache.maven.dotnet.model.assembly.plugins.io.xpp3.AssemblyPluginXpp3Reader;
+
+/**
+ * Provides a way for loading the assembly-plugins.xml file and accessing its content.
+ *
+ * @author Shane Isbell
+ */
+public class AssemblyPluginsRepository
+ implements Repository
+{
+
+ /**
+ * List of all assembly plugins within the repository
+ */
+ private List<AssemblyPlugin> assemblyPlugins;
+
+ /**
+ * Constructor. This method is intended to by invoked by the <code>RepositoryRegistry<code>, not by the
+ * application developer.
+ */
+ public AssemblyPluginsRepository()
+ {
+ }
+
+ /**
+ * Loads the repository.
+ *
+ * @param inputStream a stream of the repository file (typically from *.xml)
+ * @param properties additional user-supplied parameters used to customize the behavior of the repository
+ * @throws IOException if there is a problem loading the repository
+ */
+ public void load( InputStream inputStream, Hashtable properties )
+ throws IOException
+ {
+ AssemblyPluginXpp3Reader xpp3Reader = new AssemblyPluginXpp3Reader();
+ Reader reader = new InputStreamReader( inputStream );
+ AssemblyPluginsModel plugins = null;
+ try
+ {
+ plugins = xpp3Reader.read( reader );
+ }
+ catch ( XmlPullParserException e )
+ {
+ e.printStackTrace();
+ throw new IOException( "NMAVEN-021-000: Could not read plugins-compiler.xml" );
+ }
+ assemblyPlugins = plugins.getAssemblyPlugins();
+ Set languages = getAssemblyPluginLanguages();
+ if ( languages.size() < assemblyPlugins.size() )
+ {
+ throw new IOException(
+ "NMAVEN-021-001: Duplicate language entries in the assembly-plugins.xml: Total Language Count = " +
+ languages.size() + ", Total Plugins = " + assemblyPlugins.size() );
+ }
+ }
+
+ public void setRepositoryRegistry( RepositoryRegistry repositoryRegistry )
+ {
+ }
+
+ /**
+ * Returns all assembly plugins. This list is live and any modification will remain until the next time the application
+ * starts.
+ *
+ * @return all assembly plugins.
+ */
+ public List<AssemblyPlugin> getAssemblyPlugins()
+ {
+ return assemblyPlugins;
+ }
+
+ /**
+ * Returns an assembly plugin for the specified programming language.
+ *
+ * @param language the programming language to use for matching an assembly plugin
+ * @return assembly plugin for the specified programming language
+ * @throws AssemblyInfoException if there is no plugin for the specified language
+ */
+ public AssemblyPlugin getAssemblyPluginFor( String language )
+ throws AssemblyInfoException
+ {
+ for ( AssemblyPlugin assemblyPlugin : assemblyPlugins )
+ {
+ if ( assemblyPlugin.getLanguage().trim().equals( language ) )
+ {
+ return assemblyPlugin;
+ }
+ }
+ throw new AssemblyInfoException( "NMAVEN-022-002: Unable to locate AssemblyPlugin: Language = " + language );
+ }
+
+ /**
+ * Returns a set of all supported languages.
+ *
+ * @return a set of all supported languages
+ */
+ private Set<String> getAssemblyPluginLanguages()
+ {
+ Set<String> set = new HashSet<String>();
+
+ for ( AssemblyPlugin assemblyPlugin : assemblyPlugins )
+ {
+ set.add( assemblyPlugin.getLanguage().trim() );
+ }
+ return set;
+ }
+}
Propchange: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/AssemblyPluginsRepository.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/DefaultAssemblyInfoMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/DefaultAssemblyInfoMarshaller.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/DefaultAssemblyInfoMarshaller.java (added)
+++ incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/DefaultAssemblyInfoMarshaller.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,110 @@
+/*
+ * 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.assembler.impl;
+
+import org.apache.maven.dotnet.assembler.AssemblyInfoMarshaller;
+import org.apache.maven.dotnet.assembler.AssemblyInfo;
+import org.apache.maven.dotnet.model.assembly.plugins.AssemblyPlugin;
+
+import java.io.OutputStream;
+import java.io.IOException;
+import java.io.File;
+import java.io.FileOutputStream;
+
+import org.apache.maven.project.MavenProject;
+
+/**
+ * Provides services for writing out the AssemblyInfo entries using the bracket convention [assembly:
+ *
+ * @author Shane Isbell
+ */
+final class DefaultAssemblyInfoMarshaller
+ implements AssemblyInfoMarshaller
+{
+
+ /**
+ * The assembly plugin model that contains information used in writing of the AssemblyInfo class.
+ */
+ private AssemblyPlugin plugin;
+
+ /**
+ * @see AssemblyInfoMarshaller#marshal(org.apache.maven.dotnet.assembler.AssemblyInfo, org.apache.maven.project.MavenProject,
+ * java.io.OutputStream)
+ */
+ public void marshal( AssemblyInfo assemblyInfo, MavenProject mavenProject, OutputStream outputStream )
+ throws IOException
+ {
+ String src = mavenProject.getBuild().getDirectory() + "/build-sources";
+ StringBuffer sb = new StringBuffer();
+ sb.append( "using System.Reflection;\r\n" )
+ .append( "using System.Runtime.CompilerServices;\r\n" )
+ .append( createEntry( "Description", assemblyInfo.getDescription() ) )
+ .append( createEntry( "Title", assemblyInfo.getTitle() ) )
+ .append( createEntry( "Company", assemblyInfo.getCompany() ) )
+ .append( createEntry( "Product", assemblyInfo.getProduct() ) )
+ .append( createEntry( "Copyright", assemblyInfo.getCopyright().replace( "\"", "\\" ) ) )
+ .append( createEntry( "Trademark", assemblyInfo.getTrademark() ) )
+ .append( createEntry( "Culture", assemblyInfo.getCulture() ) )
+ .append( createEntry( "Version", assemblyInfo.getVersion() ) )
+ .append( createEntry( "Configuration", assemblyInfo.getConfiguration() ) );
+ FileOutputStream man = null;
+ try
+ {
+ File file = new File( src + "/META-INF/net/sf/nmaven" );
+ file.mkdirs();
+ man = new FileOutputStream( src + "/META-INF/net/sf/nmaven/AssemblyInfo." + plugin.getExtension() );
+ man.write( sb.toString().getBytes() );
+ }
+ catch ( IOException e )
+ {
+ e.printStackTrace();
+ throw new IOException( "Failed to generate AssemblyInfo" );
+ }
+ finally
+ {
+ if ( man != null )
+ {
+ man.close();
+ }
+ }
+ }
+
+ /**
+ * @see AssemblyInfoMarshaller#init(org.apache.maven.dotnet.model.assembly.plugins.AssemblyPlugin)
+ */
+ public void init( AssemblyPlugin plugin )
+ {
+ this.plugin = plugin;
+ }
+
+ /**
+ * Returns an assembly entry with a name-value pair surrounded by brackets.
+ *
+ * @param name the name of the assembly entry
+ * @param value the value of the assembly entry
+ * @return an assembly entry with a name-value pair surrounded by brackets
+ */
+ private String createEntry( String name, String value )
+ {
+ StringBuffer sb = new StringBuffer();
+ sb.append( "[assembly: Assembly" ).append( name ).append( "(\"" ).append( value ).append( "\")]" ).append(
+ "\r\n" );
+ return sb.toString();
+ }
+}
Propchange: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/DefaultAssemblyInfoMarshaller.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/JavaAssemblyInfoMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/JavaAssemblyInfoMarshaller.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/JavaAssemblyInfoMarshaller.java (added)
+++ incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/JavaAssemblyInfoMarshaller.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,109 @@
+/*
+ * 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.assembler.impl;
+
+import org.apache.maven.dotnet.assembler.AssemblyInfoMarshaller;
+import org.apache.maven.dotnet.assembler.AssemblyInfo;
+import org.apache.maven.dotnet.model.assembly.plugins.AssemblyPlugin;
+
+import java.io.OutputStream;
+import java.io.IOException;
+import java.io.FileOutputStream;
+import java.io.File;
+
+import org.apache.maven.project.MavenProject;
+
+/**
+ * Provides services for writing out the AssemblyInfo entries for Java, where each entry begins with '/**@' and ends with '*\/'
+ *
+ * @author Shane Isbell
+ */
+final class JavaAssemblyInfoMarshaller
+ implements AssemblyInfoMarshaller
+{
+
+ /**
+ * The assembly plugin model that contains information used in writing of the AssemblyInfo class.
+ */
+ private AssemblyPlugin plugin;
+
+ /**
+ * @see AssemblyInfoMarshaller#marshal(org.apache.maven.dotnet.assembler.AssemblyInfo, org.apache.maven.project.MavenProject,
+ * java.io.OutputStream)
+ */
+ public void marshal( AssemblyInfo assemblyInfo, MavenProject mavenProject, OutputStream outputStream )
+ throws IOException
+ {
+ String src = mavenProject.getBasedir() + "/target/build-sources";
+ StringBuffer sb = new StringBuffer();
+ sb.append( "import System.Reflection;\r\n" )
+ .append( "import System.Runtime.CompilerServices.*;r\n" )
+ .append( createEntry( "Description", assemblyInfo.getDescription() ) )
+ .append( createEntry( "Title", assemblyInfo.getTitle() ) )
+ .append( createEntry( "Company", assemblyInfo.getCompany() ) )
+ .append( createEntry( "Product", assemblyInfo.getProduct() ) )
+ .append( createEntry( "Copyright", assemblyInfo.getCopyright().replace( "\"", "\\" ) ) )
+ .append( createEntry( "Trademark", assemblyInfo.getTrademark() ) )
+ .append( createEntry( "Culture", assemblyInfo.getCulture() ) )
+ .append( createEntry( "Version", assemblyInfo.getVersion() ) )
+ .append( createEntry( "Configuration", assemblyInfo.getConfiguration() ) );
+ FileOutputStream man = null;
+ try
+ {
+ File file = new File( src + "/META-INF/net/sf/nmaven" );
+ file.mkdirs();
+ man = new FileOutputStream( src + "/META-INF/net/sf/nmaven/AssemblyInfo." + plugin.getExtension() );
+ man.write( sb.toString().getBytes() );
+ }
+ catch ( IOException e )
+ {
+ throw new IOException();
+ }
+ finally
+ {
+ if ( man != null )
+ {
+ man.close();
+ }
+ }
+ }
+
+ /**
+ * @see AssemblyInfoMarshaller#init(org.apache.maven.dotnet.model.assembly.plugins.AssemblyPlugin)
+ */
+ public void init( AssemblyPlugin plugin )
+ {
+ this.plugin = plugin;
+ }
+
+ /**
+ * Returns an assembly entry with a name-value pair beginning with '/**@' and ending with '*\/'
+ *
+ * @param name the name of the assembly entry
+ * @param value the value of the assembly entry
+ * @return an assembly entry with a name-value pair beginning with '/**@' and ending with '*\/'
+ */
+ private String createEntry( String name, String value )
+ {
+ StringBuffer sb = new StringBuffer();
+ sb.append( "/**@assembly: Assembly" ).append( name ).append( "(\"" ).append( value ).append( "\")*/" ).append(
+ "\r\n" );
+ return sb.toString();
+ }
+}
Propchange: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/JavaAssemblyInfoMarshaller.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/VBAssemblyInfoMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/VBAssemblyInfoMarshaller.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/VBAssemblyInfoMarshaller.java (added)
+++ incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/VBAssemblyInfoMarshaller.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,110 @@
+/*
+ * 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.assembler.impl;
+
+import org.apache.maven.dotnet.assembler.AssemblyInfoMarshaller;
+import org.apache.maven.dotnet.assembler.AssemblyInfo;
+import org.apache.maven.dotnet.model.assembly.plugins.AssemblyPlugin;
+
+import java.io.OutputStream;
+import java.io.IOException;
+import java.io.FileOutputStream;
+import java.io.File;
+
+import org.apache.maven.project.MavenProject;
+
+/**
+ * Provides services for writing out the AssemblyInfo entries for VB using the angle bracket convention <assembly:
+ *
+ * @author Shane Isbell
+ */
+
+final class VBAssemblyInfoMarshaller
+ implements AssemblyInfoMarshaller
+{
+
+ /**
+ * The assembly plugin model that contains information used in writing of the AssemblyInfo class.
+ */
+ private AssemblyPlugin plugin;
+
+ /**
+ * @see AssemblyInfoMarshaller#marshal(org.apache.maven.dotnet.assembler.AssemblyInfo, org.apache.maven.project.MavenProject,
+ * java.io.OutputStream)
+ */
+ public void marshal( AssemblyInfo assemblyInfo, MavenProject mavenProject, OutputStream outputStream )
+ throws IOException
+ {
+ String src = mavenProject.getBasedir() + "/target/build-sources";
+ StringBuffer sb = new StringBuffer();
+ sb.append( "Imports System.Reflection\r\n" )
+ .append( "Imports System.Runtime.InteropServices\r\n" )
+ .append( createEntry( "Description", assemblyInfo.getDescription() ) )
+ .append( createEntry( "Title", assemblyInfo.getTitle() ) )
+ .append( createEntry( "Company", assemblyInfo.getCompany() ) )
+ .append( createEntry( "Product", assemblyInfo.getProduct() ) )
+ .append( createEntry( "Copyright", assemblyInfo.getCopyright().replace( "\"", "\\" ) ) )
+ .append( createEntry( "Trademark", assemblyInfo.getTrademark() ) )
+ .append( createEntry( "Culture", assemblyInfo.getCulture() ) )
+ .append( createEntry( "Version", assemblyInfo.getVersion() ) );
+ //.append(createEntry("Configuration", assemblyInfo.getConfiguration()));
+ FileOutputStream man = null;
+ try
+ {
+ File file = new File( src + "/META-INF/net/sf/nmaven" );
+ file.mkdirs();
+ man = new FileOutputStream( src + "/META-INF/net/sf/nmaven/AssemblyInfo." + plugin.getExtension() );
+ man.write( sb.toString().getBytes() );
+ }
+ catch ( IOException e )
+ {
+ throw new IOException();
+ }
+ finally
+ {
+ if ( man != null )
+ {
+ man.close();
+ }
+ }
+ }
+
+ /**
+ * @see AssemblyInfoMarshaller#init(org.apache.maven.dotnet.model.assembly.plugins.AssemblyPlugin)
+ */
+ public void init( AssemblyPlugin plugin )
+ {
+ this.plugin = plugin;
+ }
+
+ /**
+ * Returns an assembly entry with a name-value pair surrounded by angle brackets.
+ *
+ * @param name the name of the assembly entry
+ * @param value the value of the assembly entry
+ * @return an assembly entry with a name-value pair surrounded by angle brackets
+ */
+ private String createEntry( String name, String value )
+ {
+ StringBuffer sb = new StringBuffer();
+ sb.append( "<Assembly: Assembly" ).append( name ).append( "(\"" ).append( value ).append( "\")>" ).append(
+ "\r\n" );
+ return sb.toString();
+ }
+}
Propchange: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/VBAssemblyInfoMarshaller.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/package.html
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/package.html?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/package.html (added)
+++ incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/package.html Sun Dec 10 15:43:51 2006
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+ @(#)package.html
+
+ Copyright 2006 Shane Isbell
+
+ Licensed 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.
+
+-->
+</head>
+<body bgcolor="white">
+ Provides the implementation classes of the <i>org.apache.maven.assembler</i> package. Implementations include
+assembly info generation for C#, VB and Java.
+</body>
+</html>
\ No newline at end of file
Propchange: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/impl/package.html
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/package.html
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/package.html?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/package.html (added)
+++ incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/package.html Sun Dec 10 15:43:51 2006
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<!--
+
+ @(#)package.html
+
+ Copyright 2006 Shane Isbell
+
+ Licensed 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.
+
+-->
+</head>
+<body bgcolor="white">
+ Provides interfaces and classes for generating AssemblyInfo classes. The core interface of this package is
+ <code>AssemblerContext</code>, which gives access to the <code>AssemblyInfoMarshaller</code>.
+installer.
+</body>
+</html>
\ No newline at end of file
Propchange: incubator/nmaven/trunk/components/dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/package.html
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-assembler/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-assembler/src/main/resources/META-INF/plexus/components.xml?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-assembler/src/main/resources/META-INF/plexus/components.xml (added)
+++ incubator/nmaven/trunk/components/dotnet-assembler/src/main/resources/META-INF/plexus/components.xml Sun Dec 10 15:43:51 2006
@@ -0,0 +1,13 @@
+<component-set>
+ <components>
+ <component>
+ <role>org.apache.maven.dotnet.assembler.AssemblerContext</role>
+ <implementation>org.apache.maven.dotnet.assembler.impl.AssemblerContextImpl</implementation>
+ <requirements>
+ <requirement>
+ <role>org.apache.maven.dotnet.registry.RepositoryRegistry</role>
+ </requirement>
+ </requirements>
+ </component>
+ </components>
+</component-set>
Propchange: incubator/nmaven/trunk/components/dotnet-assembler/src/main/resources/META-INF/plexus/components.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-core/LICENSE.txt
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-core/LICENSE.txt?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-core/LICENSE.txt (added)
+++ incubator/nmaven/trunk/components/dotnet-core/LICENSE.txt Sun Dec 10 15:43:51 2006
@@ -0,0 +1,176 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
Propchange: incubator/nmaven/trunk/components/dotnet-core/LICENSE.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-core/pom.xml?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-core/pom.xml (added)
+++ incubator/nmaven/trunk/components/dotnet-core/pom.xml Sun Dec 10 15:43:51 2006
@@ -0,0 +1,46 @@
+<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</groupId>
+ <version>0.14-SNAPSHOT</version>
+ <artifactId>dotnet-components</artifactId>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven.dotnet</groupId>
+ <artifactId>dotnet-core</artifactId>
+ <version>0.14-SNAPSHOT</version>
+ <name>dotnet-core</name>
+ <description>
+ NMaven
+ </description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.dotnet</groupId>
+ <artifactId>dotnet-registry</artifactId>
+ <version>0.14-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>2.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.0.4</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Propchange: incubator/nmaven/trunk/components/dotnet-core/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/InitializationException.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/InitializationException.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/InitializationException.java (added)
+++ incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/InitializationException.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,70 @@
+/*
+ * 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;
+
+/**
+ * Exception thrown on initialization errors.
+ *
+ * @author Shane Isbell
+ */
+public class InitializationException
+ extends Exception
+{
+
+ static final long serialVersionUID = -6193640178334L;
+
+ /**
+ * Constructs an <code>InitializationException</code> with no exception message.
+ */
+ public InitializationException()
+ {
+ super();
+ }
+
+ /**
+ * Constructs an <code>InitializationException</code> with the specified exception message.
+ *
+ * @param message the exception message
+ */
+ public InitializationException( String message )
+ {
+ super( message );
+ }
+
+ /**
+ * Constructs an <code>InitializationException</code> with the specified exception message and cause of the exception.
+ *
+ * @param message the exception message
+ * @param cause the cause of the exception
+ */
+ public InitializationException( String message, Throwable cause )
+ {
+ super( message, cause );
+ }
+
+ /**
+ * Constructs an <code>InitializationException</code> with the cause of the exception.
+ *
+ * @param cause the cause of the exception
+ */
+ public InitializationException( Throwable cause )
+ {
+ super( cause );
+ }
+}
Propchange: incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/InitializationException.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/NMavenContext.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/NMavenContext.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/NMavenContext.java (added)
+++ incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/NMavenContext.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,68 @@
+/*
+ * 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;
+
+import org.apache.maven.project.MavenProject;
+
+import org.apache.maven.dotnet.registry.Repository;
+import org.codehaus.plexus.logging.Logger;
+
+/**
+ * Provides services for obtaining repositories, a plexus logger and the maven project.
+ *
+ * @author Shane Isbell
+ */
+
+public interface NMavenContext
+{
+
+ /**
+ * Role used to register component implementations with the container.
+ */
+ String ROLE = NMavenContext.class.getName();
+
+ /**
+ * This method is used to obtain an instance of a <code>Repository</code> specified within the registry-config.xml file.
+ * This method allows the application developer to create configuration files and have them accessible through the
+ * NMaven Context. For more information on how the registry/repository works, go to
+ * http://jvending.sourceforge.net/registry-cdc/
+ *
+ * @param repositoryName the name of the repository. This name should match the /<repository-name> field within the
+ * registry-config.xml file.
+ * @return repository for the specified repository name
+ * @throws RepositoryNotFoundException if repository is not found.
+ */
+ Repository find( String repositoryName )
+ throws RepositoryNotFoundException;
+
+ /**
+ * Returns Maven Plexus logger: <code>Log</code>.
+ *
+ * @return the plugin logger
+ */
+ Logger getLogger();
+
+ /**
+ * Returns Maven Project
+ *
+ * @return the Maven Project
+ */
+ MavenProject getMavenProject();
+
+}
Propchange: incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/NMavenContext.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/NMavenRepositoryRegistry.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/NMavenRepositoryRegistry.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/NMavenRepositoryRegistry.java (added)
+++ incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/NMavenRepositoryRegistry.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,45 @@
+/*
+ * 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;
+
+import org.apache.maven.dotnet.registry.RepositoryRegistry;
+
+import java.io.IOException;
+
+
+/**
+ * @author Shane Isbell
+ */
+public interface NMavenRepositoryRegistry
+{
+
+ /**
+ * Role used to register component implementations with the container.
+ */
+ String ROLE = NMavenRepositoryRegistry.class.getName();
+
+ /**
+ * Creates a repository registry.
+ *
+ * @return an repository registry
+ * @throws IOException
+ */
+ RepositoryRegistry createRepositoryRegistry()
+ throws IOException;
+}
Propchange: incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/NMavenRepositoryRegistry.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/PlatformUnsupportedException.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/PlatformUnsupportedException.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/PlatformUnsupportedException.java (added)
+++ incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/PlatformUnsupportedException.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,72 @@
+/*
+ * 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;
+
+/**
+ * Exception class thrown when the invoking platform does not support the given vendor (MICROSOFT/MONO) or the compiler
+ * language.
+ *
+ * @author Shane Isbell
+ */
+public class PlatformUnsupportedException
+ extends Exception
+{
+
+ static final long serialVersionUID = 342635474673243L;
+
+ /**
+ * Constructs an <code>PlatformUnsupportedException</code> with no exception message.
+ */
+ public PlatformUnsupportedException()
+ {
+ super();
+ }
+
+ /**
+ * Constructs an <code>PlatformUnsupportedException</code> with the specified exception message.
+ *
+ * @param message the exception message
+ */
+ public PlatformUnsupportedException( String message )
+ {
+ super( message );
+ }
+
+ /**
+ * Constructs an <code>PlatformUnsupportedException</code> with the specified exception message and cause of the exception.
+ *
+ * @param message the exception message
+ * @param cause the cause of the exception
+ */
+ public PlatformUnsupportedException( String message, Throwable cause )
+ {
+ super( message, cause );
+ }
+
+ /**
+ * Constructs an <code>PlatformUnsupportedException</code> with the cause of the exception.
+ *
+ * @param cause the cause of the exception
+ */
+ public PlatformUnsupportedException( Throwable cause )
+ {
+ super( cause );
+ }
+
+}
Propchange: incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/PlatformUnsupportedException.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/RepositoryNotFoundException.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/RepositoryNotFoundException.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/RepositoryNotFoundException.java (added)
+++ incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/RepositoryNotFoundException.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,71 @@
+/*
+ * 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;
+
+/**
+ * Exception class thrown when a Repository does not exist in the registry.
+ *
+ * @author Shane Isbell
+ */
+public class RepositoryNotFoundException
+ extends Exception
+{
+
+ static final long serialVersionUID = 7228089324L;
+
+ /**
+ * Constructs an <code>RepositoryNotFoundException</code> with no exception message.
+ */
+ public RepositoryNotFoundException()
+ {
+ super();
+ }
+
+ /**
+ * Constructs an <code>RepositoryNotFoundException</code> with the specified exception message.
+ *
+ * @param message the exception message
+ */
+ public RepositoryNotFoundException( String message )
+ {
+ super( message );
+ }
+
+ /**
+ * Constructs an <code>RepositoryNotFoundException</code> with the specified exception message and cause of the exception.
+ *
+ * @param message the exception message
+ * @param cause the cause of the exception
+ */
+ public RepositoryNotFoundException( String message, Throwable cause )
+ {
+ super( message, cause );
+ }
+
+ /**
+ * Constructs an <code>RepositoryNotFoundException/code> with the cause of the exception.
+ *
+ * @param cause the cause of the exception
+ */
+ public RepositoryNotFoundException( Throwable cause )
+ {
+ super( cause );
+ }
+
+}
Propchange: incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/RepositoryNotFoundException.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/Version.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/Version.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/Version.java (added)
+++ incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/Version.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,122 @@
+/*
+ * 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;
+
+public class Version
+{
+
+ private int major;
+
+ private int minor;
+
+ private int build;
+
+ private int revision;
+
+ /**
+ * Default constructor
+ */
+ public Version()
+ {
+ }
+
+ public int getMajor()
+ {
+ return major;
+ }
+
+ public void setMajor( int major )
+ {
+ this.major = major;
+ }
+
+ public int getMinor()
+ {
+ return minor;
+ }
+
+ public void setMinor( int minor )
+ {
+ this.minor = minor;
+ }
+
+ public int getBuild()
+ {
+ return build;
+ }
+
+ public void setBuild( int build )
+ {
+ this.build = build;
+ }
+
+ public int getRevision()
+ {
+ return revision;
+ }
+
+ public void setRevision( int revision )
+ {
+ this.revision = revision;
+ }
+
+ public boolean equals( Object o )
+ {
+ if ( this == o )
+ {
+ return true;
+ }
+ if ( o == null || getClass() != o.getClass() )
+ {
+ return false;
+ }
+
+ final Version version = (Version) o;
+
+ if ( build != version.build )
+ {
+ return false;
+ }
+ if ( major != version.major )
+ {
+ return false;
+ }
+ if ( minor != version.minor )
+ {
+ return false;
+ }
+ if ( revision != version.revision )
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ public int hashCode()
+ {
+ int result;
+ result = major;
+ result = 29 * result + minor;
+ result = 29 * result + build;
+ result = 29 * result + revision;
+ return result;
+ }
+
+}
Propchange: incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/Version.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/impl/NMavenRepositoryRegistryImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/impl/NMavenRepositoryRegistryImpl.java?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/impl/NMavenRepositoryRegistryImpl.java (added)
+++ incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/impl/NMavenRepositoryRegistryImpl.java Sun Dec 10 15:43:51 2006
@@ -0,0 +1,41 @@
+/*
+ * 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.impl;
+
+import org.apache.maven.dotnet.registry.RepositoryRegistry;
+import org.apache.maven.dotnet.NMavenRepositoryRegistry;
+
+import java.io.IOException;
+
+public class NMavenRepositoryRegistryImpl
+ implements NMavenRepositoryRegistry
+{
+
+ private RepositoryRegistry repositoryRegistry;
+
+ public RepositoryRegistry createRepositoryRegistry()
+ throws IOException
+ {
+ if ( repositoryRegistry.isEmpty() )
+ {
+ repositoryRegistry.loadFromResource( "/META-INF/nmaven/registry-config.xml", this.getClass() );
+ }
+ return repositoryRegistry;
+ }
+}
Propchange: incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/impl/NMavenRepositoryRegistryImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/nmaven/trunk/components/dotnet-core/src/main/resources/META-INF/nmaven/assembly-plugins.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-core/src/main/resources/META-INF/nmaven/assembly-plugins.xml?view=auto&rev=485313
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-core/src/main/resources/META-INF/nmaven/assembly-plugins.xml (added)
+++ incubator/nmaven/trunk/components/dotnet-core/src/main/resources/META-INF/nmaven/assembly-plugins.xml Sun Dec 10 15:43:51 2006
@@ -0,0 +1,26 @@
+<assemblyPlugins>
+ <assemblyPlugin>
+ <identifier>CS</identifier>
+ <pluginClass>org.apache.maven.dotnet.assembler.impl.DefaultAssemblyInfoMarshaller</pluginClass>
+ <language>C_SHARP</language>
+ <extension>cs</extension>
+ </assemblyPlugin>
+ <assemblyPlugin>
+ <identifier>VB</identifier>
+ <pluginClass>org.apache.maven.dotnet.assembler.impl.VBAssemblyInfoMarshaller</pluginClass>
+ <language>VB</language>
+ <extension>vb</extension>
+ </assemblyPlugin>
+ <assemblyPlugin>
+ <identifier>JAVA</identifier>
+ <pluginClass>org.apache.maven.dotnet.assembler.impl.JavaAssemblyInfoMarshaller</pluginClass>
+ <language>JAVA</language>
+ <extension>java</extension>
+ </assemblyPlugin>
+ <assemblyPlugin>
+ <identifier>NEM</identifier>
+ <pluginClass>org.apache.maven.dotnet.assembler.impl.DefaultAssemblyInfoMarshaller</pluginClass>
+ <language>NEMERLE</language>
+ <extension>n</extension>
+ </assemblyPlugin>
+</assemblyPlugins>
\ No newline at end of file
Propchange: incubator/nmaven/trunk/components/dotnet-core/src/main/resources/META-INF/nmaven/assembly-plugins.xml
------------------------------------------------------------------------------
svn:eol-style = native