Wouldn't it just be better to add the <dependencies>...</dependencies> to the <unitTest> block rather than adding some type of property <type>test</type>" to the regular <dependencies>...</dependencies> area??
I'd would be glad to try to test something, but I'm still pretty green with Maven. If I can just update the "test" plugin in the standard 1.0-rc1 world, I can probably manage it. Like this (I just found the <resource> needed to include my *.xml in the TEST only path. <unitTest> <includes> <include>**/**Test.java</include> </includes> <excludes> <exclude></exclude> </excludes> <resources> <resource> <directory>source/test</directory> <include>**/*.xml</include> </resource> </resources> <dependencies> <dependency> <groupId>xxx-yyy</groupId> <artifactId>test-dep1-code</artifactId> <version>3.2.0</version> </dependency> <dependency> <groupId>xxx-yyy</groupId> <artifactId>test-dep2-code</artifactId> <version>1.2.3</version> </dependency> </dependencies> </unitTest> test-dep1-code.2.3.0.jar and test-dep2-code.1.2.3.jar would only be added to the classpath during junit runs. Thanks for your interest -- and any help you can give. Cary ----- Original Message ----- From: "Jason van Zyl" <[EMAIL PROTECTED]> To: "Maven Users List" <[EMAIL PROTECTED]> Sent: Thursday, January 08, 2004 2:41 PM Subject: Re: Dependency issues for junit tests > On Thu, 2004-01-08 at 14:50, Cary Coulter wrote: > > How can I specify additional dependent jars for junit tests? > > > > The main application code (non-junit classes) does not need (nor do we want > > the developers to compile against) several lower level application jars > > (stuff we have built wrappers for to isolate them from our code). > > > > However, in order to run the junit tests, the project needs access to the > > wrapper jars dependencies. Different projects might need a different list > > of these dependent (non-compile against) jars. > > > > I can't find a means in the project.xml or project.properties to specify the > > jars to only be used for junit testing. > > > > Any ideas? > > If you do the following: > > <dependency> > <groupId>foo</groupId> > <artifactId>bar</artifactId> > <type>test</type> > <version>1.0</version> > </dependency> > > You can make the distinction. Currently a type that corresponds to "jar" > and "ejb" will be added to the classpath. So by specifying a type other > than those they will be excluded from the classpath. > > So if you give me a few minutes, I will alter the test plugin to deal > with test and non-test dependencies. Might as well start now with > allowing this distinction. > > Cary, if I make this change are you going to test it for me? > > > > > > > Thanks in advance, > > Cary > > > > Learning Maven and liking it. > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > -- > jvz. > > Jason van Zyl > [EMAIL PROTECTED] > http://tambora.zenplex.org > > In short, man creates for himself a new religion of a rational > and technical order to justify his work and to be justified in it. > > -- Jacques Ellul, The Technological Society > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]