Brian Ewins wrote:
Project releases should have no snapshot dependencies. Since your project.xml should be under version control with the rest of your code, building an old version means getting the code /and its project.xml/ from cvs or whatever, so you know what
Whoops. The paragraph above was just a snapshot...build failed ;)
Roman Rytov wrote:
I saw this description already and out of it my question arose. I don't wanna put version number in a jar's name so the dependent jar always has the same name. But in its manifest file the version mgight be found. The question is whether it's achievable for Maven to go so far/deep?
It would be possible, but in practice being able to look at a jar and know straight away what version it is is incredibly useful - particularly to non-java-literate people like support staff. Also, you'd have to restructure remote repositories entirely to support this, eg as
/groupid/type/artifactid/version/filename.jar
...because maven can't magically read inside jars on the other side of an ftp connection, and you need some way of storing jars so they don't overwrite each other.
Why I need it? If you build a spanshot version (using also SNAPSHOT
versions of dpendent modules) then the current
approach works fine. But if I wanna rebuild one of
previous versions and I have a list of versions used
then of all dependent jars?
If you build snapshots, or depend on snapshots, you are explicitly saying "I am doing development and I don't mind that this isn't repeatable". If your builds depend on release versions of jars, you have no problem - all those jars are in your repository.
The situation may look overcomplicated since I don't know where to take those "old-versioned" jars from:-) To rebuild dependent jars also by taking their sources from a corresponding to the version tag? But then how to store such jars (version number is not a part of jar name) and how to distinguish btw several versions of the same jar? I saw somewhere name transformation mechanism (something abount SNAPSHOT jars renaming?).
That's the release plugin you're thinking of. It changes all of your snapshot dependencies to explicit dependencies on jars with timestamps as their versions (the kind you get when you do jar:install-snapshot)
Shortly speaking, I'd like to have a system letting me
build versions retroactively also. Is it possible with
Maven?
Yes, but not with snapshot dependencies, and not with maven alone - you need a version control system. All you need to do is make sure your project.xml is version controlled with the rest of your source code.
If you *really* want to be able to repeat snapshot builds, you should only do builds after getting a clean copy from your version control system, and store all your projects together. Most systems support rolling back to a given date/time instead of just to a tag or label.
Perhaps you are looking for a continuous integration system as well? You want something that does a clean fetch of a project from version control, including its build script, runs the build script, and potentially labels the source in version control. CruiseControl and Anthill both do this, Anthill Pro has (apparently) got maven integration. These systems should be able to repeat any of their previous builds, mainly because of how they interact with version control, not because of any special properties of maven; however without maven you'll need to keep third party jars under version control as well.
-Baz
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
