[MNG-1493] Adding integration test verifying that modules specifying alternative pom-file names are allowed, in addition to the older-style module specs where only the dir name was referenced, and a 'pom.xml' file was expected within.

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@618782 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2008-02-05 21:29:50 +00:00
parent 56cf0a4bf7
commit 1e96cc746a
5 changed files with 56 additions and 0 deletions

View File

@ -189,6 +189,7 @@ public class IntegrationTestSuite
suite.addTestSuite( MavenITmng3372DirectInvocationOfPlugins.class );
suite.addTestSuite( MavenITmng3099SettingsProfilesWithNoPOM.class );
suite.addTestSuite( MavenITmng3331ModulePathNormalization.class );
suite.addTestSuite( MavenITmng1493NonStandardModulePomNames.class );
// suite.addTestSuite( MavenIT0120EjbClientDependency.class ); -- not passing for 2.0.7 either, looks to be 2.1+ ?
return suite;
}

View File

@ -0,0 +1,36 @@
package org.apache.maven.integrationtests;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase;
import org.apache.maven.it.Verifier;
import org.apache.maven.it.util.ResourceExtractor;
public class MavenITmng1493NonStandardModulePomNames
extends AbstractMavenIntegrationTestCase
{
public void testitMNG1493 ()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-1493-nonstandardModulePomNames" );
Verifier verifier;
verifier = new Verifier( testDir.getAbsolutePath() );
verifier.executeGoal( "initialize" );
/*
* This is the simplest way to check a build
* succeeded. It is also the simplest way to create
* an IT test: make the build pass when the test
* should pass, and make the build fail when the
* test should fail. There are other methods
* supported by the verifier. They can be seen here:
* http://maven.apache.org/shared/maven-verifier/apidocs/index.html
*/
verifier.verifyErrorFreeLog();
}
}

View File

@ -0,0 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its.itsample</groupId>
<artifactId>module</artifactId>
<packaging>pom</packaging>
<version>1</version>
</project>

View File

@ -0,0 +1,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its.mng1493</groupId>
<artifactId>parent</artifactId>
<packaging>pom</packaging>
<version>1</version>
<modules>
<module>module/pom-unusual.xml</module>
</modules>
</project>

View File

@ -0,0 +1 @@
Checks that non-standard module-pom filenames can be referenced by file within a <modules/> section, rather than depending on using the directory name with the normal 'pom.xml' as an implied POM filename.