1. you refer to a non-existant picture 2. Jorg's solution is the way to go.
-Stephen 2009/9/4 javadevd...@googlemail.com <javadevd...@googlemail.com> > Hi! > > Thanks for the complete answer. > I think i described it a bit inconclusive. But the approach you described > will also not solve the problem: > because: > the dependency i described can be transitive! (I dont know every dependency > - for example - of spring, so it's impossible for me to check every > version-range of every dependency of spring ...) > So.. if I have one parent pom for all the different versions of the > project, > there is still the problem, that some version range in any dependency (like > in the sample of my picture) > - not defined by myself (a transitive from any third party) - > influence all versions!! (because the newest version is used, and the > newest > version is first searched in the local repo - for all project versions) > > To define different local repos for every project Version is possible, but > then there are some problems with automatic build (after storing changed > code) in M2Eclipse, because you cant give maven-parameters with it. > > I hope it's a bit clearer... > > thanks > > > 2009/9/4 Jörg Schaible <joerg.schai...@gmx.de> > > > Hi, > > > > javadevd...@googlemail.com wrote at Freitag, 4. September 2009 09:38: > > > > > Hi all! > > > > > > My problem is not easy to describe :-) But i try it... > > > I have add a picture to this mail, where the situation is painted.. > > > > > > The Situation: > > > > > > There are two versions of my project. > > > - Version 3: This version is in production and has been frozen. (the > > > repository for V3 is offline, that no changes from dependencies can > make > > > trouble...) > > > - Version 4: This is the actual developed Version. It usees another > > remote > > > Repository because some dependencies changed. > > > > > > Using eclipse M2 plugin for developing. > > > > > > The Problem: > > > > > > All dependencies (from V3 and V4) are at the same time in the local > > > repository. And there is one special dependency (can also be > transitive) > > > with no fixed version. (red circle in painting) > > > In V4 there was created a new Version for that dependency (from a third > > > party! But i didn't recocnize, because maven fetch it automaticly!!) > > > Now, there is also a new Version of that dependeny in the local > > > repository. > > > > > > Suddenly there should be a bug fixing in V3! (So the frozen version > > should > > > be used to change something...) > > > But, the changed dependency, described above, is in the local > repository > > > and is also be used from V3, what is wrong, because the frozen state > used > > > another version! > > > (Another version can have some differences, where the build doesn't > > break, > > > but some different behaoviours can be in the software... so there are > > > unpredictable bugs!) > > > > > > Some possible solutions, and why they aren't real solutions: > > > > > > 1) clean the local repository before bug fixing V3: > > > To fetch all dependencies from remote Repository V3 needs some time. > And > > > the developer must be able to switch beetween V3 and V4 very fast. To > > > clean and "reload" the local repository is to time-intensive, and if > some > > > changes are made in V4, and after that again in V3, the clean should be > > > made again and again.... > > > 2) change dependencies version-range to one version only: > > > I have to look for all dependencies, transitive dependencies etc. where > > > some version ranges can be defined. This is to much to look for! > > > > > > So... If anythink is not described properly, please ask :-) > > > > Maybe you should reconsider your complete approach and start using Maven > > for > > the version management instead of managing the versions by exchanging > > repositories on your own. In this case Maven cannot help you and you > > already face the problem. See, we use M2 now since years and we're now - > > compared to your numbering scheme - at V10. However, I don't have to > clear > > my local repo to switch between different code lines. > > > > Basically start using a parent POM that is global for your project i.e. > > every POM of your project will inherit either directly or indirectly from > > that one. Use in this global POM a dependencyMgmt section and define > there > > all your deps with fix versions. That's it. This global POM will define > > that for your complete project all the used versions everytime. There's > no > > possibility anymore to get suddenly something else and this is completely > > independent from the stuff in your local repo. > > > > > I hope there is any solution for that problem... > > > > The location of the local repo is defined in the settings.xml. You can > use > > a > > separate settings.xml, its name and location can be defined from the > > command line. > > > > > Thanks if you are a this point! :-) > > > > No, I won't get there, because we take a different approach. You should > > really reconsider yours. > > > > - Jörg > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > > For additional commands, e-mail: users-h...@maven.apache.org > > > > >