| package org.apache.maven.integrationtests; |
| |
| import org.apache.maven.it.Verifier; |
| import org.apache.maven.it.util.ResourceExtractor; |
| |
| import java.io.File; |
| import java.util.Properties; |
| |
| public class MavenIT0021Test |
| extends AbstractMavenIntegrationTestCase |
| { |
| |
| /** |
| * Test pom-level profile inclusion (this one is activated by system |
| * property). |
| */ |
| 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.verifyErrorFreeLog(); |
| verifier.resetStreams(); |
| |
| } |
| } |
| |