Stat generation problem

Help
BatMat
2006-11-29
2013-04-11
  • BatMat
    BatMat
    2006-11-29

    Hello,

    I'm trying to setup some statistics using SvnStat, and got a problem generating the files, i use the script below :

    #!/bin/sh
    #

    WDIR="checkout"
    SVN="svn://atlas"
    SCRIPT="SvnStat-all.jar"
    PROJECT="universalcatalogue"
    OUTPUT="/home/mr/workspace/statsvn/"

    # SVN checkout
    if cd $WDIR; then
    ## universalcatalogue
        svn co $SVN/$PROJECT
        echo "SvnStat checkout successful for "$PROJECT
    else
        echo "A problem occured while changing dir to "$PROJECT
        exit 1
    fi

    # SVN logfile generation
    if cd $PROJECT/trunk; then
        svn log -v --xml --verbose > logfile.log
        echo "Logfile generated successfully"
    fi

    # StatSVN launch
    #if cd ../../../; then
    if cd /home/mr/workspace/svnstat/; then
        java -jar $SCRIPT -r $WDIR/$PROJECT/trunk/logfile.log -d $OUTPUT/$PROJECT
        echo "SvnStat generated successfully for "$PROJECT
    else
        echo "A problem occured while generating stats for "$PROJECT
        exit 1
    fi

    When i launch the above script stats.sh, i've got this output :

    mr@atlas:~/workspace/svnstat$ ./stats.sh
    Révision 9 extraite.
    SvnStat checkout successful for universalcatalogue
    Logfile generated successfully
    Failed to load Main-Class manifest attribute from
    SvnStat-all.jar
    SvnStat generated successfully for universalcatalogue

    I think the line "java -jar $SCRIPT -r $WDIR/$PROJECT/trunk/logfile.log -d $OUTPUT/$PROJECT" got a problem somewhere, but as i'm quite a newbie in java i do not understand why it failed...
    Maybe i'm doing something impossible, but the doc is quite lite when searching for setup information ;-)

    Could you please give some help ?

    Thanks
    ---
    Mathieu

     
    • BatMat
      BatMat
      2006-12-18

      Hello,

      Thanks for your reply.
      It works very well now with this additionnal parameter "-classpath" :

      java -classpath $SCRIPT de.agentlab.svnstat.SvnStat -jar $SCRIPT -r $WDIR/$PROJECT/trunk/logfile.log -d $OUTPUT/$PROJECT

      Thanks a lot for this good work.
      ---
      Mathieu