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> <groupId>whatever</groupId> <artifactId>project-a</artifactId> <version>1.0</version> <scope>compile</scope> <exclusions> <exclusion> <groupId>whatever</groupId> <artifactId>webservices</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. > > <scope>provided</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. > <scope>compile</scope> doesn't work because the jar ends up inside the ear > <scope>test</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]