> > At the risk of derailing the conversion again though, there is likely a > good reason for why it has been such an up hill battle for you. I hope you > are prepared to consider that CD is not as great of a solution to a lot of > the industry as you wish it to be.
Well, if I and many others had not seen it make a huge difference to many organizations of many different types over many years, I would not have bothered investing 4 years of my personal life writing the book. What I'm proposing is not something new and magical - it's something that many, many others have successfully implemented. I am just the messenger here - please don't shoot me ;-) More seriously, sure, it is not a silver bullet. Where it really matters is when you're delivering software that is strategic for business success. If you're not doing that, it's probably not that important. Let's assume that it is useful for some set of people. Why the resistance to Maven supporting this methodology? > If you don't change the binaries, they will still be a "snapshot" binary; > which never goes to a customer. For example, when you search a maven > repository, you will generally look for artifacts in a released reository. > If your customer artifacts are now in the snapshot repo, everyone is going > to have to start searching the released artifacts in the snapshot repos. > This is just confusing. > That's fine. What I'm suggesting is simply that Maven creates enough metadata when building a snapshot that the release plug-in can more or less just copy it to the released repository when necessary. Crucially though it won't cause it to be rebuilt. > I think maybe the part you're missing is the underlying culture of Maven. > If I need an artifact, you type it in a repository search, hit enter and > bingo, the dependency appears in your pom. It takes care of downloading all > of its transitive dependenies. I don't have to worry about getting latest > version of the dependencies, fixed versions.... If it's a released artifact, > I get fixed... if its snapshot, I get the latest. I don't have to look on > the internet and waste a whole bunch of time. It makes a devs life much > faster and much easier. > Yep, I absolutely undertand that. I am not trying to change anything about what you just said. In fact, I want to leverage it. > All I'm doing is adding some more metadata (in the form of > > changing > > the names, doing tagging, or whatever) > > How does your build know about this extra metadata? Where are you going to > store it? > I'm proposing to store it in the pom file that gets created along with the binary (*not* the project's pom file!) - see the example below A version of 1.0-SNAPSHOT simply means latest 1.0 version. Nice, clean and > simple. If you want a fixed version you say 1.0-01. Again, nice clean and > simple. > Right. Again, I'm not proposing to change this. I think the best place to store this information is in the binary itself. > That will allow you to recreate any build. That would be great, and the obvious place would be in MANIFEST.MF, but the format isn't rich enough to store all the information we'd need. Another possibility would be to create a custom maven XML extension file inside META-INF. > Here is an example snapshot folder: > > > https://repository.apache.org/content/repositories/maven-snapshots-sonatype/org/apache/maven/maven-core/3.0-SNAPSHOT/ Right - so you see this file: https://repository.apache.org/content/repositories/maven-snapshots-sonatype/org/apache/maven/maven-core/3.0-SNAPSHOT/maven-core-3.0-20101004.110147-683.pom All I'm suggesting is that in addition to the <groupId> and <artifactId> tags that are attached to each <dependency> we *also* store something like <source><uri>http://svn.apache.org/blah/blah </uri><version>1423</version></uri> That's it. The whole idea is that you are working off the latest, not a specific > version. If you are storing this information in source control (whether it's > the pom or in its own file) then you have to somehow constantly change that > information to always point to the latest. I don't think there is logically > away around that ;-). > So just to reiterate - I'm not suggesting we change the behavior. All I'm suggesting is that we *record* the information on what version in source control each snapshot artifact came from and propagate this information down the dependency chain so that doing a "release" in maven is just a question of copying the artifact to the release repo and updating some of the metadata in its associated pom file - say, giving it a "real" identifier. Thanks, Jez. -- Jez Humble Co-author, *Continuous Delivery <http://continuousdelivery.com/>* http://continuousdelivery.com/ http://jezhumble.net/ -- View this message in context: http://maven.40175.n5.nabble.com/Continuous-Delivery-and-Maven-tp3245370p3255940.html Sent from the Maven - Users mailing list archive at Nabble.com.