OK, it's me again with ideas that don't work :) I think I know why the previous solution didn't work. First, I think that relying on activemq-parent metadata is not good, since all modules are deployed separately. Second, the "newer" switch will delete all files that has the same time (in minutes) as the referenced file. After some head scratching, here's what I have come with
#!/bin/bash Dirlist=$(find activemq/ -mindepth 1 -maxdepth 1 -type d) today=`date +%j` for direc in $Dirlist ; do if [ -f ${direc}/maven-metadata-local.xml ] then stamp=`stat -c %Y ${direc}/maven-metadata-local.xml` days=`date +%j -d "1970-01-01 ${stamp} sec"` dif=`expr $today - $days` find ${direc} -type f -daystart -mtime +7 -mtime +${dif} -ls fi done In English, it traverse all module directories, get timestamp of the metadata file, coverts it to number of days since today and then adds an extra condition in the find command. So basically, it should prevent deletion of files created on a same day as last successful build. To customize this script, you should change the parent folder of activemq distribution and the name of metadata file used. I'm not sure, but I think it could help (and cost us nothing to try :) ). Regards, Dejan James.Strachan wrote: > > On 9/16/07, Dave Syer <[EMAIL PROTECTED]> wrote: >> >> All the snapshot jars are missing from all directories again (as far as I >> can >> tell) - can something more be done about this? > > Damn - looks like the updates to our scripts don't work :( > > I've kicked off a new build which is now here... > http://people.apache.org/repo/m2-snapshot-repository/org/apache/activemq/apache-activemq/5.0-SNAPSHOT/ > > If anyone can think of any bright ideas to fix the script I'm all ears... > > I guess an early warning system could be some kinda cron script that > looks in one of the repo directories and warns if there's less than 6 > builds or something? > > -- > James > ------- > http://macstrac.blogspot.com/ > > -- View this message in context: http://www.nabble.com/Missing-jars-in-maven-repo--tf4377575s2354.html#a12775852 Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.