Subversion Repositories DevTools

Rev

Rev 858 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 858 Rev 862
Line 489... Line 489...
489
      // previous error occurred processing the build file content
489
      // previous error occurred processing the build file content
490
      return;
490
      return;
491
    }
491
    }
492
    
492
    
493
    File buildFile = new File(mRtagId + "build.xml");
493
    File buildFile = new File(mRtagId + "build.xml");
-
 
494
    boolean logError = true;
494
    
495
    
495
    try
496
    try
496
    {
497
    {
497
      // clear the file contents
498
      // clear the file contents
498
      if ( buildFileContent != null && target != null && target.compareTo("AbtSetUp") == 0 )
499
      if ( buildFileContent != null && target != null && target.compareTo("AbtSetUp") == 0 )
Line 516... Line 517...
516
          lineCount++;
517
          lineCount++;
517
          
518
          
518
          if ( lineCount == 2 )
519
          if ( lineCount == 2 )
519
          {
520
          {
520
            // have read the first two lines
521
            // have read the first two lines
521
            String inject = "<property name=\"MASTER\" value=\"";
522
            String inject = "<property name=\"abt_MASTER\" value=\"";
522
            
523
            
523
            if ( master )
524
            if ( master )
524
            {
525
            {
525
              inject += "yes\"/>" + lf;
526
              inject += "yes\"/>" + lf;
526
            }
527
            }
Line 530... Line 531...
530
            }
531
            }
531
            
532
            
532
            // insert a GBE_BUILDFILTER property if necessary
533
            // insert a GBE_BUILDFILTER property if necessary
533
            if ( mGbebuildfilter.length() > 0 )
534
            if ( mGbebuildfilter.length() > 0 )
534
            {
535
            {
535
              inject += "<property name=\"GBE_BUILDFILTER\" value=\"" + mGbebuildfilter + "\"/>" + lf;
536
              inject += "<property name=\"abt_GBE_BUILDFILTER\" value=\"" + mGbebuildfilter + "\"/>" + lf;
536
            }
537
            }
537
            
538
            
538
            mLogger.info("deliverChange injecting " + inject);
539
            mLogger.info("deliverChange injecting " + inject);
539
            sanitisedBFC += inject;
540
            sanitisedBFC += inject;
540
          }
541
          }
Line 553... Line 554...
553
      dl.setMessageOutputLevel(Project.MSG_INFO);
554
      dl.setMessageOutputLevel(Project.MSG_INFO);
554
      p.addBuildListener(dl);
555
      p.addBuildListener(dl);
555
      p.init();
556
      p.init();
556
      ProjectHelper pH = ProjectHelper.getProjectHelper();
557
      ProjectHelper pH = ProjectHelper.getProjectHelper();
557
      p.addReference("ant.projectHelper", pH);
558
      p.addReference("ant.projectHelper", pH);
-
 
559
      
-
 
560
      // parse can throw BuildException, this is serious
558
      pH.parse(p, buildFile);
561
      pH.parse(p, buildFile);
559
      mLogger.warn("deliverChange ant launched on " + buildFile.getAbsolutePath());
562
      mLogger.warn("deliverChange ant launched on " + buildFile.getAbsolutePath());
560
      
563
      
561
      if ( target == null )
564
      if ( target == null )
562
      {
565
      {
563
        target = p.getDefaultTarget();
566
        target = p.getDefaultTarget();
564
      }
567
      }
565
      mLogger.warn("deliverChange ant launched against target " + target);
568
      mLogger.warn("deliverChange ant launched against target " + target);
-
 
569
      
-
 
570
      // executeTarget can throw BuildException, this is not serious
-
 
571
      logError = false;
566
      p.executeTarget(target);
572
      p.executeTarget(target);
567
      mLogger.warn("deliverChange ant returned");
573
      mLogger.warn("deliverChange ant returned");
568
    }
574
    }
569
    catch( BuildException e )
575
    catch( BuildException e )
570
    {
576
    {
-
 
577
      if ( logError )
-
 
578
      {
-
 
579
        mLogger.error("deliverChange caught BuildException, the build failed " + e.getMessage());
-
 
580
      }
-
 
581
      else
-
 
582
      {
571
      mLogger.debug("deliverChange caught BuildException, big deal, the build failed " + e.getMessage());
583
        mLogger.debug("deliverChange caught BuildException, big deal, the build failed " + e.getMessage());
-
 
584
      }
572
      
585
      
573
      if ( target.compareTo( "AbtSetUp ") == 0 )
586
      if ( target.compareTo( "AbtSetUp ") == 0 )
574
      {
587
      {
575
        mSetUpErrorReported = true;
588
        mSetUpErrorReported = true;
576
      }
589
      }