# Cron jobs for the maven repository
MAILTO=jason@maven.org
-0 */4 * * * cd $HOME/components/maven-meeper/src/bin; ./synchronize.sh
+0 */4 * * * cd $HOME/bin; ./synchronize.sh
0 0 * * * cd $HOME/reports; ./run.sh
. $syncProperties
-java -jar archiva-cli-1.0-SNAPSHOT-cli.jar -c synchronize.properties
-#java -jar archiva-cli-1.0-SNAPSHOT-cli.jar -c synchronize-java.net.properties
+$JAVA -jar archiva-cli-1.0-SNAPSHOT-cli.jar -c synchronize.properties
dir=/home/maven/repository-staging/to-ibiblio
src=$dir/maven2-converted-from-maven1
#!/bin/sh
export CENTRAL_HOST=maven01.managed.contegix.com
-export TOOLS_BASE=$HOME/components/maven-meeper/src/bin
+export TOOLS_BASE=$HOME/bin
export SYNC_TOOLS=$TOOLS_BASE/synchronize
export SYNCOPATE=$SYNC_TOOLS/syncopate
export M2_SYNC=$SYNC_TOOLS/m2-sync
export REPOCLEAN=$TOOLS_BASE/m1-m2-conversion
export M1_M2_REWRITE_RULES=$SYNC_TOOLS/m1-m2-mod-rewrite-rules.txt
export SYNC_REPORTS=$HOME/repository-staging/to-ibiblio/reports/sync
+export JAVA_HOME=/opt/java/sdk/current
+export JAVA=$JAVA_HOME/bin/java
export STAGING_DIR=$HOME/repository-staging/to-ibiblio
export MAVEN1_REPO=$STAGING_DIR/maven
echo "REPOCLEAN = $REPOCLEAN"
echo "M1_M2_REWRITE_RULES = $M1_M2_REWRITE_RULES"
echo "SYNC_REPORTS = $SYNC_REPORTS"
+echo "JAVA = $JAVA"
[ "$MODE" = "batch" ] && echo && echo "Press any key to continue, or hit ^C to quit." && echo
#!/bin/sh
+exclusions=$HOME/bin/synchronize/syncopate/exclusions.txt
+
echo This script is very temporary. Please validate all input files in the source repository before blindly copying them in.
echo Ensure all artifacts have a valid POM.
echo This will be removed when the repository manager is in place.
# check for changed files
if [ "$1" == "check" ]; then
- rsync -n --exclude=**/maven-metadata.xml* --exclude-from=$HOME/components/maven-meeper/src/bin/synchronize/syncopate/exclusions.txt --existing $RSYNC_OPTS -Lrtivzc "$RSYNC_SSH" $FROM/$GROUP_DIR $BASEDIR/$GROUP_DIR >> $CHANGED_LOG
+ rsync -n --exclude=**/maven-metadata.xml* --exclude-from=$exclusions --existing $RSYNC_OPTS -Lrtivzc "$RSYNC_SSH" $FROM/$GROUP_DIR $BASEDIR/$GROUP_DIR >> $CHANGED_LOG
else
echo "Syncing $FROM -> $GROUP_DIR"
- rsync --include=*/ --include=**/maven-metadata.xml* --exclude=* --exclude-from=$HOME/components/maven-meeper/src/bin/synchronize/syncopate/exclusions.txt $RSYNC_OPTS -Lrtivz "$RSYNC_SSH" $FROM/$GROUP_DIR $BASEDIR/$GROUP_DIR
- rsync --exclude-from=$HOME/components/maven-meeper/src/bin/synchronize/syncopate/exclusions.txt --ignore-existing $RSYNC_OPTS -Lrtivz "$RSYNC_SSH" $FROM/$GROUP_DIR $BASEDIR/$GROUP_DIR
+ rsync --include=*/ --include=**/maven-metadata.xml* --exclude=* --exclude-from=$exclusions $RSYNC_OPTS -Lrtivz "$RSYNC_SSH" $FROM/$GROUP_DIR $BASEDIR/$GROUP_DIR
+ rsync --exclude-from=$exclusions --ignore-existing $RSYNC_OPTS -Lrtivz "$RSYNC_SSH" $FROM/$GROUP_DIR $BASEDIR/$GROUP_DIR
fi