my comments inline. To me, you seem to be viewing all of dependency management through the eyes of a single use case (being war exclusions), which is where we are disagreeing.
Maczka Michal wrote: >And it indeed requires some amount of extra work in a very limited set of >cases ( "triples what needs to be specified " is not really accurate - see >below). > To allow for multiple values: <scope>foo</scope> becomes <scopes> <scope>foo</scope> </scopes> if we are to retain the conventions used so far. >But if you compare this to amount of work needed in any other >solution I can think of it actually reduces that amount by much larger >factor (probably more then 10). > Actaully, your example adds 3 lines instead of 1, so its a factor of 3, not 10 - exactly the same - but for the other example each additional dependency is only one more on top of that, instead of 3 or 4 again as you are proposing :) But, really, I didn't intend to nitpick about the number of lines needed. That's not the point I was getting at. >So if you look for simplicity - this is >probaly the simplest solution. Just to exclude serlvletapi from war you will >have to change: > > Or for simplicity, let's make servletapi a default exclude for WAR and not configure anything. It's not worth changing the defiition of the dependencies for a single JAR. >Sure. But war is an assembling plugin and if you have project packaging set >to "war" you are actually not likely going to use the same pom for creating >other assemblies and you definitly know something about environment in which >this artifact will be used (servlet container). It is just a question if >standard attributes of dependencies are sufficient or not and if they are >not sufficient how it can be done in the other way. >Anyway scope tag (scope=test) is already used for filtering out artifacts >from assemblies so I don't see what's actually the problem with that. > > > I'm probably missing something, but I can't see how what you are saying here is related to my point at all. I'm saying you can't change the definition of scope for the entire system to fit the war use case. >>From a pure point of view a compile time dependency is always needed at >runtime (unless the code is never hit, or the server provides the jar, all >of which is environmental, not by >definition) > >Not true. For example servletapi is a jar agaist which you want to compile >but most servlet containers have classes from that jar bundled in their own >jars which have completely different names. > > Read what I wrote again. The servletapi, needed at compile time, is also needed at runtime. You've just said so yourself. Just because the container happens to provide it, doesn't change anything. Since we seem to be stuck on servletapi, let's go to a practical example. You run some tests using a mock library that calls your code, which utilises the servletapi. No container. What scope does the servletapi have in your proposal? You'll probably answer "compile, test" which in this example is valid. What if these tests were not junit tests, but some other set using the "runtime" classpath? So you add runtime to servletapi and now it is automatically included in the war - exactly what you didn't want. We can't mix concepts. scope != bundling, so we can't try and abuse it to make it the same. It will give you the right default 99% of the time, the other 1% you need to configure it, under the war plugin in terms of bundling. >I think this case qualifies for such change :) > > That's much easier for you to say since you aren't doing the work :) You can't argue the point in terms of one use case. You need to address how all the counter examples raised would work under your scheme too. Then, if there are others who agree that is better, we can look into it. But I think the confusion here is just how it is being communicated, not that the concept is broken. - Brett --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
