Subversion Repositories DevTools

Rev

Rev 7253 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7253 Rev 7489
Line 137... Line 137...
137
  /** Holds the current buildfile 
137
  /** Holds the current buildfile 
138
   * 
138
   * 
139
   */
139
   */
140
  protected File mBuildFile = new File("");
140
  protected File mBuildFile = new File("");
141
  
141
  
-
 
142
  /** Holds the current buildInfo file
-
 
143
   * 
-
 
144
   */
-
 
145
  protected File mBuildInfoFile = new File("");
-
 
146
  
-
 
147
  /** Holds the current build metrics file
-
 
148
   * 
-
 
149
   */
-
 
150
  protected File mAbtMetricsFile = new File("");
-
 
151
  
142
  /**Set true when last build cycle caught SQLException or Exception.
152
  /**Set true when last build cycle caught SQLException or Exception.
143
   * @attribute
153
   * @attribute
144
   */
154
   */
145
  protected boolean mException;
155
  protected boolean mException;
146
 
156
 
Line 698... Line 708...
698
   */
708
   */
699
  private boolean touch()
709
  private boolean touch()
700
  {
710
  {
701
    mLogger.debug("touch");
711
    mLogger.debug("touch");
702
    boolean retVal = true;
712
    boolean retVal = true;
-
 
713
    File touch = new File( String.valueOf( mRtagId ) + "touch" );
703
    
714
    
704
    try
715
    try
705
    {
716
    {
706
      File touch = new File( String.valueOf( mRtagId ) + "touch" );
-
 
707
      
-
 
708
      if ( touch.exists() )
717
      if ( touch.exists() )
709
      {
718
      {
710
        // delete it
719
        // delete it
711
        retVal = touch.delete();
720
        retVal = touch.delete();
712
      }
721
      }
Line 728... Line 737...
728
      // this can be thrown by createNewFile
737
      // this can be thrown by createNewFile
729
      retVal = false;
738
      retVal = false;
730
      mLogger.warn("touch caught IOException");
739
      mLogger.warn("touch caught IOException");
731
    }
740
    }
732
    
741
    
-
 
742
    if ( touch.exists() ) {
-
 
743
      // Now clean it up
-
 
744
      touch.delete();
-
 
745
    }
-
 
746
    
733
    mLogger.debug("touch returned {}", retVal);
747
    mLogger.debug("touch returned {}", retVal);
734
    return retVal;
748
    return retVal;
735
  }
749
  }
736
  
750
  
737
  /**returns true if free disk space > 5G
751
  /**returns true if free disk space > 5G
Line 912... Line 926...
912
          mBuildFile.delete();
926
          mBuildFile.delete();
913
          throw new BuildSystemException("SaveBuildFile caught FileNotFoundException");    
927
          throw new BuildSystemException("SaveBuildFile caught FileNotFoundException");    
914
      }
928
      }
915
  }
929
  }
916
  
930
  
917
  /** Delete the build file
931
  /** Delete the build file and other associated files
918
   * 
932
   * 
919
   */
933
   */
920
  protected void deleteBuildFile()
934
  protected void deleteBuildFile()
921
  {
935
  {
922
      if ( mBuildFile.exists() )
936
      if ( mBuildFile.exists() ) {
923
      {
-
 
924
          mBuildFile.delete(); //NOSONAR
937
          mBuildFile.delete(); //NOSONAR
-
 
938
      }
-
 
939
      
-
 
940
      if ( mBuildInfoFile.exists() ) {
-
 
941
          mBuildInfoFile.delete(); //NOSONAR
-
 
942
      }
-
 
943
      
-
 
944
      if ( mAbtMetricsFile.exists() ) {
-
 
945
          mAbtMetricsFile.delete(); //NOSONAR
925
      }    
946
      } 
-
 
947
      
926
  }
948
  }
927
  
949
  
928
  /** Parse the ANT project
950
  /** Parse the ANT project
929
   *  Done once per build - useful information is extracted for use within the build
951
   *  Done once per build - useful information is extracted for use within the build
930
 * @param updateReporting 
952
 * @param updateReporting