RE: ? add dependencies to surefire plugin
scope: This element refers to the classpath of the task at hand (compiling and runtime, testing, etc.) as well as how to limit the transitivity of a depedency. There are five scopes available:compile - this is the default scope, used if none is specified. Compile dependencies are available in all classpaths. Furthermore, those dependencies are propagated to dependent projects.provided - this is much like compile, but indicates you expect the JDK or a container to provide it at runtime. It is only available on the compilation and test classpath, and is not transitive.runtime - this scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath.test - this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases.system - this scope is similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository.systemPath: is used only if the the dependency scope is system. Otherwise, the build will fail if this element is set. The path must be absolute, so it is recommended to use a property to specify the machine-specific path (more on properties below), such as ${java.home}/lib. Since it is assumed that system scope dependencies are installed a priori, Maven will not check the repositories for the project, but instead checks to ensure that the file exists. If not, Maven will fail the build and suggest that you download and install it manually.optional: Marks optional a dependency when this project itself is a dependency. Confused? For example, imagine a project A that depends upon project B to compile a portion of code that may not be used at runtime, then we may have no need for project B for all project. So if project X adds project A as its own dependency, then Maven will not need to install project B at all. Symbolically, if => represents a required dependency, and --> represents optional, although A=>B may be the case when building A X=>A-->B would be the case when building X.In the shortest terms, optional lets other projects know that, when you use this project, you do not require this dependency in order to work correctly. Nick is correct if you specify 'runtime' scope you indicate that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath. if you're expecting to integrate this dependency during src build... leave scope as 'compile' *Bedankt* Martin __ Note de déni et de confidentialité Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > From: l...@liermann-it.de > Subject: Re: ? add dependencies to surefire plugin > To: users@maven.apache.org > Date: Thu, 10 Mar 2011 21:36:32 +0100 > > > Yes, I need this dependencies on the runtime test classpath. > Thanks for the rapid help. I will try it. > > On Thu, 10 Mar 2011 21:30:21 +0100 > Nick Stolwijk wrote: > >Do you need all those dependencies on the runtime test classpath? The > >only solution I see is to use the gf-client as test dependency and > >start excluding all that you don't need. > > > >There is no such thing as a scope runtime-test and I don't know if > >this ever came up. Maybe search through Jira for it. > > > >Hth, > > > >Nick Stolwijk > >~Senior Java Developer~ > > > >iPROFS > >Wagenweg 208 > >2012 NM Haarlem > >T +31 23 547 6369 > >F +31 23 547 6370 > >I www.iprofs.nl > > > > > > > >On Thu, Mar 10, 2011 at 9:22 PM, Dipl.-Ing. Torsten Liermann > > wrote: > >> Thanks Nick. > >> > >> I need the artifact in the runtime classpath for the unit test. If I > >> declare this dependency normal with test scope, then maven (3.0.2) adds > >> this artifact to the test-compiler classpath. Glassfishs gf-client has > >> over hundred dependencies and so the compilation time is 500 % longer. :( > >> > >> On Thu, 10 Mar 2011 21:12:04 +0100 > >> Nick Stolwijk wrote: > >>>Does it need to be on the classpath of surefire o
Re: ? add dependencies to surefire plugin
Yes, I need this dependencies on the runtime test classpath. Thanks for the rapid help. I will try it. On Thu, 10 Mar 2011 21:30:21 +0100 Nick Stolwijk wrote: >Do you need all those dependencies on the runtime test classpath? The >only solution I see is to use the gf-client as test dependency and >start excluding all that you don't need. > >There is no such thing as a scope runtime-test and I don't know if >this ever came up. Maybe search through Jira for it. > >Hth, > >Nick Stolwijk >~Senior Java Developer~ > >iPROFS >Wagenweg 208 >2012 NM Haarlem >T +31 23 547 6369 >F +31 23 547 6370 >I www.iprofs.nl > > > >On Thu, Mar 10, 2011 at 9:22 PM, Dipl.-Ing. Torsten Liermann > wrote: >> Thanks Nick. >> >> I need the artifact in the runtime classpath for the unit test. If I declare >> this dependency normal with test scope, then maven (3.0.2) adds this >> artifact to the test-compiler classpath. Glassfishs gf-client has over >> hundred dependencies and so the compilation time is 500 % longer. :( >> >> On Thu, 10 Mar 2011 21:12:04 +0100 >> Nick Stolwijk wrote: >>>Does it need to be on the classpath of surefire or of your unittests? >>> >>>If it is the first you are on the good way. You can check with -X what >>>the classpath for surefire is. >>> >>>For the second, add a normal dependency with scope test. >>> >>>Hth, >>> >>>Nick Stolwijk >>>~Senior Java Developer~ >>> >>>iPROFS >>>Wagenweg 208 >>>2012 NM Haarlem >>>T +31 23 547 6369 >>>F +31 23 547 6370 >>>I www.iprofs.nl >>> >>> >>> >>>On Thu, Mar 10, 2011 at 9:04 PM, Dipl.-Ing. Torsten Liermann >>> wrote: f-client >>> >>>- >>>To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >>>For additional commands, e-mail: users-h...@maven.apache.org >>> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> For additional commands, e-mail: users-h...@maven.apache.org >> >> > >- >To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >For additional commands, e-mail: users-h...@maven.apache.org > Dipl.-Ing. Torsten Liermann Tel: +49 151/11565077 Theodolindenplatz 2 Fax: +49 89/95449198 81545 München http://liermann-it.de - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: ? add dependencies to surefire plugin
Do you need all those dependencies on the runtime test classpath? The only solution I see is to use the gf-client as test dependency and start excluding all that you don't need. There is no such thing as a scope runtime-test and I don't know if this ever came up. Maybe search through Jira for it. Hth, Nick Stolwijk ~Senior Java Developer~ iPROFS Wagenweg 208 2012 NM Haarlem T +31 23 547 6369 F +31 23 547 6370 I www.iprofs.nl On Thu, Mar 10, 2011 at 9:22 PM, Dipl.-Ing. Torsten Liermann wrote: > Thanks Nick. > > I need the artifact in the runtime classpath for the unit test. If I declare > this dependency normal with test scope, then maven (3.0.2) adds this artifact > to the test-compiler classpath. Glassfishs gf-client has over hundred > dependencies and so the compilation time is 500 % longer. :( > > On Thu, 10 Mar 2011 21:12:04 +0100 > Nick Stolwijk wrote: >>Does it need to be on the classpath of surefire or of your unittests? >> >>If it is the first you are on the good way. You can check with -X what >>the classpath for surefire is. >> >>For the second, add a normal dependency with scope test. >> >>Hth, >> >>Nick Stolwijk >>~Senior Java Developer~ >> >>iPROFS >>Wagenweg 208 >>2012 NM Haarlem >>T +31 23 547 6369 >>F +31 23 547 6370 >>I www.iprofs.nl >> >> >> >>On Thu, Mar 10, 2011 at 9:04 PM, Dipl.-Ing. Torsten Liermann >> wrote: >>> f-client >> >>- >>To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >>For additional commands, e-mail: users-h...@maven.apache.org >> > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: ? add dependencies to surefire plugin
There is an additionalClasspathElements parameter to Surefire, but I'm not sure if it will solve your problem. http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#additionalClasspathElements Hope that helps, Laird On Thu, Mar 10, 2011 at 3:22 PM, Dipl.-Ing. Torsten Liermann < l...@liermann-it.de> wrote: > Thanks Nick. > > I need the artifact in the runtime classpath for the unit test. If I > declare this dependency normal with test scope, then maven (3.0.2) adds this > artifact to the test-compiler classpath. Glassfishs gf-client has over > hundred dependencies and so the compilation time is 500 % longer. :( > > On Thu, 10 Mar 2011 21:12:04 +0100 > Nick Stolwijk wrote: > >Does it need to be on the classpath of surefire or of your unittests? > > > >If it is the first you are on the good way. You can check with -X what > >the classpath for surefire is. > > > >For the second, add a normal dependency with scope test. > > > >Hth, > > > >Nick Stolwijk > >~Senior Java Developer~ > > > >iPROFS > >Wagenweg 208 > >2012 NM Haarlem > >T +31 23 547 6369 > >F +31 23 547 6370 > >I www.iprofs.nl > > > > > > > >On Thu, Mar 10, 2011 at 9:04 PM, Dipl.-Ing. Torsten Liermann > > wrote: > >> f-client > > > >- > >To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > >For additional commands, e-mail: users-h...@maven.apache.org > > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Re: ? add dependencies to surefire plugin
Thanks Nick. I need the artifact in the runtime classpath for the unit test. If I declare this dependency normal with test scope, then maven (3.0.2) adds this artifact to the test-compiler classpath. Glassfishs gf-client has over hundred dependencies and so the compilation time is 500 % longer. :( On Thu, 10 Mar 2011 21:12:04 +0100 Nick Stolwijk wrote: >Does it need to be on the classpath of surefire or of your unittests? > >If it is the first you are on the good way. You can check with -X what >the classpath for surefire is. > >For the second, add a normal dependency with scope test. > >Hth, > >Nick Stolwijk >~Senior Java Developer~ > >iPROFS >Wagenweg 208 >2012 NM Haarlem >T +31 23 547 6369 >F +31 23 547 6370 >I www.iprofs.nl > > > >On Thu, Mar 10, 2011 at 9:04 PM, Dipl.-Ing. Torsten Liermann > wrote: >> f-client > >- >To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >For additional commands, e-mail: users-h...@maven.apache.org > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: ? add dependencies to surefire plugin
Does it need to be on the classpath of surefire or of your unittests? If it is the first you are on the good way. You can check with -X what the classpath for surefire is. For the second, add a normal dependency with scope test. Hth, Nick Stolwijk ~Senior Java Developer~ iPROFS Wagenweg 208 2012 NM Haarlem T +31 23 547 6369 F +31 23 547 6370 I www.iprofs.nl On Thu, Mar 10, 2011 at 9:04 PM, Dipl.-Ing. Torsten Liermann wrote: > f-client - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
? add dependencies to surefire plugin
Hi, I would like to add some dependencies to the surefire plugin like: org.apache.maven.plugins maven-surefire-plugin true org.glassfish.appclient gf-client 3.1 The artifact gf-client is missing in the classpath. What is my mistake? Thanks for a tip. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org