o Deleted it0088 for MNG-1927 which is superseded by more complete IT for MNG-3475

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@721566 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2008-11-28 21:47:05 +00:00
parent db27237bf8
commit 9375731fd4
5 changed files with 0 additions and 170 deletions

View File

@ -222,7 +222,6 @@ public static Test suite()
suite.addTestSuite( MavenIT0097Test.class );
suite.addTestSuite( MavenIT0092Test.class );
suite.addTestSuite( MavenIT0090Test.class );
suite.addTestSuite( MavenIT0088Test.class );
suite.addTestSuite( MavenIT0087Test.class );
suite.addTestSuite( MavenIT0086Test.class );
suite.addTestSuite( MavenIT0085Test.class );

View File

@ -1,47 +0,0 @@
package org.apache.maven.it;
/*
* 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.
*/
import org.apache.maven.it.Verifier;
import org.apache.maven.it.util.ResourceExtractor;
import java.io.File;
public class MavenIT0088Test
extends AbstractMavenIntegrationTestCase
{
/**
* Test path translation.
*/
public void testit0088()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0088" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.executeGoal( "test" );
verifier.assertFilePresent( "target/classes/test.properties" );
verifier.assertFilePresent( "target/mojo-generated.properties" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
}
}

View File

@ -1,63 +0,0 @@
<project>
<modelVersion>4.0.0</modelVersion>
<name>Maven Integration Test :: it0088</name>
<groupId>org.apache.maven.its.it0088</groupId>
<artifactId>maven-it-it0088</artifactId>
<description>Test path translation.</description>
<version>1.0</version>
<repositories>
<repository>
<id>test-plugins</id>
<url>http://people.apache.org/repo/m2-snapshot-repository/</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>test-plugins</id>
<url>http://people.apache.org/repo/m2-snapshot-repository/</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<type>jar</type>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-generate-properties</artifactId>
<version>2.1-SNAPSHOT</version>
<executions>
<execution>
<phase>process-resources</phase>
<configuration>
<projectBuildDirectory>${project.build.directory}</projectBuildDirectory>
<targetDirectoryString>target</targetDirectoryString>
<targetDirectoryFile>target</targetDirectoryFile>
</configuration>
<goals>
<goal>generate-properties</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1 +0,0 @@
project.build.directory = ${project.build.directory}

View File

@ -1,58 +0,0 @@
package org.apache.maven.it0088;
import junit.framework.TestCase;
import java.util.Properties;
import java.io.File;
import java.io.FileInputStream;
public class PomInterpolationTest
extends TestCase
{
private String basedir;
protected void setUp()
throws Exception
{
basedir = System.getProperty( "basedir" );
}
public void testProjectBuildDirectoryAfterResourceFiltering()
throws Exception
{
Properties testProperties = new Properties();
File testPropertiesFile = new File( basedir, "target/classes/test.properties" );
assertTrue( testPropertiesFile.exists() );
testProperties.load( new FileInputStream( testPropertiesFile ) );
File projectBuildDirectory = new File( basedir, "target" );
assertEquals( normalize( projectBuildDirectory.getAbsolutePath() ), normalize( testProperties.getProperty( "project.build.directory" ) ) );
}
public void testProjectBuildDirectoryForMojoExecution()
throws Exception
{
Properties testProperties = new Properties();
File testPropertiesFile = new File( basedir, "target/mojo-generated.properties" );
assertTrue( testPropertiesFile.exists() );
testProperties.load( new FileInputStream( testPropertiesFile ) );
File projectBuildDirectory = new File( basedir, "target" );
assertEquals( normalize( projectBuildDirectory.getAbsolutePath() ), normalize( testProperties.getProperty( "project.build.directory" ) ) );
assertEquals( normalize( projectBuildDirectory.getAbsolutePath() ), normalize( testProperties.getProperty( "targetDirectoryFile" ) ) );
assertEquals( "target", testProperties.getProperty( "targetDirectoryString" ) );
}
private String normalize( String src )
{
return src.replace( '/', File.separatorChar ).replace( '\\', File.separatorChar );
}
}