1
0
mirror of https://github.com/apache/maven.git synced 2025-02-25 11:55:58 +00:00

o Decoupled it0021 from production plugins

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@731947 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-01-06 14:20:04 +00:00
parent 21e276b35d
commit d0d75c4d0f
9 changed files with 181 additions and 43 deletions
its/core-it-suite/src/test
java/org/apache/maven/it
resources/it0021
pom.xml
repo/org/apache/maven/its/it0021
src/main/java/org/apache/maven/it0021

@ -23,7 +23,6 @@
import org.apache.maven.it.util.ResourceExtractor;
import java.io.File;
import java.util.Properties;
public class MavenIT0021Test
extends AbstractMavenIntegrationTestCase
@ -37,16 +36,18 @@ public void testit0021()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0021" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.deleteArtifact( "org.apache.maven", "maven-core-it-support", "1.0", "jar" );
Properties systemProperties = new Properties();
systemProperties.put( "includeProfile", "true" );
verifier.setSystemProperties( systemProperties );
verifier.executeGoal( "compile" );
verifier.assertArtifactPresent( "org.apache.maven", "maven-core-it-support", "1.0", "jar" );
verifier.setAutoclean( false );
verifier.deleteArtifacts( "org.apache.maven.its.it0021" );
verifier.getSystemProperties().setProperty( "includeProfile", "true" );
verifier.getCliOptions().add( "-Pprofile-2" );
verifier.executeGoal( "validate" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
verifier.assertArtifactPresent( "org.apache.maven.its.it0021", "a", "0.1", "jar" );
verifier.assertArtifactPresent( "org.apache.maven.its.it0021", "b", "0.1", "jar" );
}
}
}

@ -1,37 +1,94 @@
<?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>
<modelVersion>4.0.0</modelVersion>
<name>Maven Integration Test :: it0021</name>
<groupId>org.apache.maven.its.it0021</groupId>
<artifactId>maven-it-it0021</artifactId>
<description>Test pom-level profile inclusion (this one is activated by system
property).</description>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Maven Integration Test :: it0021</name>
<description>
Test pom-level profile inclusion (this one is activated by system property).
</description>
<repositories>
<repository>
<id>maven-core-it</id>
<url>file:///${basedir}/repo</url>
<releases>
<checksumPolicy>ignore</checksumPolicy>
</releases>
<snapshots>
<checksumPolicy>ignore</checksumPolicy>
</snapshots>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-dependency-resolution</artifactId>
<version>2.1-SNAPSHOT</version>
<executions>
<execution>
<id>test</id>
<phase>validate</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>test-profile</id>
<id>profile-1</id>
<activation>
<property>
<name>includeProfile</name>
</property>
</activation>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core-it-support</artifactId>
<version>1.0</version>
<groupId>org.apache.maven.its.it0021</groupId>
<artifactId>a</artifactId>
<version>0.1</version>
</dependency>
</dependencies>
</profile>
<profile>
<id>profile-2</id>
<!-- to be activated explicitly on the CLI by its id -->
<dependencies>
<dependency>
<groupId>org.apache.maven.its.it0021</groupId>
<artifactId>b</artifactId>
<version>0.1</version>
</dependency>
</dependencies>
</profile>
</profiles>
<distributionManagement>
<repository>
<id>central</id>
<name>Test Repository</name>
<url>file:/tmp/testRepo</url>
</repository>
</distributionManagement>
</project>

@ -0,0 +1,36 @@
<?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>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its.it0021</groupId>
<artifactId>a</artifactId>
<version>0.1</version>
<packaging>jar</packaging>
<distributionManagement>
<repository>
<id>maven-core-it</id>
<url>file:///${basedir}/repo</url>
</repository>
</distributionManagement>
</project>

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>org.apache.maven.its.it0021</groupId>
<artifactId>a</artifactId>
<version>0.1</version>
<versioning>
<release>0.1</release>
<versions>
<version>0.1</version>
</versions>
<lastUpdated>20090106132946</lastUpdated>
</versioning>
</metadata>

@ -0,0 +1,36 @@
<?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>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its.it0021</groupId>
<artifactId>b</artifactId>
<version>0.1</version>
<packaging>jar</packaging>
<distributionManagement>
<repository>
<id>maven-core-it</id>
<url>file:///${basedir}/repo</url>
</repository>
</distributionManagement>
</project>

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>org.apache.maven.its.it0021</groupId>
<artifactId>b</artifactId>
<version>0.1</version>
<versioning>
<release>0.1</release>
<versions>
<version>0.1</version>
</versions>
<lastUpdated>20090106141033</lastUpdated>
</versioning>
</metadata>

@ -1,16 +0,0 @@
package org.apache.maven.it0021;
public class Person
{
private String name;
public void setName( String name )
{
this.name = name;
}
public String getName()
{
return name;
}
}