Author: sisbell Date: Fri Dec 14 17:37:43 2007 New Revision: 604371 URL: http://svn.apache.org/viewvc?rev=604371&view=rev Log: Added integration tests and runner along the same lines as Maven core. Added plexus logging access for compiler context.
Added: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/resource/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/resource/META-INF/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/resource/META-INF/plexus/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/resource/META-INF/plexus/components.xml (with props) incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/pom.xml (with props) incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/src/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/src/test/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/src/test/java/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/src/test/java/org/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/src/test/java/org/apache/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/src/test/java/org/apache/maven/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/src/test/java/org/apache/maven/dotnet/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/src/test/java/org/apache/maven/dotnet/its/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/src/test/java/org/apache/maven/dotnet/its/Suite.java (with props) incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/ - copied from r603987, incubator/nmaven/branches/SI_MAVEN_INTEGRATION/integration-tests/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/pom.xml (with props) incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/java/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/java/org/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/java/org/apache/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/java/org/apache/maven/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/java/org/apache/maven/dotnet/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/IntegrationTestSuite.java (with props) incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0000CSharpCompile.java (with props) incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/resources/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/It0001.cs incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/pom.xml (with props) Removed: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/it0001/ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/integration-tests/ Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblerContext.java incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CommandExecutor.java incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerContext.java incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core/src/main/java/org/apache/maven/dotnet/ArtifactType.java incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/compiler/CSharpClassCompiler.java incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/pom.xml incubator/nmaven/branches/SI_MAVEN_INTEGRATION/maven-dotnet.iml incubator/nmaven/branches/SI_MAVEN_INTEGRATION/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java incubator/nmaven/branches/SI_MAVEN_INTEGRATION/plugins/maven-compiler-plugin/src/main/resources/META-INF/plexus/components.xml incubator/nmaven/branches/SI_MAVEN_INTEGRATION/pom.xml Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblerContext.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblerContext.java?rev=604371&r1=604370&r2=604371&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblerContext.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-assembler/src/main/java/org/apache/maven/dotnet/assembler/AssemblerContext.java Fri Dec 14 17:37:43 2007 @@ -23,8 +23,6 @@ /** * Provides services for generating of AssemblyInfo.* file. - * - * @author Shane Isbell */ public interface AssemblerContext { Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CommandExecutor.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CommandExecutor.java?rev=604371&r1=604370&r2=604371&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CommandExecutor.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CommandExecutor.java Fri Dec 14 17:37:43 2007 @@ -60,7 +60,7 @@ * @param commands the commands options for the compiler/executable * @param failsOnErrorOutput if true, throws an <code>ExecutionException</code> if there the compiler or executable * writes anything to the error output stream. By default, this value is true - * @throws org.apache.maven.dotnet.executable.ExecutionException if compiler or executable writes anything to the standard error stream (provided the + * @throws org.apache.maven.dotnet.cmpiler.CompilerException if compiler or executable writes anything to the standard error stream (provided the * failsOnErrorOutput is not false) or if the process returns a process result != 0. */ void executeCommand( String executable, List<String> commands, boolean failsOnErrorOutput ) Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerContext.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerContext.java?rev=604371&r1=604370&r2=604371&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerContext.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/CompilerContext.java Fri Dec 14 17:37:43 2007 @@ -20,6 +20,7 @@ import org.apache.maven.project.MavenProject; import org.apache.maven.dotnet.InitializationException; +import org.codehaus.plexus.logging.Logger; import java.io.IOException; @@ -29,6 +30,11 @@ public interface CompilerContext { /** + * Role used to register component implementations with the container. + */ + String ROLE = CompilerContext.class.getName(); + + /** * Returns the user provided configuration associated to this context. This is a live copy, so any changes to the * config will be reflected during compilation. * @@ -49,6 +55,8 @@ * @return the maven project used to initialize this context */ MavenProject getMavenProject(); + + Logger getPlexusLogger(); /** * Initializes the compiler context. Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java?rev=604371&r1=604370&r2=604371&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImpl.java Fri Dec 14 17:37:43 2007 @@ -39,10 +39,11 @@ import org.apache.maven.dotnet.compiler.CompilerAnnotation; import org.apache.maven.project.MavenProject; import org.codehaus.plexus.logging.Logger; +import org.codehaus.plexus.logging.LogEnabled; import org.codehaus.plexus.util.StringUtils; public final class DotnetCompilerContextImpl - implements DotnetCompilerContext + implements DotnetCompilerContext, LogEnabled { /** @@ -130,6 +131,16 @@ return project; } + public Logger getPlexusLogger() + { + return logger; + } + + public void enableLogging( Logger logger ) + { System.out.println("Enable logging."); + this.logger = logger; + } + public void init( MavenProject project, CompilerConfig compilerConfig ) throws InitializationException, IOException { @@ -337,7 +348,7 @@ : System.getenv( "MONO_ROOT" ); if ( monoRoot != null && !new File( monoRoot ).exists() ) { - //logger.warn( "MONO_ROOT has been incorrectly set. Trying /usr : MONO_ROOT = " + monoRoot ); + logger.warn( "MONO_ROOT has been incorrectly set. Trying /usr : MONO_ROOT = " + monoRoot ); } else if ( monoRoot != null ) { Added: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/resource/META-INF/plexus/components.xml URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/resource/META-INF/plexus/components.xml?rev=604371&view=auto ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/resource/META-INF/plexus/components.xml (added) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/resource/META-INF/plexus/components.xml Fri Dec 14 17:37:43 2007 @@ -0,0 +1,8 @@ +<component-set> + <components> + <component> + <role>org.apache.maven.dotnet.compiler.DotnetCompilerContext</role> + <implementation>org.apache.maven.dotnet.compiler.impl.DotnetCompilerContextImpl</implementation> + </component> + </components> +</component-set> Propchange: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-compiler/src/main/resource/META-INF/plexus/components.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/pom.xml URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/pom.xml?rev=604371&view=auto ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/pom.xml (added) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/pom.xml Fri Dec 14 17:37:43 2007 @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<project xmlns: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.15-incubating-SNAPSHOT</version> + <artifactId>maven-dotnet-components</artifactId> + </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.maven.dotnet</groupId> + <artifactId>maven-dotnet-core-it-runner</artifactId> + <name>maven-dotnet-core-it-runner</name> + <build> + <plugins> + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <version>2.3</version> + <configuration> + <includes> + <include>**/Suite.java</include> + </includes> + </configuration> + </plugin> + </plugins> + </build> + <dependencies> + <dependency> + <groupId>org.apache.maven.shared</groupId> + <artifactId>maven-verifier</artifactId> + <version>1.0</version> + </dependency> + <dependency> + <groupId>org.apache.maven.its</groupId> + <artifactId>maven-integration-test-helper</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.apache.maven.dotnet</groupId> + <artifactId>core-integration-tests</artifactId> + <version>${pom.version}</version> + <classifier>tests</classifier> + <scope>test</scope> + </dependency> + </dependencies> + <repositories> + <repository> + <id>apache.snapshots</id> + <url>http://people.apache.org/repo/m2-snapshot-repository</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + </repositories> +</project> Propchange: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/src/test/java/org/apache/maven/dotnet/its/Suite.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/src/test/java/org/apache/maven/dotnet/its/Suite.java?rev=604371&view=auto ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/src/test/java/org/apache/maven/dotnet/its/Suite.java (added) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/src/test/java/org/apache/maven/dotnet/its/Suite.java Fri Dec 14 17:37:43 2007 @@ -0,0 +1,16 @@ +package org.apache.maven.dotnet.its; + +import org.apache.maven.dotnet.integrationtests.IntegrationTestSuite; +import org.apache.maven.it.VerificationException; +import junit.framework.TestCase; +import junit.framework.Test; + +public class Suite + extends TestCase +{ + public static Test suite() + throws VerificationException + { + return IntegrationTestSuite.suite(); + } +} \ No newline at end of file Propchange: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core-it-runner/src/test/java/org/apache/maven/dotnet/its/Suite.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core/src/main/java/org/apache/maven/dotnet/ArtifactType.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core/src/main/java/org/apache/maven/dotnet/ArtifactType.java?rev=604371&r1=604370&r2=604371&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core/src/main/java/org/apache/maven/dotnet/ArtifactType.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-core/src/main/java/org/apache/maven/dotnet/ArtifactType.java Fri Dec 14 17:37:43 2007 @@ -20,7 +20,6 @@ /** * Enumeration of all the valid target types (module, library, winexe, exe, nar) for the .NET platform. - * */ public enum ArtifactType { Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/compiler/CSharpClassCompiler.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/compiler/CSharpClassCompiler.java?rev=604371&r1=604370&r2=604371&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/compiler/CSharpClassCompiler.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/maven-dotnet-extensions/src/main/java/org/apache/maven/dotnet/extensions/compiler/CSharpClassCompiler.java Fri Dec 14 17:37:43 2007 @@ -159,10 +159,11 @@ } - public File compile() throws InvalidArtifactException + public File compile() + throws InvalidArtifactException { CommandExecutor commandExecutor = CommandExecutor.Factory.createDefaultCommmandExecutor(); - //commandExecutor.setLogger( logger ); + commandExecutor.setLogger( compilerContext.getPlexusLogger() ); try { commandExecutor.executeCommand( getCompilerFileName(), getCommands() ); Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/pom.xml URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/pom.xml?rev=604371&r1=604370&r2=604371&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/pom.xml (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/components/pom.xml Fri Dec 14 17:37:43 2007 @@ -39,4 +39,12 @@ <module>maven-dotnet-compiler</module> <module>maven-dotnet-extensions</module> </modules> + <profiles> + <profile> + <id>run-its</id> + <modules> + <module>maven-dotnet-core-it-runner</module> + </modules> + </profile> + </profiles> </project> Added: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/pom.xml URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/pom.xml?rev=604371&view=auto ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/pom.xml (added) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/pom.xml Fri Dec 14 17:37:43 2007 @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<project xmlns: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.15-incubating-SNAPSHOT</version> + <artifactId>maven-dotnet-parent</artifactId> + </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.maven.dotnet</groupId> + <artifactId>core-integration-tests</artifactId> + <version>0.15-incubating-SNAPSHOT</version> + <name>integration-tests</name> + <url>http://incubator.apache.org/nmaven</url> + <description>NMaven provides Maven 2.x plugins to support building of .NET applications</description> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>test-jar</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + <dependencies> + <dependency> + <groupId>org.apache.maven.shared</groupId> + <artifactId>maven-verifier</artifactId> + <version>1.0</version> + </dependency> + <dependency> + <groupId>org.apache.maven.dotnet</groupId> + <artifactId>maven-dotnet-core</artifactId> + <version>${pom.version}</version> + </dependency> + <dependency> + <groupId>org.apache.maven.its</groupId> + <artifactId>maven-integration-test-helper</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + </dependencies> + <repositories> + <repository> + <id>apache.snapshots</id> + <url>http://people.apache.org/repo/m2-snapshot-repository</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + </repositories> +</project> \ No newline at end of file Propchange: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/IntegrationTestSuite.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/IntegrationTestSuite.java?rev=604371&view=auto ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/IntegrationTestSuite.java (added) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/IntegrationTestSuite.java Fri Dec 14 17:37:43 2007 @@ -0,0 +1,32 @@ +package org.apache.maven.dotnet.integrationtests; + +import junit.framework.Test; +import junit.framework.TestSuite; +import org.apache.maven.it.VerificationException; +import org.apache.maven.it.Verifier; + +import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase; + +public class IntegrationTestSuite + extends AbstractMavenIntegrationTestCase +{ + public static Test suite() throws VerificationException + { + Verifier verifier = null; + try + { + verifier = new Verifier( "" ); + } + finally + { + if ( verifier != null ) + { + verifier.resetStreams(); + } + } + + TestSuite suite = new TestSuite(); + suite.addTestSuite( MavenITmng0000CSharpCompile.class ); + return suite; + } +} Propchange: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/IntegrationTestSuite.java ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0000CSharpCompile.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0000CSharpCompile.java?rev=604371&view=auto ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0000CSharpCompile.java (added) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0000CSharpCompile.java Fri Dec 14 17:37:43 2007 @@ -0,0 +1,26 @@ +package org.apache.maven.dotnet.integrationtests; + +import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase; +import org.apache.maven.it.Verifier; +import org.apache.maven.it.util.ResourceExtractor; +import org.apache.maven.dotnet.BuildDirectories; + +import java.io.File; + +public class MavenITmng0000CSharpCompile + extends AbstractMavenIntegrationTestCase +{ + public void testit0000() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/MavenITmng-0000-CSharpCompile" ); + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.executeGoal( "install" ); + verifier.assertFilePresent( "target/" + BuildDirectories.BUILD_SOURCES.getBuildDirectoryName() + "/It0001.cs" ); + verifier.assertFilePresent( "target/comments.xml" ); + verifier.assertFilePresent( "target/NMaven.It.It0001-1.0.0.dll" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + } +} Propchange: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/java/org/apache/maven/dotnet/integrationtests/MavenITmng0000CSharpCompile.java ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/It0001.cs URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/It0001.cs?rev=604371&view=auto ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/It0001.cs (added) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/It0001.cs Fri Dec 14 17:37:43 2007 @@ -0,0 +1,8 @@ +namespace NMaven.IT { + +public class It0001 { + public static void Main () { + System.Console.Write("Hello World!"); + } +} +} Added: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/pom.xml URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/pom.xml?rev=604371&view=auto ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/pom.xml (added) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/pom.xml Fri Dec 14 17:37:43 2007 @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project> + <modelVersion>4.0.0</modelVersion> + <groupId>NMaven.Its</groupId> + <artifactId>NMaven.It.It0001</artifactId> + <packaging>library</packaging> + <version>1.0.0</version> + <name>NMaven.It.It0001</name> + <build> + <sourceDirectory>.</sourceDirectory> + <plugins> + <plugin> + <groupId>org.apache.maven.dotnet.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <extensions>true</extensions> + </plugin> + </plugins> + </build> +</project> Propchange: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/core-integration-tests/src/test/resources/MavenITmng-0000-CSharpCompile/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/maven-dotnet.iml URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/maven-dotnet.iml?rev=604371&r1=604370&r2=604371&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/maven-dotnet.iml (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/maven-dotnet.iml Fri Dec 14 17:37:43 2007 @@ -8,8 +8,10 @@ <sourceFolder url="file://$MODULE_DIR$/components/maven-dotnet-assembler/src/main/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/components/maven-dotnet-compiler/src/main/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/components/maven-dotnet-compiler/src/test/java" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/components/maven-dotnet-core-it-runner/src/test/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/components/maven-dotnet-core/src/main/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/components/maven-dotnet-extensions/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/core-integration-tests/src/test/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/plugins/maven-compiler-plugin/src/main/java" isTestSource="false" /> </content> <orderEntry type="inheritedJdk" /> @@ -407,15 +409,6 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$localRepository$/org/apache/maven/maven-embedder/2.1-SNAPSHOT/maven-embedder-2.1-SNAPSHOT.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> <root url="jar://$localRepository$/org/codehaus/plexus/plexus-classworlds/1.2-alpha-7/plexus-classworlds-1.2-alpha-7.jar!/" /> </CLASSES> <JAVADOC /> @@ -461,142 +454,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$localRepository$/info/aduna/aduna-iteration/1.1/aduna-iteration-1.1.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$localRepository$/org/openrdf/openrdf-rio-api/2.0-beta5/openrdf-rio-api-2.0-beta5.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$localRepository$/org/openrdf/openrdf-rio-rdfxml/2.0-beta5/openrdf-rio-rdfxml-2.0-beta5.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$localRepository$/org/openrdf/openrdf-model/2.0-beta5/openrdf-model-2.0-beta5.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$localRepository$/org/openrdf/openrdf-query/2.0-beta5/openrdf-query-2.0-beta5.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$localRepository$/org/openrdf/openrdf-queryalgebra-evaluation/2.0-beta5/openrdf-queryalgebra-evaluation-2.0-beta5.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$localRepository$/org/openrdf/openrdf-queryalgebra-model/2.0-beta5/openrdf-queryalgebra-model-2.0-beta5.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$localRepository$/org/openrdf/openrdf-queryparser-api/2.0-beta5/openrdf-queryparser-api-2.0-beta5.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$localRepository$/org/openrdf/openrdf-queryparser-serql/2.0-beta5/openrdf-queryparser-serql-2.0-beta5.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$localRepository$/org/openrdf/openrdf-queryparser-sparql/2.0-beta5/openrdf-queryparser-sparql-2.0-beta5.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$localRepository$/org/openrdf/openrdf-queryresultio-api/2.0-beta5/openrdf-queryresultio-api-2.0-beta5.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$localRepository$/org/openrdf/openrdf-repository-api/2.0-beta5/openrdf-repository-api-2.0-beta5.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$localRepository$/org/openrdf/openrdf-repository-sail/2.0-beta5/openrdf-repository-sail-2.0-beta5.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$localRepository$/org/openrdf/openrdf-sail-api/2.0-beta5/openrdf-sail-api-2.0-beta5.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$localRepository$/org/openrdf/openrdf-sail-inferencer/2.0-beta5/openrdf-sail-inferencer-2.0-beta5.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="jar://$localRepository$/org/openrdf/openrdf-sail-memory/2.0-beta5/openrdf-sail-memory-2.0-beta5.jar!/" /> + <root url="jar://$localRepository$/org/apache/maven/shared/maven-verifier/1.0/maven-verifier-1.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> @@ -605,7 +463,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$localRepository$/org/openrdf/openrdf-sail-nativerdf/2.0-beta5/openrdf-sail-nativerdf-2.0-beta5.jar!/" /> + <root url="jar://$localRepository$/org/apache/maven/its/maven-integration-test-helper/1.0-SNAPSHOT/maven-integration-test-helper-1.0-SNAPSHOT.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java?rev=604371&r1=604370&r2=604371&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/plugins/maven-compiler-plugin/src/main/java/org/apache/maven/dotnet/plugin/compiler/CompilerMojo.java Fri Dec 14 17:37:43 2007 @@ -101,6 +101,11 @@ */ private String vendor; + /** + * @component + */ + private DotnetCompilerContext compilerContext; + public void execute() throws MojoExecutionException, MojoFailureException { @@ -133,10 +138,10 @@ compilerConfig.setArtifactFileName( project.getBuild().getFinalName() + "." + compilerConfig.getArtifactType().getExtension() ); - DotnetCompilerContext ctx = new DotnetCompilerContextImpl(); + // DotnetCompilerContext compilerContext = new DotnetCompilerContextImpl(); try { - ctx.init( project, compilerConfig ); + compilerContext.init( project, compilerConfig ); } catch ( InitializationException e ) { @@ -148,7 +153,7 @@ } try { - project.getArtifact().setFile( ctx.getClassCompiler().compile() ); + project.getArtifact().setFile( compilerContext.getClassCompiler().compile() ); } catch ( InvalidArtifactException e ) { Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/plugins/maven-compiler-plugin/src/main/resources/META-INF/plexus/components.xml URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/plugins/maven-compiler-plugin/src/main/resources/META-INF/plexus/components.xml?rev=604371&r1=604370&r2=604371&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/plugins/maven-compiler-plugin/src/main/resources/META-INF/plexus/components.xml (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/plugins/maven-compiler-plugin/src/main/resources/META-INF/plexus/components.xml Fri Dec 14 17:37:43 2007 @@ -122,46 +122,8 @@ </configuration> </component> <component> - <role>org.apache.maven.dotnet.executable.CapabilityMatcher</role> - <implementation>org.apache.maven.dotnet.executable.impl.CapabilityMatcherImpl</implementation> - <requirements> - <requirement> - <role>org.apache.maven.dotnet.registry.RepositoryRegistry</role> - </requirement> - </requirements> + <role>org.apache.maven.dotnet.compiler.DotnetCompilerContext</role> + <implementation>org.apache.maven.dotnet.compiler.impl.DotnetCompilerContextImpl</implementation> </component> - <component> - <role>org.apache.maven.dotnet.vendor.VendorInfoRepository</role> - <implementation>org.apache.maven.dotnet.vendor.impl.VendorInfoRepositoryImpl</implementation> - <requirements> - <requirement> - <role>org.apache.maven.dotnet.registry.RepositoryRegistry</role> - </requirement> - </requirements> - </component> - <component> - <role>org.apache.maven.dotnet.vendor.StateMachineProcessor</role> - <implementation>org.apache.maven.dotnet.vendor.impl.StateMachineProcessorImpl</implementation> - <requirements> - <requirement> - <role>org.apache.maven.dotnet.vendor.VendorInfoRepository</role> - </requirement> - <requirement> - <role>org.apache.maven.dotnet.registry.RepositoryRegistry</role> - </requirement> - </requirements> - </component> - <component> - <role>org.apache.maven.dotnet.plugin.DotNetMojo</role> - <implementation>org.apache.maven.dotnet.plugin.AbstractMojo</implementation> - <requirements> - <requirement> - <role>org.apache.maven.dotnet.executable.NetExecutableFactory</role> - </requirement> - <requirement> - <role>org.apache.maven.dotnet.plugin.PluginContext</role> - </requirement> - </requirements> - </component> </components> </component-set> Modified: incubator/nmaven/branches/SI_MAVEN_INTEGRATION/pom.xml URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/pom.xml?rev=604371&r1=604370&r2=604371&view=diff ============================================================================== --- incubator/nmaven/branches/SI_MAVEN_INTEGRATION/pom.xml (original) +++ incubator/nmaven/branches/SI_MAVEN_INTEGRATION/pom.xml Fri Dec 14 17:37:43 2007 @@ -219,4 +219,12 @@ </dependency> </dependencies> </dependencyManagement> + <profiles> + <profile> + <id>run-its</id> + <modules> + <module>core-integration-tests</module> + </modules> + </profile> + </profiles> </project>