On 22 Mär 2013, Stephen Connolly wrote: > On 22 March 2013 08:12, Martin Höller <[email protected]> wrote: > > > Hi! > > > > On 21 Mär 2013, Stephen Connolly wrote: > > > > > I think mailing lists are not the best way to explain why different > > > solutions are to be preferred when ranking against what is best for the > > > Maven ecosystem as a whole. > > > > > > So I wrote a blog post to explain my views on what are good ways and what > > > are bad ways. > > > > > > > > http://developer-blog.cloudbees.com/2013/03/playing-trade-offs-with-maven.html > > > > Really good post, but... ;-) > > > > There is one thing that is IMHO not clearly (enough) stated in your post: > > it is in general a bad idea to add repositories to your POMs [1]. > > > > Section "2. Get the external jars into a public Maven repository" adds an > > additional <repository> to the pom.xml. This is usually bad pratice and > > should be avoided. Brian Fox wrote a detailed blog post [1] about this. > > > > Maybe you could link to this post and mentione, that putting the > > additional repo in your settings.xml is an alternative. > > > > Well if you put them into your settings.xml, then those extra repositories > are applied for *every single project that you build* > > If you put them in your pom.xml, then those extra repositories are only > applied for that project and *every single project that lists that project > as a transitive dependency*
Good point. > Also putting them in your settings.xml means you cannot just checkout and > build, putting them in your pom.xml allows most others to just checkout and > build (except for those of us behind a corporate proxy with a mandated > <mirrorOf>*</mirrorOf>) On the other hand putting them in pom.xml might bring you artifacts into your build from this repo without one noticing they are not coming from central. But I have to admit, in the scenario described by your post the pom.xml might be the better choice. However, a word of warning and a link to Brian's post would not hurt and would hopefully further educate maven users. best regards, - martin
signature.asc
Description: PGP signature
