Well, it does "break" some things and I plan on fixing those. The problem with dictating the "provided" scope in the parent is that it totally screws up the transitive dependencies. So, in my example (which was generated from a quickstart), I've got slf4j-log4j declared as a dependency. But, since the parent declares it as "provided" and I don't specifically override the scope, it stays "provided" and doesn't show up in my WEB-INF/lib. Even worse, suppose I do override the scope to "compile", the transitive dependencies (slf4j-api and log4j) still remain "provided" because the parent declared them that way. If I want to fix it in my project, I've got to specifically declare all of the transitive dependencies with "compile" scope, which kind of defeats the purpose of having transitive dependencies in maven.
The thing that my "fix" breaks is that now, when a library like inmethod-grid declares slf4j-log4j as a dependency (why it does so, I have no idea), it shows up as "compile" (which is the default), meaning that any project that uses inmethod-grid will get the log4j implementation of slf4j as a transitive dependency. OUCH! So, I have to take out those dependency declarations because they're invalid. The inmethod-grid "library" should declare a dependency on the slf4j-api and the example should declare a dependency on the slf4j-log4j implementation. I don't mind fixing all of those places, but I'd rather spend my time working on my pet projects (like the webbeans integration piece I'm trying to finish). If anyone would be willing to help me by "fixing" their own projects, that would be greatly appreciated. On Sat, Mar 21, 2009 at 9:41 AM, Jeremy Thomerson <[email protected]> wrote: > I'm no Maven expert, but I believe we ended up doing it that way because it > allowed subprojects to override those dependencies. I think if your > subproject specifically needs it, you simply add it as a dependency to your > pom and change it to required. You don't have to define a version - that > should come from the parent. > > The reason to have it in the parent was to standardize the versions, but not > define many required dependencies. > > If you do make any change, please build and test the entire tree to mae sure > it doesn't break something else. > > Jeremy Thomerson > http://www.wickettraining.com > -- sent from a wireless device > > > -----Original Message----- > From: James Carman <[email protected]> > Sent: Saturday, March 21, 2009 8:01 AM > To: [email protected]; [email protected] > Subject: Wicketstuff Core Dependency Management... > > The dependencies in the main wicketstuff-core are "scoped" for stuff > like slf4j and jetty to be "provided". This totally screwed me up > when I was trying to write an example application (the log4j stuff > wasn't showing up because it was marked as provided by the parent > pom). Does anyone care if I remove the scope declarations from the > <dependencyManagement> section in the wicketstuff-core parent pom? It > fixed my problem when I did. > > James > > --------------------------------------------------------------------- > 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] > >
