I believe this was fixed in SVN after alpha3. You might try a recent nightly or querying JIRA to confirm.
-----Original Message----- From: Edwin Punzalan [mailto:[EMAIL PROTECTED] Sent: Friday, August 19, 2005 8:21 PM To: Maven Users List Subject: Re: [m2] no dependencies in webapp build (bug?) I believe this is a bug. The provided scope should work the same way as the compile scope with the exception that provided scoped dependencies will not be "packaged" inside the generated package. Please file a jira issue on http://jira.codehaus.org/secure/BrowseProject.jspa?id=10500 Thank you. Julian Wood wrote: > OK, I've played with this some more now. Our network is up and down > due to that dratted W32/IRCbot.worm!, so I couldn't get to the maven > 2 docs at all, and was just shooting in the dark a bit. > > I still haven't fixed my problem, however. I have two subprojects - a > jar and a webapp, where the webapp requires the jar. > > So, just focusing on the jar pom. It's pom has only 3 dependencies for > a successful compile. I can do > > m2 clean:clean compile > > successfully when scope is either compile or provided, but obviously > not when scope is either runtime or test. Now when I do > > m2 clean:clean package > > I can only compile the test if the scope is set to compile. So trying > to skip the test, while leaving scope at provided: > > m2 -Dmaven.test.skip=true clean:clean package > > It still tries to compile the test, and fails, unless I set the > dependency scope to compile. This doesn't seem right in itself, but > the problem gets worse. > > So I install my jar into my local repository, making it available to > my webapp. My webapp has no other dependencies. But doing an m2 > package of my webapp grabs all the dependencies of the jar, which can > only be scoped at compile, if I want the tests to work. So I seem to > be stuck. > > Maybe that's the way it is supposed to work, but it seems like the > 'provided' scope should make a dependency available on the classpath > of the test compile. Or maybe there's another way to do that. > > In the interim, what sort of a "post goal" could I do to delete the > dependencies from the target lib before assembling into a war? > > Thanks, > > J > > > > > > > > > So I had just found provided, but it still doesn't do what I expected > it to do. > > If my dependencies are all compile, everything is fine, except that it > places them in the webapp. > > If I set it to provided, compile fails. This doesn't seem right at > all. In fact, the only time I can actually successfully compile is if > the scope is set to compile (not > > > > > On 19-Aug-05, at 11:58 AM, <[EMAIL PROTECTED]> > <[EMAIL PROTECTED]> wrote: > >> Set the scope to 'provided'. I got myself confused, but compile is the >> widest scope. >> >> -----Original Message----- >> From: Julian Wood [mailto:[EMAIL PROTECTED] >> Sent: Friday, August 19, 2005 7:47 PM >> To: Maven Users List >> Subject: [m2] no dependencies in webapp build >> >> Hi, >> >> I want to build my webapp without the dependencies required for >> compiling and testing. I had thought that limiting their scope to >> compile would prevent them from showing up in the webapp build, but >> that >> is not the case. >> >> How can I do this? >> >> Thanks, >> >> J >> >> -- >> Julian Wood <[EMAIL PROTECTED]> >> >> Programmer/Analyst >> University of Calgary >> >> http://commons.ucalgary.ca >> >> >> --------------------------------------------------------------------- >> 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] >> >> > > -- > Julian Wood <[EMAIL PROTECTED]> > > Programmer/Analyst > University of Calgary > > http://commons.ucalgary.ca > > > --------------------------------------------------------------------- > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
