Thanks that was very instructive. I understand that SNAPSHOT is the one on the bleeding edge, but is there a way to declare the "latest on that development branch", or in other words the "1.2.x" where "x" denotes the latest revision of the 1.2 series.
We are following the convention of major.minor.revision numbering and it would be great if I don't have to change all the project files if we release a new revision of a library (which shouldn't change the semantics of the interface). Can I do this already? Thanks, -max > -----Original Message----- > From: Brian Ewins [mailto:[EMAIL PROTECTED] > Sent: Monday, July 07, 2003 12:23 PM > To: Maven Users List > Subject: Re: Problems with dependencies > > > SNAPSHOT is saying you depend on the 'cutting edge' build. > Working with > snapshots of everything for releases is frowned upon as it means your > builds aren't actually repeatable; however its useful during > development. > > maven jar:install-snapshot > > builds a jar with a timestamp instead of the usual version number. It > installs both this, and a copy with the word 'SNAPSHOT' in > place of the > version number into your local repository. The use of the > timestamp will > become clear shortly... > > Now you can declare a dependency on that jar with 'SNAPSHOT' as its > version. Maven will always try to download the latest > SNAPSHOT version > from a remote repository, but it will only use it if it's newer than > your local copy. > > Once you're ready to do a release, you want to make your build > repeatable. The 'release' plugin is supposed to let you flip all your > dependencies from snapshots to specific versions. It does this by > looking at a snapshot-version file and changing your > dependency to the > matching timestamped jar - which is why we have the second > copy of the jar. > > Currently maven only updates what the snapshot jar is when you do a > snapshot build. Personally I think it would make more sense > to update it > for all builds, since at present the release build can /never/ be the > snapshot. Herein lies the problem you found with log4j; you > can't just > declare all your dependencies as snapshots, then make them release > dependencies again, because many jars have never had a > snapshot release. > Log4j is a case in point - you might think the snapshot would > be 1.2.8 > but there has never been a /timestamped/ snapshot build, so snapshot > dependencies on log4j will not work. > > Cheers, > Baz > Maximilian A. Ott wrote: > > > Thanks for the reply, but this is not the problem. I see > your point, > > but Apache is simply ignoring the redundant slash. > > > > I saw it check for the library once (when it wasn't installed) and > > printed a message to that effect. Now it is not even trying to do > > that. > > > > Ahhh! Lights flashing! > > > > If there is a dependency Maven downloads it into it's LOCAL > repository > > and not, as I expected, into the project's target > directory. I assume > > Maven is building a classpath for compiling to point back into the > > local repository. Unexpected, but it does make sense. > > > > I also realized that I was setting up the wrong dependency > (I needed > > log4j, not jdom). > > > > Now it works! > > > > What I still haven't figured out is the "SNAPSHOT" keyword. > I started > > with: > > > > <dependency> > > <id>log4j</id> > > <version>SNAPSHOT</version> > > </dependency> > > > > But that failed with an error. I know the documentation > said that it > > will consider this a failed dependency, but it's not clear > how it is > > supposed to work. The following did, but locks me into a particular > > version. > > > > <dependency> > > <id>log4j</id> > > <version>1.2.7</version> > > </dependency> > > > > Thanks, > > > > -max > > > > > > > > > --------------------------------------------------------------------- > > 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] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
