mirror of https://github.com/apache/maven.git
[MNG-2432] Apache and Mojo plugins take precendence over plugins in the pom.
o Added IT git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@751039 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
066b21daeb
commit
9dd3d69b55
|
@ -251,6 +251,7 @@ public class IntegrationTestSuite
|
||||||
suite.addTestSuite( MavenITmng2591MergeInheritedPluginConfigTest.class );
|
suite.addTestSuite( MavenITmng2591MergeInheritedPluginConfigTest.class );
|
||||||
suite.addTestSuite( MavenITmng2562TimestampTest.class );
|
suite.addTestSuite( MavenITmng2562TimestampTest.class );
|
||||||
suite.addTestSuite( MavenITmng2539PluginDependenciesComeFromPluginReposTest.class );
|
suite.addTestSuite( MavenITmng2539PluginDependenciesComeFromPluginReposTest.class );
|
||||||
|
suite.addTestSuite( MavenITmng2432PluginPrefixOrderTest.class );
|
||||||
suite.addTestSuite( MavenITmng2387InactiveProxyTest.class );
|
suite.addTestSuite( MavenITmng2387InactiveProxyTest.class );
|
||||||
suite.addTestSuite( MavenITmng2362DeployedPomEncodingTest.class );
|
suite.addTestSuite( MavenITmng2362DeployedPomEncodingTest.class );
|
||||||
suite.addTestSuite( MavenITmng2339BadProjectInterpolationTest.class );
|
suite.addTestSuite( MavenITmng2339BadProjectInterpolationTest.class );
|
||||||
|
|
|
@ -0,0 +1,67 @@
|
||||||
|
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 java.io.File;
|
||||||
|
|
||||||
|
import org.apache.maven.it.Verifier;
|
||||||
|
import org.apache.maven.it.util.ResourceExtractor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a test set for <a href="http://jira.codehaus.org/browse/MNG-2432">MNG-2432</a>
|
||||||
|
*
|
||||||
|
* @author Benjamin Bentmann
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
public class MavenITmng2432PluginPrefixOrderTest
|
||||||
|
extends AbstractMavenIntegrationTestCase
|
||||||
|
{
|
||||||
|
|
||||||
|
public MavenITmng2432PluginPrefixOrderTest()
|
||||||
|
{
|
||||||
|
super( "[3.0-alpha-2,)" );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Verify that when resolving plugin prefixes the plugins from the POM are searched before the plugin groups
|
||||||
|
* from the settings.
|
||||||
|
*/
|
||||||
|
public void testitMNG2432()
|
||||||
|
throws Exception
|
||||||
|
{
|
||||||
|
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2432" );
|
||||||
|
|
||||||
|
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||||
|
verifier.setAutoclean( false );
|
||||||
|
verifier.deleteDirectory( "target" );
|
||||||
|
verifier.deleteArtifacts( "org.apache.maven.its.mng2432.pom" );
|
||||||
|
verifier.deleteArtifacts( "org.apache.maven.its.mng2432.settings" );
|
||||||
|
verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() );
|
||||||
|
verifier.getCliOptions().add( "--settings" );
|
||||||
|
verifier.getCliOptions().add( "settings.xml" );
|
||||||
|
verifier.executeGoal( "it:touch" );
|
||||||
|
verifier.verifyErrorFreeLog();
|
||||||
|
verifier.resetStreams();
|
||||||
|
|
||||||
|
verifier.assertFileNotPresent( "target/touch-settings.txt" );
|
||||||
|
verifier.assertFilePresent( "target/touch-pom.txt" );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,47 @@
|
||||||
|
<?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.mng2432</groupId>
|
||||||
|
<artifactId>test</artifactId>
|
||||||
|
<version>0.1</version>
|
||||||
|
|
||||||
|
<name>Maven Integration Test :: MNG-2432</name>
|
||||||
|
<description>
|
||||||
|
Verify that when resolving plugin prefixes the plugins from the POM are searched before the plugin groups
|
||||||
|
from the settings.
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.its.mng2432.pom</groupId>
|
||||||
|
<artifactId>it-maven-plugin</artifactId>
|
||||||
|
<version>0.1</version>
|
||||||
|
<configuration>
|
||||||
|
<outputFile>target/touch-pom.txt</outputFile>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
Binary file not shown.
|
@ -0,0 +1,69 @@
|
||||||
|
<?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 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>
|
||||||
|
|
||||||
|
<groupId>org.apache.maven.its.mng2432.pom</groupId>
|
||||||
|
<artifactId>it-maven-plugin</artifactId>
|
||||||
|
<version>0.1</version>
|
||||||
|
<packaging>maven-plugin</packaging>
|
||||||
|
|
||||||
|
<name>Maven Integration Test Plugin :: Touch</name>
|
||||||
|
<description>
|
||||||
|
A test plugin that creates an empty file.
|
||||||
|
</description>
|
||||||
|
<inceptionYear>2009</inceptionYear>
|
||||||
|
|
||||||
|
<distributionManagement>
|
||||||
|
<repository>
|
||||||
|
<id>maven-core-it</id>
|
||||||
|
<url>file:///${basedir}/repo</url>
|
||||||
|
</repository>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.test.skip>true</maven.test.skip>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>maven-plugin-api</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>.</directory>
|
||||||
|
<includes>
|
||||||
|
<include>pom.xml</include>
|
||||||
|
<include>src/**</include>
|
||||||
|
</includes>
|
||||||
|
</resource>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</build>
|
||||||
|
</project>
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<metadata>
|
||||||
|
<groupId>org.apache.maven.its.mng2432.pom</groupId>
|
||||||
|
<artifactId>it-maven-plugin</artifactId>
|
||||||
|
<version>0.1</version>
|
||||||
|
<versioning>
|
||||||
|
<latest>0.1</latest>
|
||||||
|
<release>0.1</release>
|
||||||
|
<versions>
|
||||||
|
<version>0.1</version>
|
||||||
|
</versions>
|
||||||
|
<lastUpdated>20090306185323</lastUpdated>
|
||||||
|
</versioning>
|
||||||
|
</metadata>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<metadata>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<name>Maven Integration Test Plugin :: Touch</name>
|
||||||
|
<prefix>it</prefix>
|
||||||
|
<artifactId>it-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</metadata>
|
Binary file not shown.
|
@ -0,0 +1,69 @@
|
||||||
|
<?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 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>
|
||||||
|
|
||||||
|
<groupId>org.apache.maven.its.mng2432.settings</groupId>
|
||||||
|
<artifactId>it-maven-plugin</artifactId>
|
||||||
|
<version>0.1</version>
|
||||||
|
<packaging>maven-plugin</packaging>
|
||||||
|
|
||||||
|
<name>Maven Integration Test Plugin :: Touch</name>
|
||||||
|
<description>
|
||||||
|
A test plugin that creates an empty file.
|
||||||
|
</description>
|
||||||
|
<inceptionYear>2009</inceptionYear>
|
||||||
|
|
||||||
|
<distributionManagement>
|
||||||
|
<repository>
|
||||||
|
<id>maven-core-it</id>
|
||||||
|
<url>file:///${basedir}/repo</url>
|
||||||
|
</repository>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.test.skip>true</maven.test.skip>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>maven-plugin-api</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>.</directory>
|
||||||
|
<includes>
|
||||||
|
<include>pom.xml</include>
|
||||||
|
<include>src/**</include>
|
||||||
|
</includes>
|
||||||
|
</resource>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</build>
|
||||||
|
</project>
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<metadata>
|
||||||
|
<groupId>org.apache.maven.its.mng2432.settings</groupId>
|
||||||
|
<artifactId>it-maven-plugin</artifactId>
|
||||||
|
<version>0.1</version>
|
||||||
|
<versioning>
|
||||||
|
<latest>0.1</latest>
|
||||||
|
<release>0.1</release>
|
||||||
|
<versions>
|
||||||
|
<version>0.1</version>
|
||||||
|
</versions>
|
||||||
|
<lastUpdated>20090306185422</lastUpdated>
|
||||||
|
</versioning>
|
||||||
|
</metadata>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<metadata>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<name>Maven Integration Test Plugin :: Touch</name>
|
||||||
|
<prefix>it</prefix>
|
||||||
|
<artifactId>it-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</metadata>
|
|
@ -0,0 +1,58 @@
|
||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<settings>
|
||||||
|
<pluginGroups>
|
||||||
|
<pluginGroup>org.apache.maven.its.mng2432.settings</pluginGroup>
|
||||||
|
</pluginGroups>
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>maven-core-it-repo</id>
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>maven-core-it</id>
|
||||||
|
<url>@baseurl@/repo</url>
|
||||||
|
<releases>
|
||||||
|
<checksumPolicy>ignore</checksumPolicy>
|
||||||
|
</releases>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
<pluginRepositories>
|
||||||
|
<pluginRepository>
|
||||||
|
<id>maven-core-it</id>
|
||||||
|
<url>@baseurl@/repo</url>
|
||||||
|
<releases>
|
||||||
|
<checksumPolicy>ignore</checksumPolicy>
|
||||||
|
</releases>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</pluginRepository>
|
||||||
|
</pluginRepositories>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
<activeProfiles>
|
||||||
|
<activeProfile>maven-core-it-repo</activeProfile>
|
||||||
|
</activeProfiles>
|
||||||
|
</settings>
|
Loading…
Reference in New Issue