diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java b/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java index cb6fd22bd6..aec6e7aaf9 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java @@ -81,6 +81,7 @@ MavenITmng3415JunkRepositoryMetadataTest MavenITmng3645POMSyntaxErrorTest */ + suite.addTestSuite( MavenITmng3796Test.class ); suite.addTestSuite( MavenITmng3748BadSettingsXmlTest.class ); suite.addTestSuite( MavenITmng3747PrefixedPathExpressionTest.class ); suite.addTestSuite( MavenITmng3746POMPropertyOverrideTest.class ); diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3796Test.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3796Test.java new file mode 100644 index 0000000000..9340dbd5f3 --- /dev/null +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3796Test.java @@ -0,0 +1,59 @@ +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; +import java.util.Properties; + +/** + * This is a test set for MNG-3796. + * + * @author Benjamin Bentmann + * @version $Id$ + */ +public class MavenITmng3796Test + extends AbstractMavenIntegrationTestCase +{ + + /** + * Verify that classes shared with the Maven core realm are properly imported into the plugin realm. + */ + public void testitMNG3796() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3796" ); + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); + verifier.deleteDirectory( "target" ); + verifier.executeGoal( "validate" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + Properties pclProps = verifier.loadProperties( "target/pcl.properties" ); + assertNotNull( pclProps.getProperty( "org.codehaus.plexus.util.xml.Xpp3Dom" ) ); + + Properties tcclProps = verifier.loadProperties( "target/tccl.properties" ); + assertEquals( pclProps, tcclProps ); + } + +} diff --git a/its/core-it-suite/src/test/resources/mng-3796/pom.xml b/its/core-it-suite/src/test/resources/mng-3796/pom.xml new file mode 100644 index 0000000000..1a088e3c9c --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-3796/pom.xml @@ -0,0 +1,57 @@ + + + + + + 4.0.0 + + org.apache.maven.its.mng3796 + project + 1.0 + + Maven Integration Test :: MNG-3796 + + Verify that classes shared with the Maven core realm are properly imported into the plugin realm. + + + + + + org.apache.maven.its.plugins + maven-it-plugin-class-loader + 2.1-SNAPSHOT + + + load + validate + + org.codehaus.plexus.util.xml.Xpp3Dom + target/pcl.properties + target/tccl.properties + + + load + + + + + + +