From nmaven-commits-return-737-apmail-incubator-nmaven-commits-archive=incubator.apache.org@incubator.apache.org Mon Feb 11 06:16:13 2008 Return-Path: Delivered-To: apmail-incubator-nmaven-commits-archive@locus.apache.org Received: (qmail 77029 invoked from network); 11 Feb 2008 06:16:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Feb 2008 06:16:13 -0000 Received: (qmail 67908 invoked by uid 500); 11 Feb 2008 06:16:06 -0000 Delivered-To: apmail-incubator-nmaven-commits-archive@incubator.apache.org Received: (qmail 67874 invoked by uid 500); 11 Feb 2008 06:16:06 -0000 Mailing-List: contact nmaven-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: nmaven-dev@incubator.apache.org Delivered-To: mailing list nmaven-commits@incubator.apache.org Received: (qmail 67865 invoked by uid 99); 11 Feb 2008 06:16:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Feb 2008 22:16:06 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Feb 2008 06:15:29 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B94161A9832; Sun, 10 Feb 2008 22:15:48 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r620426 - in /incubator/nmaven/trunk: components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/ components/maven-dotnet-core/src/main/java/org/apache/maven/dotnet/ plugins/maven-dotnet-compiler-plugin/src/main/ja... Date: Mon, 11 Feb 2008 06:15:48 -0000 To: nmaven-commits@incubator.apache.org From: eworley@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080211061548.B94161A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: eworley Date: Sun Feb 10 22:15:47 2008 New Revision: 620426 URL: http://svn.apache.org/viewvc?rev=620426&view=rev Log: Adding backwards compatibility by supporting "library" packaging type. Also fixed code that assumes .net types have a ":" in the package name. Used dotnet:library as a model for supporting "library" type. Modified: incubator/nmaven/trunk/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java incubator/nmaven/trunk/components/maven-dotnet-core/src/main/java/org/apache/maven/dotnet/ArtifactType.java incubator/nmaven/trunk/plugins/maven-dotnet-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java incubator/nmaven/trunk/plugins/maven-dotnet-compiler-plugin/src/main/resources/META-INF/plexus/components.xml Modified: incubator/nmaven/trunk/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java?rev=620426&r1=620425&r2=620426&view=diff ============================================================================== --- incubator/nmaven/trunk/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java (original) +++ incubator/nmaven/trunk/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java Sun Feb 10 22:15:47 2008 @@ -276,7 +276,8 @@ { String type = artifact.getType(); if ( ArtifactType.LIBRARY.isMatchByString( type ) || ArtifactType.EXE.isMatchByString( type ) || - ArtifactType.WINEXE.isMatchByString( type ) || type.startsWith( "dotnet:gac" ) ) + ArtifactType.WINEXE.isMatchByString( type ) || type.startsWith( "dotnet:gac" ) || + ArtifactType.LIBRARY_LEGACY.isMatchByString( type )) { targetArtifacts.add( artifact ); } Modified: incubator/nmaven/trunk/components/maven-dotnet-core/src/main/java/org/apache/maven/dotnet/ArtifactType.java URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/maven-dotnet-core/src/main/java/org/apache/maven/dotnet/ArtifactType.java?rev=620426&r1=620425&r2=620426&view=diff ============================================================================== --- incubator/nmaven/trunk/components/maven-dotnet-core/src/main/java/org/apache/maven/dotnet/ArtifactType.java (original) +++ incubator/nmaven/trunk/components/maven-dotnet-core/src/main/java/org/apache/maven/dotnet/ArtifactType.java Sun Feb 10 22:15:47 2008 @@ -29,6 +29,7 @@ GAC_GENERIC( "dotnet:gac_generic", "library", "dll" ), GAC_MSIL( "dotnet:gac_msil", "library", "dll" ), LIBRARY( "dotnet:library", "library", "dll" ), + LIBRARY_LEGACY( "library", "library", "dll" ), MODULE( "dotnet:module", "module", "netmodule" ), WINEXE( "dotnet:winexe", "winexe", "exe" ), NULL( "null", "null", "null" ); Modified: incubator/nmaven/trunk/plugins/maven-dotnet-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-dotnet-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java?rev=620426&r1=620425&r2=620426&view=diff ============================================================================== --- incubator/nmaven/trunk/plugins/maven-dotnet-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java (original) +++ incubator/nmaven/trunk/plugins/maven-dotnet-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java Sun Feb 10 22:15:47 2008 @@ -129,8 +129,15 @@ getLog().info( ".NET Vendor: " + vendor ); DotnetCompilerConfig compilerConfig = DotnetCompilerConfig.Factory.createDefaultCompilerConfig(); - compilerConfig.setArtifactType( - ArtifactType.valueOf( project.getPackaging().split( "[:]" )[1].toUpperCase() ) ); + String packaging = project.getPackaging(); + + // If this is a dotnet type, remove the "dotnet:" portion + if ( packaging.contains( ":" ) ) + { + packaging = packaging.split( "[:]" )[1]; + } + + compilerConfig.setArtifactType( ArtifactType.valueOf( packaging.toUpperCase() ) ); compilerConfig.setCompilerPlatformVersion( DotnetCompilerPlatformVersion.valueFromVersion( frameworkVersion ) ); KeyInfo keyInfo = KeyInfo.Factory.createDefaultKeyInfo(); Modified: incubator/nmaven/trunk/plugins/maven-dotnet-compiler-plugin/src/main/resources/META-INF/plexus/components.xml URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-dotnet-compiler-plugin/src/main/resources/META-INF/plexus/components.xml?rev=620426&r1=620425&r2=620426&view=diff ============================================================================== --- incubator/nmaven/trunk/plugins/maven-dotnet-compiler-plugin/src/main/resources/META-INF/plexus/components.xml (original) +++ incubator/nmaven/trunk/plugins/maven-dotnet-compiler-plugin/src/main/resources/META-INF/plexus/components.xml Sun Feb 10 22:15:47 2008 @@ -1,6 +1,6 @@ - + org.apache.maven.lifecycle.mapping.LifecycleMapping dotnet:library @@ -36,6 +36,42 @@ + + + org.apache.maven.lifecycle.mapping.LifecycleMapping + library + + org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping + + + + + org.apache.maven.dotnet.plugins:maven-dotnet-compiler-plugin:generate-assembly-info + + + org.apache.maven.dotnet.plugins:maven-dotnet-compiler-plugin:process-sources + + + org.apache.maven.dotnet.plugins:maven-dotnet-compiler-plugin:process-test-sources + + + org.apache.maven.dotnet.plugins:maven-dotnet-compiler-plugin:compile + + + org.apache.maven.dotnet.plugins:maven-dotnet-compiler-plugin:test-compile + + + org.apache.maven.dotnet.plugins:maven-dotnet-test-plugin:test + + + org.apache.maven.plugins:maven-install-plugin:install + + + org.apache.maven.plugins:maven-deploy-plugin:deploy + + + + org.apache.maven.lifecycle.mapping.LifecycleMapping dotnet:exe @@ -147,6 +183,17 @@ dll dotnet:library + true + + + + + org.apache.maven.artifact.handler.ArtifactHandler + library + org.apache.maven.artifact.handler.DefaultArtifactHandler + + dll + library true