From a1a0bb1339923abfc9a4dcbd65e3bfb16fb1e62c Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Sun, 2 Aug 2009 11:01:52 +0000 Subject: [PATCH] [MNG-4276] Plugins with indirect dependency on plexus-utils are stuck with plexus-utils:1.1 o Added IT git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@800027 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/maven/it/IntegrationTestSuite.java | 1 + ...mng4276WrongTransitivePlexusUtilsTest.java | 68 ++++++++++++++++++ .../src/test/resources/mng-4276/pom.xml | 67 +++++++++++++++++ .../maven/its/mng4276/dep/0.1/dep-0.1.jar | Bin 0 -> 2097 bytes .../maven/its/mng4276/dep/0.1/dep-0.1.pom | 49 +++++++++++++ .../maven/its/mng4276/dep/maven-metadata.xml | 13 ++++ .../1.1.4276/plexus-utils-1.1.4276.jar | Bin 0 -> 5210 bytes .../1.1.4276/plexus-utils-1.1.4276.pom | 56 +++++++++++++++ .../plexus/plexus-utils/maven-metadata.xml | 13 ++++ .../resources/mng-4276/settings-template.xml | 35 +++++++++ 10 files changed, 302 insertions(+) create mode 100644 its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4276WrongTransitivePlexusUtilsTest.java create mode 100644 its/core-it-suite/src/test/resources/mng-4276/pom.xml create mode 100644 its/core-it-suite/src/test/resources/mng-4276/repo/org/apache/maven/its/mng4276/dep/0.1/dep-0.1.jar create mode 100644 its/core-it-suite/src/test/resources/mng-4276/repo/org/apache/maven/its/mng4276/dep/0.1/dep-0.1.pom create mode 100644 its/core-it-suite/src/test/resources/mng-4276/repo/org/apache/maven/its/mng4276/dep/maven-metadata.xml create mode 100644 its/core-it-suite/src/test/resources/mng-4276/repo/org/codehaus/plexus/plexus-utils/1.1.4276/plexus-utils-1.1.4276.jar create mode 100644 its/core-it-suite/src/test/resources/mng-4276/repo/org/codehaus/plexus/plexus-utils/1.1.4276/plexus-utils-1.1.4276.pom create mode 100644 its/core-it-suite/src/test/resources/mng-4276/repo/org/codehaus/plexus/plexus-utils/maven-metadata.xml create mode 100644 its/core-it-suite/src/test/resources/mng-4276/settings-template.xml 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 ddd3e52dc3..82ba3d7bb3 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 @@ -86,6 +86,7 @@ public class IntegrationTestSuite // suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class ); // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137 + suite.addTestSuite( MavenITmng4276WrongTransitivePlexusUtilsTest.class ); suite.addTestSuite( MavenITmng4274PluginRealmArtifactsTest.class ); suite.addTestSuite( MavenITmng4273RestrictedCoreRealmAccessForPluginTest.class ); suite.addTestSuite( MavenITmng4270ArtifactHandlersFromPluginDepsTest.class ); diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4276WrongTransitivePlexusUtilsTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4276WrongTransitivePlexusUtilsTest.java new file mode 100644 index 0000000000..a161319b14 --- /dev/null +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4276WrongTransitivePlexusUtilsTest.java @@ -0,0 +1,68 @@ +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-4276. + * + * @author Benjamin Bentmann + */ +public class MavenITmng4276WrongTransitivePlexusUtilsTest + extends AbstractMavenIntegrationTestCase +{ + + public MavenITmng4276WrongTransitivePlexusUtilsTest() + { + super( "[3.0-alpha-3,)" ); + } + + /** + * Verify that plugins that have a *transitive* dependency on plexus-utils:x.y get that version and not a random + * version injected by the core like 1.1. + */ + public void testit() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4276" ); + + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); + verifier.deleteDirectory( "target" ); + verifier.deleteArtifacts( "org.apache.maven.its.mng4276" ); + verifier.deleteArtifact( "org.codehaus.plexus", "plexus-utils", "1.1.4276", "jar" ); + verifier.deleteArtifact( "org.codehaus.plexus", "plexus-utils", "1.1.4276", "pom" ); + verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() ); + verifier.getCliOptions().add( "-s" ); + verifier.getCliOptions().add( "settings.xml" ); + verifier.executeGoal( "validate" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + Properties props = verifier.loadProperties( "target/class.properties" ); + assertNotNull( props.getProperty( "org.apache.maven.its.mng4276.CoreIt" ) ); + } + +} diff --git a/its/core-it-suite/src/test/resources/mng-4276/pom.xml b/its/core-it-suite/src/test/resources/mng-4276/pom.xml new file mode 100644 index 0000000000..38420d0d43 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4276/pom.xml @@ -0,0 +1,67 @@ + + + + + + 4.0.0 + + org.apache.maven.its.mng4276 + test + 0.1 + jar + + Maven Integration Test :: MNG-4276 + + Verify that plugins that have a *transitive* dependency on plexus-utils:x.y get that version and not a random + version injected by the core like 1.1. + + + + + + org.apache.maven.its.plugins + maven-it-plugin-class-loader + 2.1-SNAPSHOT + + + + org.apache.maven.its.mng4276 + dep + 0.1 + + + + target/class.properties + + org.apache.maven.its.mng4276.CoreIt + + + + test + validate + + load + + + + + + + diff --git a/its/core-it-suite/src/test/resources/mng-4276/repo/org/apache/maven/its/mng4276/dep/0.1/dep-0.1.jar b/its/core-it-suite/src/test/resources/mng-4276/repo/org/apache/maven/its/mng4276/dep/0.1/dep-0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..83762f0e70b9ff65cdccbfa31e143267e891f171 GIT binary patch literal 2097 zcmWIWW@h1H00E~|CTlPQN^k;cU)K;vT~9wZ{Q#&k4hBb{va`3+m{Nh#)j%wQtjyQZ z&(qB{I7H9a?X&Nh(>~t1dKY=Ub+yi&Ilno`;EM5sr$stm=T7K&>pF3;KUoqsMNIpE zO2y7O-9f_MLBS<+wbqKra0^W~4ic>qJ{|NKDC1>Z>~-Lg-#Wi_0(D*M!oAE+6d2n! zS1=dH>BZ?Wz?_BYdVXYQo|o zKOFdxaf#~73oIEe3l4>KBS5%ySJ5OmxW7sSC4ay2(B6p^yiWWFZm%1PNZZgehcixIM zRvB^cbWel@9Ijrs;@UCOiMsAe%i7<12lcbxQ3-8WnZn+cXc5zKM(~~?Ywllka zGQ3$E`aJN;w%ij|ixyr;F585F9yO!rlnH6Z6}wMddc(4B*=+vT zvw3S`W8(G0W`8ki{%X1>dcEEy-(7JRvpBo2n&1CDW1XHKgQtpCbGeuGuOkz!SvSu3 zk+$Z2%|+j%8fSj?J-;$dLpn@p$|M{8Il3aRW=Wg7Ie+0YaypxvF88?l{}+*8aROhy zJ7)frEuL-h@^O?{1aFzgxkHr}{fpVF|8_hII_Xq*B9ATe|uCZ z(;FDeb$QzRh`h|$1zn3z?y{EG%QxcpfBfRxKAE`!|Mb{g!5eATb`Ixmt~#{)7)$Tdshrk7UMSYZ7kv?Z8*AvOT-tv; z!1mgTB@e&slWCK^_1N{2rtFh1Y^-;V3F`MP?_DQUZu;_{OMiW?q-|l$|2~-jnVp9j zEq`&(I`Oyvq{7(?HtxnrGOU)@=KpGni@&q^Sj%1!{BQqZs6y+DB7L{bC7K@(Q z$aTm-fZ>AegnEk?a+k6LbxH&TUp@$_e~@!-#zM~>YOMd`?#i#pnAIxHUP<`m|V(%-YPYpC)C^yEEg6^r}x%|DlP`qT`0WviaWrYkx7IZcj*rF6%Yt8ymbW8NM$`t8}`y3q!U}X_)oc3u=Vs*O;0K6x+B>1{K^80CJWoBZjl^nhYt% zVWwj*$YJI$X>2CLbZD`T2wCi@6k!QBE9qVUS%OHj0p6^@I*5UR9SH527#QvVO=MsI E0EVH?+5i9m literal 0 HcmV?d00001 diff --git a/its/core-it-suite/src/test/resources/mng-4276/repo/org/apache/maven/its/mng4276/dep/0.1/dep-0.1.pom b/its/core-it-suite/src/test/resources/mng-4276/repo/org/apache/maven/its/mng4276/dep/0.1/dep-0.1.pom new file mode 100644 index 0000000000..8a8eecb654 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4276/repo/org/apache/maven/its/mng4276/dep/0.1/dep-0.1.pom @@ -0,0 +1,49 @@ + + + + + + 4.0.0 + + org.apache.maven.its.mng4276 + dep + 0.1 + jar + + Maven Integration Test :: MNG-4276 :: Plugin Dependency + + An ordinary dependency that depends on our stub version of plexus-utils. + + + + + maven-core-it + file:///${basedir}/repo + + + + + + org.codehaus.plexus + plexus-utils + 1.1.4276 + + + diff --git a/its/core-it-suite/src/test/resources/mng-4276/repo/org/apache/maven/its/mng4276/dep/maven-metadata.xml b/its/core-it-suite/src/test/resources/mng-4276/repo/org/apache/maven/its/mng4276/dep/maven-metadata.xml new file mode 100644 index 0000000000..c8b7a1e27e --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4276/repo/org/apache/maven/its/mng4276/dep/maven-metadata.xml @@ -0,0 +1,13 @@ + + + org.apache.maven.its.mng4276 + dep + 0.1 + + 0.1 + + 0.1 + + 20090802104203 + + diff --git a/its/core-it-suite/src/test/resources/mng-4276/repo/org/codehaus/plexus/plexus-utils/1.1.4276/plexus-utils-1.1.4276.jar b/its/core-it-suite/src/test/resources/mng-4276/repo/org/codehaus/plexus/plexus-utils/1.1.4276/plexus-utils-1.1.4276.jar new file mode 100644 index 0000000000000000000000000000000000000000..3274b371f724b14cba55dc955a4337bc3c6e72a0 GIT binary patch literal 5210 zcmWIWW@h1H00F5KCTlPQN^k;cU)K;vT~9wZ{Q#&k4hBh}va`3+m{Nh#)j%wQtjyQZ z&(qB{I7H9a?X&Nh(>~t1dKY=Ub+yi&Ilno`;EM5sr$stm=T7K&>pF3;KUoqsMNIpE zO2y7O-9f_MLBS<+wbqKra0^W~4ic>qJ{|NKDC1>Z>~-Lg-#Wi_0(D*M!oAE+6d2n! zS1=dH>BZ?Wz?_BYdKRFw@{7{p4#!l%4ONj?keHm2ibtU!s>0mFveZ00%0;m$&nzj% zqeT{%mfXB_6C-moB(0#}2dahxkUxuylJTej#Un^XZek{~v(XLWLspiRSeA&#NFfZh zs6mZxwj@^d7y*y2O&*^%^k_iWtV~!lYNVhWpiP_s=uyN0&PZ`-4;tgfA#&F*zFJW3#qS^f55Y6=J$&HgnjjP`vo4#O!hez*Y#H<*{LXd z4QF}Fizg+19qI2vg^#sv{8e~&+O7QsH#>>~c680QtiJrw-jI)bvyzPXx$9l`cSL1e z{p1#%ddO?*wtc(y>heTq2e23)%4Vc5QCRTIjoz0UTcU=sja!P`%^qDw?YaL zpOB84C}swR(`*b3?7$!@$j{ZQ$jxaDx!-@;LZGgH%KyZ5yVxCkH+2gvP-Xd=P%SQd zd!AXWK!2W*FK?%8PWtAno&V=Cm-?>_QhwIXvBJ0ziKfK8k z@MP12MK!j&Z|XEp-)!Fb{%71DcYz=Gs^=}f5YaF(;TuPH+tV*6pPVc4QPfG*=1Sw> zk<;DuGwjXZ?|0k`X1RXB^DAo^%aN|8+gsK!>759$7TULbL&~XD3%8tg{8*IlP}aoqzS4Q8 zS(wWB2i2Ponpgihb$9Je#uk$cSvHEy z_nzL6Q1V*xYS|;7CneK*r=H>4F%$8?E2Xg~W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FAPLuo)Wt)XfZ4kO z^-CZCWbr;A6VgS%?Nm^I3<5wp9srq0l@LCwK>afa0BPg|wz!cr!s-m%_JaCr2<;Zw zv_m=yxQzhy-w;M*<1zx)-beNfdanaD+?D~2g7oeXmZR$c_3sdtpMdIs_V#dV1NHY1 z+TJ5;gZBP#>jm}y5PGGVu(clWc@oqgMCkX%svq7v#O(}F{}5qJ6Fy@wlL2}#f*KD9 z!}b$43_Vex8wlz@A`D~z_H;;SVj)5gdw&vU^pZwTpurgF9arxX*;tT!k((=^J{Sxv zY0Lp8L}+6KT@!lC5uxcd&JQrrZDk literal 0 HcmV?d00001 diff --git a/its/core-it-suite/src/test/resources/mng-4276/repo/org/codehaus/plexus/plexus-utils/1.1.4276/plexus-utils-1.1.4276.pom b/its/core-it-suite/src/test/resources/mng-4276/repo/org/codehaus/plexus/plexus-utils/1.1.4276/plexus-utils-1.1.4276.pom new file mode 100644 index 0000000000..5122485dc4 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4276/repo/org/codehaus/plexus/plexus-utils/1.1.4276/plexus-utils-1.1.4276.pom @@ -0,0 +1,56 @@ + + + + + + 4.0.0 + + org.codehaus.plexus + plexus-utils + 1.1.4276 + jar + + Maven Integration Test :: MNG-4276 :: Plexus Utils Stub + + A stub version of plexus-utils, must have the same groupId:artifactId as the real thing. + + + + + maven-core-it + file:///${basedir}/repo + + + + + + + . + + pom.xml + src/** + + + + src/main/resources + + + + diff --git a/its/core-it-suite/src/test/resources/mng-4276/repo/org/codehaus/plexus/plexus-utils/maven-metadata.xml b/its/core-it-suite/src/test/resources/mng-4276/repo/org/codehaus/plexus/plexus-utils/maven-metadata.xml new file mode 100644 index 0000000000..39e90d4562 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4276/repo/org/codehaus/plexus/plexus-utils/maven-metadata.xml @@ -0,0 +1,13 @@ + + + org.codehaus.plexus + plexus-utils + 1.1.4276 + + 1.1.4276 + + 1.1.4276 + + 20090802103251 + + diff --git a/its/core-it-suite/src/test/resources/mng-4276/settings-template.xml b/its/core-it-suite/src/test/resources/mng-4276/settings-template.xml new file mode 100644 index 0000000000..408c5ccd9e --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4276/settings-template.xml @@ -0,0 +1,35 @@ + + + + + maven-core-it-repo + + + maven-core-it + @baseurl@/repo + + ignore + + + false + + + + + + maven-core-it + @baseurl@/repo + + ignore + + + false + + + + + + + maven-core-it-repo + +