mirror of https://github.com/apache/maven.git
o Fixed it0104 which previously didn't check the plugin configuration at all
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@712531 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aef1cc35f5
commit
d2cdff8db2
|
@ -23,6 +23,7 @@ import org.apache.maven.it.Verifier;
|
||||||
import org.apache.maven.it.util.ResourceExtractor;
|
import org.apache.maven.it.util.ResourceExtractor;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
public class MavenIT0104Test
|
public class MavenIT0104Test
|
||||||
extends AbstractMavenIntegrationTestCase
|
extends AbstractMavenIntegrationTestCase
|
||||||
|
@ -36,10 +37,22 @@ public class MavenIT0104Test
|
||||||
{
|
{
|
||||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0104" );
|
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0104" );
|
||||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||||
verifier.executeGoal( "test" );
|
verifier.setAutoclean( false );
|
||||||
|
verifier.deleteDirectory( "target" );
|
||||||
|
verifier.executeGoal( "validate" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
}
|
Properties props = verifier.loadProperties( "target/config.properties" );
|
||||||
|
assertEquals( new File( testDir, "target" ), new File( props.getProperty( "stringParam" ) ) );
|
||||||
|
assertEquals( "4.0.0", props.getProperty( "domParam.children.modelVersion.0.value" ) );
|
||||||
|
assertEquals( "org.apache.maven.its.it0104", props.getProperty( "domParam.children.groupId.0.value" ) );
|
||||||
|
assertEquals( "1.0-SNAPSHOT", props.getProperty( "domParam.children.version.0.value" ) );
|
||||||
|
assertEquals( "jar", props.getProperty( "domParam.children.packaging.0.value" ) );
|
||||||
|
assertEquals( "http://maven.apache.org", props.getProperty( "domParam.children.url.0.value" ) );
|
||||||
|
assertEquals( "Apache", props.getProperty( "domParam.children.organization.0.children.name.0.value" ) );
|
||||||
|
assertEquals( new File( testDir, "target" ), new File( props.getProperty( "domParam.children.build.0.children.directory.0.value" ) ) );
|
||||||
|
assertEquals( new File( testDir, "target/classes" ), new File( props.getProperty( "domParam.children.build.0.children.outputDirectory.0.value" ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -1,45 +1,42 @@
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
|
<!--
|
||||||
|
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="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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<name>Maven Integration Test :: it0104</name>
|
|
||||||
<groupId>org.apache.maven.its.it0104</groupId>
|
<groupId>org.apache.maven.its.it0104</groupId>
|
||||||
<artifactId>maven-it-it0104</artifactId>
|
<artifactId>test</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>Maven Integration Test :: it0104</name>
|
||||||
<description>
|
<description>
|
||||||
Verify that plugin configurations are interpolated correctly.
|
Verify that plugin configurations are interpolated correctly.
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<organization>
|
<organization>
|
||||||
<name>Apache</name>
|
<name>Apache</name>
|
||||||
</organization>
|
</organization>
|
||||||
<packaging>jar</packaging>
|
|
||||||
<version>1.0-SNAPSHOT</version>
|
|
||||||
<url>http://maven.apache.org</url>
|
<url>http://maven.apache.org</url>
|
||||||
|
|
||||||
<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>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
@ -48,8 +45,9 @@
|
||||||
<artifactId>maven-it-plugin-configuration</artifactId>
|
<artifactId>maven-it-plugin-configuration</artifactId>
|
||||||
<version>2.1-SNAPSHOT</version>
|
<version>2.1-SNAPSHOT</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<directory>${project.build.directory}</directory>
|
<propertiesFile>${project.build.directory}/config.properties</propertiesFile>
|
||||||
<dom>
|
<stringParam>${project.build.directory}</stringParam>
|
||||||
|
<domParam>
|
||||||
<basedir>${basedir}</basedir>
|
<basedir>${basedir}</basedir>
|
||||||
<modelVersion>${project.modelVersion}</modelVersion>
|
<modelVersion>${project.modelVersion}</modelVersion>
|
||||||
<name>${project.name}</name>
|
<name>${project.name}</name>
|
||||||
|
@ -65,7 +63,7 @@
|
||||||
<directory>${project.build.directory}</directory>
|
<directory>${project.build.directory}</directory>
|
||||||
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
|
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
|
||||||
</build>
|
</build>
|
||||||
</dom>
|
</domParam>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
package org.apache.maven.it;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Hello world!
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class App
|
|
||||||
{
|
|
||||||
public static void main( String[] args )
|
|
||||||
{
|
|
||||||
System.out.println( "Hello World!" );
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue