Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration tests for various JIRA issues. #20

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
849a1bd
[MNG-5359] Declared execution in PluginMgmt gets bound to lifecycle (…
ChristianSchulte Dec 20, 2015
d6d0e05
[MNG-4463] Dependency management import should support version ranges.
ChristianSchulte Jan 30, 2016
b440c1c
[MNG-5527] Dependency management import should support relocations.
ChristianSchulte Jun 22, 2016
d02d27f
[MNG-5600] Dependency management import should support exclusions.
ChristianSchulte Jun 19, 2016
33dbd8c
[MNG-5971] Imported dependencies should be available to inheritance p…
ChristianSchulte Feb 20, 2016
f6c0cc8
[MNG-6079] 3.4 regression: cannot override version of a dependencyMan…
ChristianSchulte Aug 13, 2016
0f2a207
[MNG-5227] The 'optional' flag of a dependency should be manageable.
ChristianSchulte Jan 27, 2016
cda6c80
[MNG-5761] Dependency management is not transitive.
ChristianSchulte Dec 13, 2016
3d0045f
[MNG-6135] Maven plugins and core extensions are not dependencies, th…
ChristianSchulte Dec 19, 2016
c22eddb
MNG-6210 shortened test project file names
ifedorenko May 7, 2017
8015782
[MNG-6223] support -f path/to/dir when detecting .mvn
hboutemy May 6, 2017
ac1deaf
[MNG-6229] Write out optionality in Core IT Plugins for collection an…
michael-o May 9, 2017
12d35b1
[MNG-5935] Optional true getting lost in managed dependencies when tr…
michael-o May 9, 2017
2081280
Expect fail for MNG-947 with Maven 3.0.5
michael-o May 13, 2017
a1f2b33
Remove superfluous Eclipse configuration files
michael-o May 24, 2017
b9c8632
[MNG-6084] Support JSR 250 annotations
Sep 12, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[MNG-5359] Declared execution in PluginMgmt gets bound to lifecycle (…
…regression)
ChristianSchulte committed Apr 18, 2017
commit 849a1bdb610e996ab2b06259a7cd5649847f2965
Original file line number Diff line number Diff line change
@@ -106,6 +106,7 @@ public static Test suite()
// -------------------------------------------------------------------------------------------------------------
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137

suite.addTestSuite( MavenITmng5359CleanPluginExecutionDeclarationInPluginMgmtTest.class );
suite.addTestSuite( MavenITmng6189SiteReportPluginsWarningTest.class );
suite.addTestSuite( MavenITmng6057CheckReactorOrderTest.class );
suite.addTestSuite( MavenITmng5895CIFriendlyUsageWithPropertyTest.class );
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
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.util.ResourceExtractor;

import java.io.File;

/**
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-5359">MNG-5359</a>.
*
* @author Anders Hammar
*/
public class MavenITmng5359CleanPluginExecutionDeclarationInPluginMgmtTest
extends AbstractMavenIntegrationTestCase
{

public MavenITmng5359CleanPluginExecutionDeclarationInPluginMgmtTest()
{
// Might work with versions before 2.0.11, but not verified
super( "[2.0.11,3.0-alpha-1),[3.4.0,)" );
}

public void testit()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5359" );

Verifier verifier = newVerifier( testDir.getAbsolutePath(), "remote" );

verifier.setAutoclean( false );
verifier.deleteDirectory( "target" );
verifier.deleteArtifacts( "org.apache.maven.its.mng5359" );

verifier.executeGoal( "install" ); // will fail if clean plugin is executed
verifier.verifyErrorFreeLog();
verifier.resetStreams();

verifier.assertArtifactPresent( "org.apache.maven.its.mng5359", "test", "0.1-SNAPSHOT", "jar" );
}
}
74 changes: 74 additions & 0 deletions core-it-suite/src/test/resources/mng-5359/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?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.mng5359</groupId>
<artifactId>test</artifactId>
<version>0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Maven Integration Test :: MNG-5359</name>
<description>
Verifies that an execution of maven-clean-plugin declared in pluginManagement doesn't make it bound to the build lifecycle.
</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>auto-clean</id>
<phase>package</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.apache.maven.its.mng5359;

/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}