mirror of https://github.com/apache/maven.git
o Created UT for MNG-4000
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@737172 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2d5cb58fe9
commit
46ca604411
|
@ -589,6 +589,26 @@ public class PomConstructionTest
|
||||||
}
|
}
|
||||||
//*/
|
//*/
|
||||||
|
|
||||||
|
/* FIXME: cf. MNG-4000
|
||||||
|
public void testMultiplePluginExecutionsWithAndWithoutIdsWithoutPluginManagement()
|
||||||
|
throws Exception
|
||||||
|
{
|
||||||
|
PomTestWrapper pom = buildPom( "plugin-exec-w-and-wo-id/wo-plugin-mngt" );
|
||||||
|
assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
|
||||||
|
assertEquals( "log-string", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
|
||||||
|
assertEquals( "log-string", pom.getValue( "build/plugins[1]/executions[2]/goals[1]" ) );
|
||||||
|
}
|
||||||
|
//*/
|
||||||
|
|
||||||
|
public void testMultiplePluginExecutionsWithAndWithoutIdsWithPluginManagement()
|
||||||
|
throws Exception
|
||||||
|
{
|
||||||
|
PomTestWrapper pom = buildPom( "plugin-exec-w-and-wo-id/w-plugin-mngt" );
|
||||||
|
assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
|
||||||
|
assertEquals( "log-string", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
|
||||||
|
assertEquals( "log-string", pom.getValue( "build/plugins[1]/executions[2]/goals[1]" ) );
|
||||||
|
}
|
||||||
|
|
||||||
private PomArtifactResolver artifactResolver( String basedir )
|
private PomArtifactResolver artifactResolver( String basedir )
|
||||||
{
|
{
|
||||||
return new FileBasedPomArtifactResolver( new File( BASE_POM_DIR, basedir ) );
|
return new FileBasedPomArtifactResolver( new File( BASE_POM_DIR, basedir ) );
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
<?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.mng4000</groupId>
|
||||||
|
<artifactId>test2</artifactId>
|
||||||
|
<version>0.1</version>
|
||||||
|
|
||||||
|
<name>Maven Integration Test :: MNG-4000</name>
|
||||||
|
<description>
|
||||||
|
Test that plugin executions without id are not lost among other plugin executions.
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<!-- NOTE: This test uses plugin management for the IT plugin. -->
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.its.plugins</groupId>
|
||||||
|
<artifactId>maven-it-plugin-log-file</artifactId>
|
||||||
|
<version>2.1-SNAPSHOT</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.its.plugins</groupId>
|
||||||
|
<artifactId>maven-it-plugin-log-file</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<logFile>target/exec.log</logFile>
|
||||||
|
<string>exec</string>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>exec-1</id>
|
||||||
|
<phase>validate</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>log-string</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<!-- NOTE: <id> deliberately omitted here! -->
|
||||||
|
<phase>validate</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>log-string</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
|
@ -0,0 +1,64 @@
|
||||||
|
<?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.mng4000</groupId>
|
||||||
|
<artifactId>test1</artifactId>
|
||||||
|
<version>0.1</version>
|
||||||
|
|
||||||
|
<name>Maven Integration Test :: MNG-4000</name>
|
||||||
|
<description>
|
||||||
|
Test that plugin executions without id are not lost among other plugin executions.
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<!-- NOTE: This test does not use plugin management for the IT plugin. -->
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.its.plugins</groupId>
|
||||||
|
<artifactId>maven-it-plugin-log-file</artifactId>
|
||||||
|
<version>2.1-SNAPSHOT</version>
|
||||||
|
<configuration>
|
||||||
|
<logFile>target/exec.log</logFile>
|
||||||
|
<string>exec</string>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>exec-1</id>
|
||||||
|
<phase>validate</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>log-string</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<!-- NOTE: <id> deliberately omitted here! -->
|
||||||
|
<phase>validate</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>log-string</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
Loading…
Reference in New Issue