Re: What scope is like 'provided' and 'test' together?
Hmm, Why not use the scope in the same way as the class attribute in html? This would give: scopetest provided/scope this should tell maven that the dependency is needed for test, compile and is provided in a later stage by some container. Martijn On 2/6/06, Lee Meador [EMAIL PROTECTED] wrote: David, I am doing something sort of like you described and that seems to work. The work-around is to set the scope one way in a project that is depended on and then exclude it in a project that is dependant. It's just not very satisfying when what you want is to include the jar for regular compile and test compile and for test run but not for normal run. and the options don't include that combination. Thanks. On 2/4/06, David H. DeWolf [EMAIL PROTECTED] wrote: Lee, Have you tried using the exclusions that are available within the dependency declarations? If this webservices.jar is needed in a project (say project-a) which is included within an ear (say ear-project), you would define the following dependency within the ear-project pom: dependency groupIdwhatever/groupId artifactIdproject-a/artifactId version1.0/version scopecompile/scope exclusions exclusion groupIdwhatever/groupId artifactIdwebservices/artifactId /exclusion /exclusions /dependency With this approach, you could use a compile scoped dependency but not have it included in the ear. Hope that helps, David On 2/3/06, Lee Meador [EMAIL PROTECTED] wrote: I have a jar (webservices.jar) that I need for these things: 1) Compile main source. 2) Run tests in projects that are dependant on this one. But not for running the main source since that will run in the ejb container. scopeprovided/scope doesn't work because the jar isn't available for the tests in the dependent projects which need to instantiate a class from the jar but not to call it. scopecompile/scope doesn't work because the jar ends up inside the ear scopetest/scope doesn't work because the main code doesn't compile. Am I looking at this wrong somehow? The one solution I have found is to put it as provided in this project and put it as 'test in another project that runs tests that need classes. (I use the term project to mean a think with a POM of its own.) The problems with this are: 1) I can't run any such tests in the same project. (I can live with this.) 2) I have to put the dependency in the other project even though it is only needed when running the test that references this project. That seems wrong in some way. Any ideas? -- Lee Meador Sent from gmail. My real email address is [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- Lee Meador Sent from gmail. My real email address is [EMAIL PROTECTED] -- Living a wicket life... Martijn Dashorst - http://www.jroller.com/page/dashorst Wicket 1.1.1 is out: http://wicket.sourceforge.net/wicket-1.1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What scope is like 'provided' and 'test' together?
David, I am doing something sort of like you described and that seems to work. The work-around is to set the scope one way in a project that is depended on and then exclude it in a project that is dependant. It's just not very satisfying when what you want is to include the jar for regular compile and test compile and for test run but not for normal run. and the options don't include that combination. Thanks. On 2/4/06, David H. DeWolf [EMAIL PROTECTED] wrote: Lee, Have you tried using the exclusions that are available within the dependency declarations? If this webservices.jar is needed in a project (say project-a) which is included within an ear (say ear-project), you would define the following dependency within the ear-project pom: dependency groupIdwhatever/groupId artifactIdproject-a/artifactId version1.0/version scopecompile/scope exclusions exclusion groupIdwhatever/groupId artifactIdwebservices/artifactId /exclusion /exclusions /dependency With this approach, you could use a compile scoped dependency but not have it included in the ear. Hope that helps, David On 2/3/06, Lee Meador [EMAIL PROTECTED] wrote: I have a jar (webservices.jar) that I need for these things: 1) Compile main source. 2) Run tests in projects that are dependant on this one. But not for running the main source since that will run in the ejb container. scopeprovided/scope doesn't work because the jar isn't available for the tests in the dependent projects which need to instantiate a class from the jar but not to call it. scopecompile/scope doesn't work because the jar ends up inside the ear scopetest/scope doesn't work because the main code doesn't compile. Am I looking at this wrong somehow? The one solution I have found is to put it as provided in this project and put it as 'test in another project that runs tests that need classes. (I use the term project to mean a think with a POM of its own.) The problems with this are: 1) I can't run any such tests in the same project. (I can live with this.) 2) I have to put the dependency in the other project even though it is only needed when running the test that references this project. That seems wrong in some way. Any ideas? -- Lee Meador Sent from gmail. My real email address is [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- Lee Meador Sent from gmail. My real email address is [EMAIL PROTECTED]
Re: What scope is like 'provided' and 'test' together?
Lee, Have you tried using the exclusions that are available within the dependency declarations? If this webservices.jar is needed in a project (say project-a) which is included within an ear (say ear-project), you would define the following dependency within the ear-project pom: dependency groupIdwhatever/groupId artifactIdproject-a/artifactId version1.0/version scopecompile/scope exclusions exclusion groupIdwhatever/groupId artifactIdwebservices/artifactId /exclusion /exclusions /dependency With this approach, you could use a compile scoped dependency but not have it included in the ear. Hope that helps, David On 2/3/06, Lee Meador [EMAIL PROTECTED] wrote: I have a jar (webservices.jar) that I need for these things: 1) Compile main source. 2) Run tests in projects that are dependant on this one. But not for running the main source since that will run in the ejb container. scopeprovided/scope doesn't work because the jar isn't available for the tests in the dependent projects which need to instantiate a class from the jar but not to call it. scopecompile/scope doesn't work because the jar ends up inside the ear scopetest/scope doesn't work because the main code doesn't compile. Am I looking at this wrong somehow? The one solution I have found is to put it as provided in this project and put it as 'test in another project that runs tests that need classes. (I use the term project to mean a think with a POM of its own.) The problems with this are: 1) I can't run any such tests in the same project. (I can live with this.) 2) I have to put the dependency in the other project even though it is only needed when running the test that references this project. That seems wrong in some way. Any ideas? -- Lee Meador Sent from gmail. My real email address is [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
What scope is like 'provided' and 'test' together?
I have a jar (webservices.jar) that I need for these things: 1) Compile main source. 2) Run tests in projects that are dependant on this one. But not for running the main source since that will run in the ejb container. scopeprovided/scope doesn't work because the jar isn't available for the tests in the dependent projects which need to instantiate a class from the jar but not to call it. scopecompile/scope doesn't work because the jar ends up inside the ear scopetest/scope doesn't work because the main code doesn't compile. Am I looking at this wrong somehow? The one solution I have found is to put it as provided in this project and put it as 'test in another project that runs tests that need classes. (I use the term project to mean a think with a POM of its own.) The problems with this are: 1) I can't run any such tests in the same project. (I can live with this.) 2) I have to put the dependency in the other project even though it is only needed when running the test that references this project. That seems wrong in some way. Any ideas? -- Lee Meador Sent from gmail. My real email address is [EMAIL PROTECTED]