> My apologies - I realize it's somewhat unfair of me to say I don't want
> to
> discuss the value proposition any more and then dissect a bunch of what
> you
> said. I guess I have been explaining the value proposition quite a lot
> recently and would like to get back to some more technical stuff

I can understand that.  I am sure you have been pushing this idea for quite a 
while and saying a lot to back it up.

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. 
 
> So long as I don't change the actual binaries, how does this invalidate
> the
> testing?

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.

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.

Maven is able to do this I think in large part due to the fact that version 
information about the artifact is right in the pom. However, I feel the cost is 
that Maven doesn't really support CD very well.

> 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?

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.

You can't store both in the pom file. Not without having to constantly change 
the pom file to always point to the latest.

So you'd have to store latest information elsewhere and store that in source 
control. There is currently no mechanism for this. But one could write their 
own plugin to do it. It would be kind of "hacky" in my mind but I am sure 
possible.

I think the best place to store this information is in the binary itself. That 
will allow you to recreate any build.

> 
> 
> > When I say meta data here, I am referring to the meta data maven stores
> > about the artifact. This information doesn't appear in the pom.
> >
> 
> I must admit my ignorance here - I thought Maven stored metadata about
> the
> artifact in the form of pom files (e.g. this one:
> http://repo2.maven.org/maven2/HTTPClient/HTTPClient/0.3-3/HTTPClient-0.3-
> 3.pom
> )

That is an example released artifact. And you'll only find released artifacts 
up on maven central (intentionally as this what is published for wide 
consumption). Snapshot repos and release repos are quite different. They are 
not even stored in the same way or same place.

Here is an example snapshot folder:

https://repository.apache.org/content/repositories/maven-snapshots-sonatype/org/apache/maven/maven-core/3.0-SNAPSHOT/

You reference a snapshot dependency by using a version of 3.0-SNAPSHOT.

You will notice a file here called maven-metadata.xml. This is the metadata I 
was referring to earlier. This metadata is also structured differently than 
release metadata.

So to really do what you are asking I think it would be a core change to the 
maven architecture. You would have to merge the concept of snapshot and 
releases which I don't think would be trivial.
 
> However when the build artifact is created as part of the CI process, the
> pom that is created with it also includes the information about exactly
> which versions of these snapshots were used, including the version in
> version control they were created from.

Unfortunately (or fortunately, depending on your perspective) it doesn't. Not 
for snapshots. And intentionally so. 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 ;-).



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to