mirror of https://github.com/apache/maven.git
o Created UT for MNG-3864
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@737066 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
04a020ea5a
commit
2e4285f616
|
@ -492,6 +492,34 @@ public class PomConstructionTest
|
|||
}
|
||||
//*/
|
||||
|
||||
public void testOrderOfPluginExecutionConfigurationElementsWithoutPluginManagement()
|
||||
throws Exception
|
||||
{
|
||||
PomTestWrapper pom = buildPom( "plugin-exec-config-order/wo-plugin-mngt" );
|
||||
String prefix = "build/plugins[1]/executions[1]/configuration/";
|
||||
assertEquals( "one", pom.getValue( prefix + "stringParams/stringParam[1]" ) );
|
||||
assertEquals( "two", pom.getValue( prefix + "stringParams/stringParam[2]" ) );
|
||||
assertEquals( "three", pom.getValue( prefix + "stringParams/stringParam[3]" ) );
|
||||
assertEquals( "four", pom.getValue( prefix + "stringParams/stringParam[4]" ) );
|
||||
assertEquals( "key1", pom.getValue( prefix + "propertiesParam/property[1]/name" ) );
|
||||
assertEquals( "key2", pom.getValue( prefix + "propertiesParam/property[2]/name" ) );
|
||||
}
|
||||
|
||||
/* FIXME: cf. MNG-3864
|
||||
public void testOrderOfPluginExecutionConfigurationElementsWithPluginManagement()
|
||||
throws Exception
|
||||
{
|
||||
PomTestWrapper pom = buildPom( "plugin-exec-config-order/w-plugin-mngt" );
|
||||
String prefix = "build/plugins[1]/executions[1]/configuration/";
|
||||
assertEquals( "one", pom.getValue( prefix + "stringParams/stringParam[1]" ) );
|
||||
assertEquals( "two", pom.getValue( prefix + "stringParams/stringParam[2]" ) );
|
||||
assertEquals( "three", pom.getValue( prefix + "stringParams/stringParam[3]" ) );
|
||||
assertEquals( "four", pom.getValue( prefix + "stringParams/stringParam[4]" ) );
|
||||
assertEquals( "key1", pom.getValue( prefix + "propertiesParam/property[1]/name" ) );
|
||||
assertEquals( "key2", pom.getValue( prefix + "propertiesParam/property[2]/name" ) );
|
||||
}
|
||||
//*/
|
||||
|
||||
private PomArtifactResolver artifactResolver( String basedir )
|
||||
{
|
||||
return new FileBasedPomArtifactResolver( new File( BASE_POM_DIR, basedir ) );
|
||||
|
|
|
@ -0,0 +1,117 @@
|
|||
<?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.mng3864</groupId>
|
||||
<artifactId>test1</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<name>Maven Integration Test :: MNG-3864</name>
|
||||
<description>
|
||||
Verify that plain per-execution plugin configuration works correctly.
|
||||
</description>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<!--
|
||||
NOTE: The usage of <pluginManagement> for the employed IT plugin is crucial to exhibit the bug!
|
||||
-->
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.its.plugins</groupId>
|
||||
<artifactId>maven-it-plugin-configuration</artifactId>
|
||||
<version>2.1-SNAPSHOT</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.its.plugins</groupId>
|
||||
<artifactId>maven-it-plugin-configuration</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>config</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<propertiesFile>target/plugin-config.properties</propertiesFile>
|
||||
<booleanParam>true</booleanParam>
|
||||
<byteParam>42</byteParam>
|
||||
<shortParam>-12345</shortParam>
|
||||
<integerParam>0</integerParam>
|
||||
<longParam>9876543210</longParam>
|
||||
<floatParam>0.0</floatParam>
|
||||
<doubleParam>-1.5</doubleParam>
|
||||
<characterParam>X</characterParam>
|
||||
<stringParam>Hello World!</stringParam>
|
||||
<fileParam>pom.xml</fileParam>
|
||||
<dateParam>2008-11-09 11:59:03.0 PM</dateParam>
|
||||
<urlParam>http://maven.apache.org/</urlParam>
|
||||
<stringParams>
|
||||
<stringParam>one</stringParam>
|
||||
<stringParam>two</stringParam>
|
||||
<stringParam>three</stringParam>
|
||||
<stringParam>four</stringParam>
|
||||
</stringParams>
|
||||
<listParam>
|
||||
<listParam>one</listParam>
|
||||
<listParam>two</listParam>
|
||||
<listParam>three</listParam>
|
||||
<listParam>four</listParam>
|
||||
</listParam>
|
||||
<setParam>
|
||||
<setParam>item</setParam>
|
||||
<setParam>item</setParam>
|
||||
</setParam>
|
||||
<mapParam>
|
||||
<key1>value1</key1>
|
||||
<key2>value2</key2>
|
||||
</mapParam>
|
||||
<propertiesParam>
|
||||
<property>
|
||||
<name>key1</name>
|
||||
<value>value1</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>key2</name>
|
||||
<value>value2</value>
|
||||
</property>
|
||||
</propertiesParam>
|
||||
<beanParam>
|
||||
<fieldParam>field</fieldParam>
|
||||
<setterParam>setter</setterParam>
|
||||
</beanParam>
|
||||
<domParam>
|
||||
<echo>one</echo>
|
||||
<echo>two</echo>
|
||||
<echo>three</echo>
|
||||
<echo>four</echo>
|
||||
</domParam>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,78 @@
|
|||
<?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.mng3827</groupId>
|
||||
<artifactId>test2</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<name>Maven Integration Test :: MNG-3864</name>
|
||||
<description>
|
||||
Verify that plain per-execution plugin configuration works correctly.
|
||||
</description>
|
||||
|
||||
<build>
|
||||
<!-- This project uses plugin management for the test plugin -->
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.its.plugins</groupId>
|
||||
<artifactId>maven-it-plugin-configuration</artifactId>
|
||||
<version>2.1-SNAPSHOT</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.its.plugins</groupId>
|
||||
<artifactId>maven-it-plugin-configuration</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>config</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<stringParams>
|
||||
<stringParam>one</stringParam>
|
||||
<stringParam>two</stringParam>
|
||||
<stringParam>three</stringParam>
|
||||
<stringParam>four</stringParam>
|
||||
</stringParams>
|
||||
<propertiesParam>
|
||||
<property>
|
||||
<name>key1</name>
|
||||
<value>value1</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>key2</name>
|
||||
<value>value2</value>
|
||||
</property>
|
||||
</propertiesParam>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -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>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.apache.maven.its.mng3827</groupId>
|
||||
<artifactId>test1</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<name>Maven Integration Test :: MNG-3864</name>
|
||||
<description>
|
||||
Verify that plain per-execution plugin configuration works correctly.
|
||||
</description>
|
||||
|
||||
<build>
|
||||
<!-- This project does not use plugin management for the test plugin -->
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.its.plugins</groupId>
|
||||
<artifactId>maven-it-plugin-configuration</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>config</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<stringParams>
|
||||
<stringParam>one</stringParam>
|
||||
<stringParam>two</stringParam>
|
||||
<stringParam>three</stringParam>
|
||||
<stringParam>four</stringParam>
|
||||
</stringParams>
|
||||
<propertiesParam>
|
||||
<property>
|
||||
<name>key1</name>
|
||||
<value>value1</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>key2</name>
|
||||
<value>value2</value>
|
||||
</property>
|
||||
</propertiesParam>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
Loading…
Reference in New Issue