From 372cc6fe9a8707722fd09f0914f61c8215ca1b74 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Wed, 1 Oct 2008 21:22:36 +0000 Subject: [PATCH] o Decoupled it0047 from production dependency git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@700933 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/maven/it/MavenIT0047Test.java | 16 +++++- .../src/test/resources/it0047/pom.xml | 52 ++++++++++++++++-- .../it0047/direct-dep/1.0/direct-dep-1.0.jar | Bin 0 -> 2089 bytes .../it0047/direct-dep/1.0/direct-dep-1.0.pom | 46 ++++++++++++++++ .../its/it0047/direct-dep/maven-metadata.xml | 11 ++++ .../transitive-dep/1.1/transitive-dep-1.1.jar | Bin 0 -> 2015 bytes .../transitive-dep/1.1/transitive-dep-1.1.pom | 36 ++++++++++++ .../it0047/transitive-dep/maven-metadata.xml | 11 ++++ .../java/org/apache/maven/it0047/Person.java | 19 ------- 9 files changed, 163 insertions(+), 28 deletions(-) create mode 100644 its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/direct-dep/1.0/direct-dep-1.0.jar create mode 100644 its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/direct-dep/1.0/direct-dep-1.0.pom create mode 100644 its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/direct-dep/maven-metadata.xml create mode 100644 its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/transitive-dep/1.1/transitive-dep-1.1.jar create mode 100644 its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/transitive-dep/1.1/transitive-dep-1.1.pom create mode 100644 its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/transitive-dep/maven-metadata.xml delete mode 100644 its/core-it-suite/src/test/resources/it0047/src/main/java/org/apache/maven/it0047/Person.java diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0047Test.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0047Test.java index d571163c51..483d423420 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0047Test.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0047Test.java @@ -21,8 +21,11 @@ package org.apache.maven.it; import org.apache.maven.it.Verifier; import org.apache.maven.it.util.ResourceExtractor; +import org.apache.maven.it.util.StringUtils; import java.io.File; +import java.util.List; +import java.util.Properties; public class MavenIT0047Test extends AbstractMavenIntegrationTestCase @@ -37,11 +40,18 @@ public class MavenIT0047Test { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0047" ); Verifier verifier = new Verifier( testDir.getAbsolutePath() ); - verifier.executeGoal( "compile" ); - verifier.assertFilePresent( "target/classes/org/apache/maven/it0047/Person.class" ); + Properties systemProperties = new Properties(); + systemProperties.put( "depres.compileClassPath", new File( testDir, "target/compile.txt" ).getAbsolutePath() ); + verifier.setSystemProperties( systemProperties ); + verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution::compile" ); + verifier.assertFilePresent( "target/compile.txt" ); verifier.verifyErrorFreeLog(); verifier.resetStreams(); + List lines = verifier.loadLines( "target/compile.txt", "UTF-8" ); + String paths = StringUtils.join( lines.iterator(), "\t" ).replace( '\\', '/' ); + assertTrue( paths.indexOf( "org/apache/maven/its/it0047/direct-dep/1.0/direct-dep-1.0.jar" ) >= 0 ); + assertTrue( paths.indexOf( "org/apache/maven/its/it0047/transitive-dep/1.1/transitive-dep-1.1.jar" ) >= 0 ); } -} +} diff --git a/its/core-it-suite/src/test/resources/it0047/pom.xml b/its/core-it-suite/src/test/resources/it0047/pom.xml index 3a4454261d..15fe36d5db 100644 --- a/its/core-it-suite/src/test/resources/it0047/pom.xml +++ b/its/core-it-suite/src/test/resources/it0047/pom.xml @@ -1,16 +1,56 @@ + + + + 4.0.0 - Maven Integration Test :: it0047 + org.apache.maven.its.it0047 maven-it-it0047 - Test the use case for having a compile time dependency be transitive: - when you extend a class you need its dependencies at compile time. 1.0 + + Maven Integration Test :: it0047 + + Test the use case for having a compile time dependency be transitive: + when you extend a class you need its dependencies at compile time. + + + - org.codehaus.plexus - plexus-container-default - 1.0-alpha-7 + org.apache.maven.its.it0047 + direct-dep + 1.0 + + + + maven-core-it + file:///${basedir}/repo + + ignore + + + ignore + + + diff --git a/its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/direct-dep/1.0/direct-dep-1.0.jar b/its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/direct-dep/1.0/direct-dep-1.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..486b10b5601fce30b0f4a13057e8a9fa54e66f1d GIT binary patch literal 2089 zcmWIWW@h1H0DuQ}lbAEG>!4=~NPm6TC&YjTl)^*}wf3hTOikS8R zm5QBnx`TwhgMv%uYONKK;TD=~93)yJd^+eeP{zx+*z3R}zjc1=1nRohg?pKuC@{8d zu3#>X(~Hw%fH@1(_58@r%1taw&4c>^Q?WLt;{2j?y~KjVFfcL4 zV~`nX2Bl;cr6!l?rlc0Y&E#On1P1VPZc83kW(Ec(HUPcx8+E1%I~^4 z)#rA0-oJBI^veu}*4;9BBve==8=r{PW!w~x8mFBZLe&8RJ! z)O+ZKfP!<$(eT&4zupOz?OF7u>9t+=tnxc=G@G(tEZNm4E1KkbFgH4kQM@G3T43Mu z4JoJmoO5S4KYDtv;SCG#p69$@Z{1Mb^pwNpd+P6LCXXGr9p;#v$u4y6f%kc78}8>H zT9|6`&Gwv~x36fYsdd8ywy56ary9yF&Dt7-R_t17A#C}SFIe`q@UDDk&Yh+`i)KnQ zJ;{?|I}=gM@a>q1{^Av{cTKQdurMUmgiowiNiY0nszXBVpRFqbvIBlBe%fVmSFXXd zMKwLzDPkj^&gw8Rb+gj5^;KKe$`<)$Z<+*P?T$ZHTD-ytn`5tG|*86J2sYtP2#g zOMEiTQAcf`3Qo`*XC8vZk<}e8RzJ>VrSvAi~GJG z_gVO!)p0+6@1*;N=ABFJ)}=OHO=y3jG^hQu#jf(}-Xhbzw)sY>EIFeQbT%)rWzL-Q zXKU&{+VmY$n0|1|L+feMR^lolc}+~SEoQ~+-jLWjx%l?aZ#SmItvJoAoq6Snb#P&c z72kwDp}=G5Y8|q>+x4c$iJAo!M_oN!;9S1PL*|9T@>0GXoyu`@;-W)UuRTpU`r_kx z-NpM^!}lviYxKQ&9AH@$VAc1pafy2u?<57K=PQnDeF-n}cHw3Az3pf>yRGrw>1|5o zlZ{1$uk_uQ>t&pEcfs9ddy<~0>Ya#OVymlcF)_9|c`GO5|Fw%w&+;fc^eNml_J`-i z&%e8Ng_~y^`N+BdEll~w`0S+Xd6}ILGVa}nl@uJ{a!y)xQg0>peVl} zwWuUBwOF)gBiA7V0f+An{~j*b{7{G~YvJS$i;m`|&ok%bvdu2&W&MB8V$Z{ak4x3( zMXo4nc`mNE<!q1H4&*)eZv# OI}ipiF)$ov1@Qo)8`a_f literal 0 HcmV?d00001 diff --git a/its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/direct-dep/1.0/direct-dep-1.0.pom b/its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/direct-dep/1.0/direct-dep-1.0.pom new file mode 100644 index 0000000000..bf43590d25 --- /dev/null +++ b/its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/direct-dep/1.0/direct-dep-1.0.pom @@ -0,0 +1,46 @@ + + + + + + 4.0.0 + + org.apache.maven.its.it0047 + direct-dep + 1.0 + jar + + + + maven-core-it + file:///${basedir}/repo + + + + + + + org.apache.maven.its.it0047 + transitive-dep + 1.1 + compile + + + diff --git a/its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/direct-dep/maven-metadata.xml b/its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/direct-dep/maven-metadata.xml new file mode 100644 index 0000000000..0d22411fd8 --- /dev/null +++ b/its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/direct-dep/maven-metadata.xml @@ -0,0 +1,11 @@ + + org.apache.maven.its.it0047 + direct-dep + 1.0 + + + 1.0 + + 20081001201944 + + \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/transitive-dep/1.1/transitive-dep-1.1.jar b/its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/transitive-dep/1.1/transitive-dep-1.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..4bac49184395ab97463f4a4d0dce94bcf7ca4082 GIT binary patch literal 2015 zcmWIWW@h1H0D=5Xj+S5sl;8x?zOEsTx}JV+`TuQ}lbAEG>!4=~NPm6TC&YjTl)^*}wf3hTOikS8R zm5QBnx`TwhgMv%uYONKK;TD=~93)yJd^+eeP{zx+*z3R}zjc1=1nRohg?pKuC@{8d zu3#>X(~Hw%fH@1(_58@r%1taw&4c>^Q?WLt;{2j?y~KjVFfcL4 zV~`bT29*>g<`rj_WR|7srlc0Y&E;U=00#2&o(BGfObiU$SQr=_DKfVpKUc3JH>Wft zI)Ao-NS*s5`#B43w*(z{8IpO~ZRMtI7ccB`(R#Vc&Z@xaPSe>OVJY9=@2%BT&YHdD zy!rfFY+t8-{3|ZA6}5!L!i*^$wV!X+OpLpGz$+vqmSgkkMGxn0$UY^&X0>#FqHAwOAcy(1a0QjvE4Cc> zFGm!;y>a12+G^LG+ZI@Pwp?GdFp}F{Y4*Fu8L_wTdOX?@`qtrL$6JL%9Q)pvG?!nL z@Y6W>y-87QPTi~Q?0u{&b+)j@TQl!_awCGtYr(5!LNU)mtT$MFQ7`Ft=H9wx&ZbI# zrYo;3cz2ZkV_35`*Uso#Y3z~e1rsl+-WE>YzT~OSZcffMr}s}6m135v-{LfR*=gMm zZ5y7{cyegpYYe`6^U`eJ%htYJr;DCcr{#a&sJY(gZKL4b$1Fl!la&vuG@Ecg_^jf+ zSrl$K7uE5XZ+_*N;Ihc@$E6JR z`379e6~x@DH_w0nZBhAAlNsGpPjpVxiH=j6(p46>YimZp^+OiYya%;21hW!?}rM$%So-BXRy6I4?agChMwM=EMoc)swUKIZATg zs!2Tl`15ze+v;CMW1=@c+PQS|)flNy3C)R(zGwQJYF~ZmnY{UhPTK6l30)VKq{j)} zebV`Q#$Gx02=>`49!XDMGNHP=R@c?ktm~Q9UfH}Cej=XyHfLUXwjVm?BeMQtSa|2{ zk|_6Y-=0spEbsgx{)}nYOm4opH{;hPe~VXX`K9n9AC{Xrz-7_HLK7oU0n-G;9u%kl zf};F_)S{Bi)MC+|gIr9CA`I`F{(nd~-{}>wd&BaM7Xq?eR{OtfeXS^3%lWsqY{uaO z28TP9L{mO}_;ZL=+Eug7{rc+U3v6rVp0T(o$anmdnmF8TFxQ@8+$@VvJP0ZqXjkz-U3;N WNY(+~tZX2Y*?}+ySZ(C8f_MPzjk;z4 literal 0 HcmV?d00001 diff --git a/its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/transitive-dep/1.1/transitive-dep-1.1.pom b/its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/transitive-dep/1.1/transitive-dep-1.1.pom new file mode 100644 index 0000000000..24d00acb91 --- /dev/null +++ b/its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/transitive-dep/1.1/transitive-dep-1.1.pom @@ -0,0 +1,36 @@ + + + + + + 4.0.0 + + org.apache.maven.its.it0047 + transitive-dep + 1.1 + jar + + + + maven-core-it + file:///${basedir}/repo + + + diff --git a/its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/transitive-dep/maven-metadata.xml b/its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/transitive-dep/maven-metadata.xml new file mode 100644 index 0000000000..a13c2af771 --- /dev/null +++ b/its/core-it-suite/src/test/resources/it0047/repo/org/apache/maven/its/it0047/transitive-dep/maven-metadata.xml @@ -0,0 +1,11 @@ + + org.apache.maven.its.it0047 + transitive-dep + 1.1 + + + 1.1 + + 20081001201930 + + \ No newline at end of file diff --git a/its/core-it-suite/src/test/resources/it0047/src/main/java/org/apache/maven/it0047/Person.java b/its/core-it-suite/src/test/resources/it0047/src/main/java/org/apache/maven/it0047/Person.java deleted file mode 100644 index ce8320bf4d..0000000000 --- a/its/core-it-suite/src/test/resources/it0047/src/main/java/org/apache/maven/it0047/Person.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.apache.maven.it0047; - -import org.codehaus.plexus.PlexusTestCase; - -public class Person - extends PlexusTestCase -{ - private String name; - - public void setName( String name ) - { - this.name = name; - } - - public String getName() - { - return name; - } -}