[Issue 105159] Results of build for bpel project from IDE and command line are different editor_hints_cleanup_83347b_root
authoryaroslavskiy@netbeans.org
Tue, 24 Jul 2007 12:55:11 +0000
changeset 851a6790d506242
parent 850 892bd4d99f3b
child 852 4e14dd74659b
[Issue 105159] Results of build for bpel project from IDE and command line are different
bpel.project/antsrc/org/netbeans/modules/bpel/project/anttasks/ValidateBPEL.java
bpel.project/antsrc/org/netbeans/modules/bpel/project/anttasks/ValidateBPELProject.java
bpel.project/antsrc/org/netbeans/modules/bpel/project/anttasks/ValidateBPELProjectTask.java
bpel.project/nbproject/project.properties
bpel.samples/resources/AsynchronousSample/AsynchronousSample/build.xml
bpel.samples/resources/AsynchronousSample/AsynchronousSampleApplication/build.xml
bpel.samples/resources/SynchronousSample/SynchronousSample/build.xml
bpel.samples/resources/SynchronousSample/SynchronousSampleApplication/build.xml
bpel.samples/resources/TravelReservationService/TravelReservationService/build.xml
bpel.samples/resources/TravelReservationService/TravelReservationServiceApplication/build.xml
compapp.projects.jbi/src/org/netbeans/modules/compapp/projects/jbi/resources/build.xsl
     1.1 --- a/bpel.project/antsrc/org/netbeans/modules/bpel/project/anttasks/ValidateBPEL.java	Tue Jul 24 12:03:52 2007 +0000
     1.2 +++ b/bpel.project/antsrc/org/netbeans/modules/bpel/project/anttasks/ValidateBPEL.java	Tue Jul 24 12:55:11 2007 +0000
     1.3 @@ -19,11 +19,8 @@
     1.4  package org.netbeans.modules.bpel.project.anttasks;
     1.5  
     1.6  import java.io.File;
     1.7 -
     1.8  import java.net.URI;
     1.9 -
    1.10  import java.util.Collection;
    1.11 -
    1.12  import java.util.Iterator;
    1.13  
    1.14  import org.netbeans.modules.xml.xam.spi.ValidationResult;
    1.15 @@ -43,32 +40,20 @@
    1.16   * @author Sreenivasan Genipudi
    1.17   */
    1.18  public class ValidateBPEL {
    1.19 -    /**
    1.20 -     * Constructor
    1.21 -     */
    1.22 -    public ValidateBPEL() {
    1.23 -       
    1.24 -    }
    1.25 +    public ValidateBPEL() {}
    1.26      
    1.27 -    /**
    1.28 -     * Validate the BPEL
    1.29 -     * @param bpelFileUri Bpel File URI
    1.30 -     * @return Collection of results
    1.31 -     */
    1.32      public Collection validate(URI bpelFileUri) {
    1.33 -        
    1.34          BpelModel model = null;
    1.35          try {
    1.36              model = BPELCatalogModel.getDefault().getBPELModel(bpelFileUri);
    1.37          }catch (Exception ex) {
    1.38              ex.printStackTrace();
    1.39 -            throw new RuntimeException(" Error while trying to create BPEL Model ",ex);
    1.40 +            throw new RuntimeException("Error while trying to create BPEL Model ",ex);
    1.41          }
    1.42 -        //Validator validator = (Validator) Lookups.metaInfServices(getClass().getClassLoader()).lookup(Validator.class);
    1.43 -         Validation validation = new Validation();
    1.44 -         validation.validate((org.netbeans.modules.xml.xam.Model)model,  ValidationType.COMPLETE);
    1.45 +        Validation validation = new Validation();
    1.46 +        validation.validate((org.netbeans.modules.xml.xam.Model)model,  ValidationType.COMPLETE);
    1.47          Collection col  =validation.getValidationResult();
    1.48 -        //Collection col = validation.getValidationResult();
    1.49 +
    1.50          for (Iterator itr = col.iterator(); itr.hasNext();) {
    1.51             ResultItem resultItem = (ResultItem) itr.next();
    1.52          }
     2.1 --- a/bpel.project/antsrc/org/netbeans/modules/bpel/project/anttasks/ValidateBPELProject.java	Tue Jul 24 12:03:52 2007 +0000
     2.2 +++ b/bpel.project/antsrc/org/netbeans/modules/bpel/project/anttasks/ValidateBPELProject.java	Tue Jul 24 12:55:11 2007 +0000
     2.3 @@ -73,46 +73,16 @@
     2.4   * @author Sreenivasan Genipudi
     2.5   */
     2.6  public class ValidateBPELProject extends Task {
     2.7 -    //Member variable representing source directory
     2.8 -    /**
     2.9 -     * Source directory
    2.10 -     */
    2.11      private String mSourceDirectory;
    2.12 -    //Member variable representing project classpath
    2.13 -    /**
    2.14 -     * Project classpath
    2.15 -     */
    2.16      private String mProjectClassPath;
    2.17 -    //Member variable representing build directory
    2.18 -    /**
    2.19 -     * Build directory
    2.20 -     */
    2.21      private String mBuildDirectory;
    2.22 -    //Member variable representing dependent project files directory
    2.23 -    /**
    2.24 -     * List fo dependent project files
    2.25 -     */
    2.26      private String mBuildDependentProjectFilesDirectory;
    2.27 -    //Member variable representing dependent project directories
    2.28 -    /**
    2.29 -     * Dependent project directories
    2.30 -     */
    2.31      private List mDependentProjectDirs;
    2.32 -    //Member variable representing source dir
    2.33      private File mSourceDir;
    2.34 -    //Member variable representing build dir
    2.35      private File mBuildDir;
    2.36 -    //Member variable representing map of file names to BPEL file
    2.37 -    // used to check if the file was changed since lasttime the 
    2.38 -    // file was validated.
    2.39      private Map mBpelFileNamesToFileInBuildDir = new HashMap();
    2.40 -    
    2.41      private boolean isFoundErrors = false;
    2.42 -    
    2.43      private boolean mAllowBuildWithError = false;
    2.44 -    /**
    2.45 -     * Logger instance
    2.46 -     */
    2.47      private Logger logger = Logger.getLogger(ValidateBPELProject.class.getName());
    2.48  
    2.49      /**
    2.50 @@ -121,7 +91,6 @@
    2.51      public ValidateBPELProject() {
    2.52      }
    2.53      
    2.54 -    
    2.55      /**
    2.56       * Set the source directory
    2.57       * @param srcDir Source directory
    2.58 @@ -194,7 +163,7 @@
    2.59       * Validate the BPEL Model
    2.60       */
    2.61      public void execute() throws BuildException {
    2.62 -       
    2.63 +//System.out.println("11");
    2.64          if(this.mSourceDirectory == null) {
    2.65                  throw new BuildException("No directory is set for source files.");
    2.66          }
    2.67 @@ -206,9 +175,7 @@
    2.68          if(this.mBuildDependentProjectFilesDirectory == null) {
    2.69                  throw new BuildException("No dependentProjectFiles directory is set.");
    2.70          }
    2.71 -        
    2.72 -                
    2.73 -        //create file object for project source directory
    2.74 +//System.out.println("22");
    2.75          try {
    2.76                  this.mSourceDir = new File(this.mSourceDirectory);
    2.77                  CommandlineBpelProjectXmlCatalogProvider.getInstance().setSourceDirectory(this.mSourceDirectory);
    2.78 @@ -216,23 +183,16 @@
    2.79          } catch(Exception ex) {
    2.80                  throw new BuildException("Failed to get File object for project source directory "+ this.mSourceDirectory, ex);
    2.81          }
    2.82 -        
    2.83 -        //create file object for project build directory
    2.84 +//System.out.println("33");
    2.85          try {
    2.86                  this.mBuildDir = new File(this.mBuildDirectory);
    2.87          } catch(Exception ex) {
    2.88                  throw new BuildException("Failed to get File object for project build directory "+ this.mBuildDirectory, ex);
    2.89          }
    2.90 -        
    2.91 -        
    2.92 -        //read project classpath
    2.93 -        //TODO: refactor this to use wsdl classpath. also we are assuming that source
    2.94 -        //are in src we should look into project properties. but this is done like 
    2.95 -        //this in all icanpro projects??
    2.96 +//System.out.println("44");
    2.97          ArrayList projectDirs = new ArrayList();
    2.98 -        if(this.mProjectClassPath != null 
    2.99 -           && !this.mProjectClassPath.trim().equals("")
   2.100 -                   && !this.mProjectClassPath.trim().equals("${javac.classpath}")) {
   2.101 +
   2.102 +        if(this.mProjectClassPath != null && !this.mProjectClassPath.trim().equals("") && !this.mProjectClassPath.trim().equals("${javac.classpath}")) {
   2.103                  StringTokenizer st = new StringTokenizer(this.mProjectClassPath, ";");
   2.104                  while (st.hasMoreTokens()) {
   2.105                      String spath = st.nextToken();
   2.106 @@ -247,18 +207,14 @@
   2.107                      }
   2.108                  }
   2.109          }
   2.110 -        
   2.111 +//System.out.println("55");
   2.112          processBpelFilesFolderInBuildDir(this.mBuildDir);
   2.113          this.mDependentProjectDirs = projectDirs;
   2.114 -        
   2.115          ArrayList sourceDirs = new ArrayList();
   2.116          sourceDirs.add(this.mSourceDir);
   2.117 -        
   2.118 +//System.out.println("66");
   2.119          processSourceDirs(sourceDirs);
   2.120 -        
   2.121 -  //      if(foundValidationErrors) {
   2.122 -   //             throw new BuildException("Found compilation errors in project files.");
   2.123 -    //    }   
   2.124 +//System.out.println("77");
   2.125      }
   2.126      
   2.127      private void processBpelFilesFolderInBuildDir(File folder) {
   2.128 @@ -347,72 +303,82 @@
   2.129          private boolean isBpelFileModified(File bpelFile) {
   2.130                  boolean modified = true;
   2.131                  String relativePath = RelativePath.getRelativePath(this.mSourceDir, bpelFile);
   2.132 -                
   2.133                  File bpelFileInBuildDir = (File) this.mBpelFileNamesToFileInBuildDir.get(relativePath);
   2.134                  
   2.135                  if(bpelFileInBuildDir != null) {
   2.136                          if(bpelFileInBuildDir.lastModified() == bpelFile.lastModified()) {
   2.137                                  modified = false;
   2.138                          }
   2.139 -                        
   2.140                  }
   2.141 -                
   2.142                  return modified;
   2.143          }
   2.144          
   2.145          private void validateBPEL(File bpel) throws BuildException {
   2.146 +System.out.println("111");
   2.147              BpelModel model = null;
   2.148 +            
   2.149              try {
   2.150 +System.out.println("222");
   2.151                  model = BPELCatalogModel.getDefault().getBPELModel(bpel.toURI());
   2.152 -            }catch (Exception ex) {
   2.153 -             //   ex.printStackTrace();
   2.154 -                throw new RuntimeException(" Error while trying to create BPEL Model ",ex);
   2.155 +System.out.println("333");
   2.156              }
   2.157 +            catch (Exception e) {
   2.158 +                throw new RuntimeException("Error while trying to create BPEL Model", e);
   2.159 +            }
   2.160 +System.out.println("444");
   2.161              //Validator validator = (Validator) Lookups.metaInfServices(getClass().getClassLoader()).lookup(Validator.class);
   2.162 -             Validation validation = new Validation();
   2.163 -             validation.validate((org.netbeans.modules.xml.xam.Model)model,  ValidationType.COMPLETE);
   2.164 -            Collection col  =validation.getValidationResult();
   2.165 +            try {
   2.166 +
   2.167 +            Validation validation = new Validation();
   2.168 +            validation.validate((org.netbeans.modules.xml.xam.Model) model, ValidationType.COMPLETE);
   2.169 +            Collection col = validation.getValidationResult();
   2.170              boolean isError = false;
   2.171              //Collection col = validation.getValidationResult();
   2.172 +
   2.173 +System.out.println("555");
   2.174              for (Iterator itr = col.iterator(); itr.hasNext();) {
   2.175                 ResultItem resultItem = (ResultItem) itr.next();
   2.176                 logValidationErrors(bpel, resultItem);
   2.177 +
   2.178                 if(resultItem.getType() == Validator.ResultType.ERROR) {
   2.179                     isError = true;
   2.180                 }
   2.181              }
   2.182 -            
   2.183 +System.out.println("666");
   2.184              if(isError) {
   2.185                  this.isFoundErrors = true;
   2.186              }
   2.187 +            }
   2.188 +            catch (Throwable e) {
   2.189 +System.out.println();
   2.190 +System.out.println("ERROR");
   2.191 +                e.printStackTrace();
   2.192 +            }
   2.193          }
   2.194          
   2.195          private void logValidationErrors(File bpelFile, ResultItem resultItem) {
   2.196 -            
   2.197 -                int lineNumber = 0;
   2.198 -        int columnNumber = 0;
   2.199 -        String errorDescription = resultItem.getDescription();
   2.200 -                String msgType = resultItem.getType().name();
   2.201 -            Component component = resultItem.getComponents();
   2.202 -            File file = null;
   2.203 -            if(component != null) {
   2.204 -                    lineNumber = ModelUtil.getLineNumber(component);
   2.205 -                    columnNumber = ModelUtil.getColumnNumber(component);
   2.206 -                    file = (File) component.getModel().getModelSource().getLookup().lookup(File.class);        
   2.207 -                    showError(file,columnNumber, lineNumber,errorDescription,msgType );
   2.208 -                
   2.209 +          int lineNumber = 0;
   2.210 +          int columnNumber = 0;
   2.211 +          String errorDescription = resultItem.getDescription();
   2.212 +          String msgType = resultItem.getType().name();
   2.213 +          Component component = resultItem.getComponents();
   2.214 +          File file = null;
   2.215  
   2.216 -            }else {
   2.217 -                columnNumber = resultItem.getColumnNumber();
   2.218 -                lineNumber = resultItem.getLineNumber(); 
   2.219 -                file =(File)resultItem.getModel().getModelSource().getLookup().lookup(File.class);  
   2.220 -                showError(file,columnNumber, lineNumber,errorDescription ,msgType);
   2.221 -            }
   2.222 -        
   2.223 +          if(component != null) {
   2.224 +            lineNumber = ModelUtil.getLineNumber(component);
   2.225 +            columnNumber = ModelUtil.getColumnNumber(component);
   2.226 +            file = (File) component.getModel().getModelSource().getLookup().lookup(File.class);        
   2.227 +            showError(file,columnNumber, lineNumber,errorDescription,msgType );
   2.228 +          }
   2.229 +          else {
   2.230 +            columnNumber = resultItem.getColumnNumber();
   2.231 +            lineNumber = resultItem.getLineNumber(); 
   2.232 +            file =(File)resultItem.getModel().getModelSource().getLookup().lookup(File.class);  
   2.233 +            showError(file,columnNumber, lineNumber,errorDescription ,msgType);
   2.234 +          }
   2.235          }
   2.236          
   2.237          private void showError(File file, int columnNumber, int lineNumber, String errorDescription, String msgType) {
   2.238 -
   2.239              StringBuffer lineNumStr = new StringBuffer(5);
   2.240              StringBuffer columnNumStr = new StringBuffer(5);
   2.241  
   2.242 @@ -444,14 +410,13 @@
   2.243          private void loadAndValidateExistingBusinessProcess(File bpelFile) throws BuildException {
   2.244                  try {
   2.245                      validateBPEL(bpelFile);
   2.246 -  
   2.247                  } catch (Throwable ex) {
   2.248 -                        logger.log(Level.SEVERE, "Validation has errors on "+bpelFile.getAbsolutePath() );
   2.249 +                        logger.log(Level.SEVERE, "Validation has errors on " + bpelFile.getAbsolutePath());
   2.250                          
   2.251 -                        if ( ex.getMessage() != null) {
   2.252 +                        if (ex.getMessage() != null) {
   2.253                              logger.severe( ex.getMessage());
   2.254                          }
   2.255 -                        if (!mAllowBuildWithError) {
   2.256 +                        if ( !mAllowBuildWithError) {
   2.257                              StringWriter writer = new StringWriter();
   2.258                              PrintWriter pWriter = new PrintWriter(writer);
   2.259                              ex.printStackTrace(pWriter);
     3.1 --- a/bpel.project/antsrc/org/netbeans/modules/bpel/project/anttasks/ValidateBPELProjectTask.java	Tue Jul 24 12:03:52 2007 +0000
     3.2 +++ b/bpel.project/antsrc/org/netbeans/modules/bpel/project/anttasks/ValidateBPELProjectTask.java	Tue Jul 24 12:55:11 2007 +0000
     3.3 @@ -23,9 +23,7 @@
     3.4  import java.io.StringWriter;
     3.5  
     3.6  import java.lang.reflect.Method;
     3.7 -
     3.8  import java.net.URI;
     3.9 -
    3.10  import java.util.List;
    3.11  
    3.12  import org.apache.tools.ant.AntClassLoader;
    3.13 @@ -35,53 +33,24 @@
    3.14  import org.apache.tools.ant.types.Reference;
    3.15  import java.util.logging.Level;
    3.16  import java.util.logging.Logger;
    3.17 +
    3.18  /**
    3.19   * Ant task wrapper invokes Validate BPEL Model
    3.20   * @author Sreenivasan Genipudi
    3.21   */
    3.22  public class ValidateBPELProjectTask extends Task {
    3.23 -    /**
    3.24 -     * Constructor
    3.25 -     */
    3.26 -    public ValidateBPELProjectTask() {
    3.27 -    }
    3.28 +    public ValidateBPELProjectTask() {}
    3.29      
    3.30 -    /**
    3.31 -     * Constants
    3.32 -     */
    3.33      private static final String BPEL_EXT = ".bpel";
    3.34      private static final String WSDL_EXT = ".wsdl";
    3.35      private static final String XSD_EXT = ".xsd";
    3.36 -    /**
    3.37 -     * Logger instance
    3.38 -     */
    3.39 +
    3.40      private Logger logger = Logger.getLogger(ValidateBPELProjectTask.class.getName());
    3.41 -    // Member variable representing source directory
    3.42 -    /**
    3.43 -     * Source directory
    3.44 -     */
    3.45      private String mSourceDirectory = null;
    3.46 -    // Member variable representing build directory
    3.47 -    /**
    3.48 -     * Build directory
    3.49 -     */
    3.50      private String mBuildDirectory = null;    
    3.51 -    // Member variable representing project classpath
    3.52 -    /**
    3.53 -     * Project classpath
    3.54 -     */
    3.55      private String mProjectClassPath= null;
    3.56 -    /**
    3.57 -     * Dependent project directories
    3.58 -     */
    3.59      private List mDependentProjectDirs;
    3.60 -    /**
    3.61 -     * Custom classloader to invoke Validate BPEL
    3.62 -     */
    3.63      private AntClassLoader m_myClassLoader = null;
    3.64 -    /**
    3.65 -     * classpath reference
    3.66 -     */
    3.67      private Reference m_ref = null;
    3.68      private String mBuildDependentProjectFilesDirectory; 
    3.69      private boolean mbRunValidation = true;
    3.70 @@ -90,48 +59,32 @@
    3.71      public void setBuildDependentProjectDir(String dependentProjectFilesDir) {
    3.72          this.mBuildDependentProjectFilesDirectory = dependentProjectFilesDir;
    3.73      }
    3.74 +
    3.75      public void setClasspathRef(Reference ref) {
    3.76          this.m_ref = ref;
    3.77      }
    3.78 +    
    3.79      public void setBuildDirectory(String buildDir) {
    3.80          mBuildDirectory = buildDir;
    3.81      }
    3.82 -    /**
    3.83 -     * Set the source directory
    3.84 -     * @param srcDir source directory
    3.85 -     */
    3.86 +
    3.87      public void setSourceDirectory(String srcDir) {
    3.88          this.mSourceDirectory = srcDir;
    3.89      }
    3.90 -    /**
    3.91 -     * Run validation
    3.92 -     * @param srcDir source directory
    3.93 -     */
    3.94 +
    3.95      public void setRunValidation(String flag) {
    3.96          setAllowBuildWithError(flag);
    3.97          mAllowBuildWithError = !mAllowBuildWithError;
    3.98      }
    3.99 -        
   3.100 -    /**
   3.101 -     * Get the source directory
   3.102 -     * @return String value of the source directory
   3.103 -     */
   3.104 +
   3.105      public String getSourceDirectory() {
   3.106          return this.mSourceDirectory;
   3.107      }
   3.108      
   3.109 -    /**
   3.110 -     * Set the project classpath
   3.111 -     * @param projectClassPath
   3.112 -     */
   3.113      public void setProjectClassPath(String projectClassPath) {
   3.114          this.mProjectClassPath = projectClassPath;
   3.115      }
   3.116             
   3.117 -    /**
   3.118 -     * Run validation
   3.119 -     * @param srcDir source directory
   3.120 -     */
   3.121      public void setAllowBuildWithError(String flag) {
   3.122          if (flag != null) {
   3.123              if (flag.equals("false")) {
   3.124 @@ -142,83 +95,65 @@
   3.125          }
   3.126      }  
   3.127      
   3.128 -    /**
   3.129 -     * Invoke validate BPEL Model
   3.130 -     */
   3.131      public void execute() throws BuildException { 
   3.132          try {
   3.133 +//System.out.println("1111");
   3.134              m_myClassLoader = new AntClassLoader(); 
   3.135              initClassLoader(); 
   3.136 +//System.out.println("2222");
   3.137 +
   3.138              Class antTaskClass =  Class.forName("org.netbeans.modules.bpel.project.anttasks.ValidateBPELProject", true,m_myClassLoader );
   3.139              Thread.currentThread().setContextClassLoader(m_myClassLoader);
   3.140 +            Object validateBPELObj = antTaskClass.newInstance();
   3.141 +//System.out.println("3333");
   3.142              
   3.143 -            Object validateBPELObj = antTaskClass.newInstance();
   3.144 +            Method driver = antTaskClass.getMethod("setBuildDirectory", new Class[] { java.lang.String.class });
   3.145 +            Object[] param = new Object[] { this.mBuildDirectory };
   3.146 +            driver.invoke(validateBPELObj, param);
   3.147 +//System.out.println("4444");
   3.148 +                       
   3.149 +            driver = antTaskClass.getMethod("setSourceDirectory", new Class[] { java.lang.String.class });
   3.150 +            param = new Object[] { this.mSourceDirectory};
   3.151 +            driver.invoke(validateBPELObj, param);
   3.152 +//System.out.println("5555");
   3.153 +                      
   3.154 +            driver = antTaskClass.getMethod("setProjectClassPath", new Class[] { java.lang.String.class });
   3.155 +            param = new Object[] { this.mProjectClassPath };
   3.156 +            driver.invoke(validateBPELObj, param);
   3.157 +//System.out.println("6666");
   3.158 +                      
   3.159 +            driver = antTaskClass.getMethod("setBuildDependentProjectDir", new Class[] { java.lang.String.class });
   3.160 +            param = new Object[] { this.mBuildDependentProjectFilesDirectory};
   3.161 +            driver.invoke(validateBPELObj, param);
   3.162 +System.out.println("=========");
   3.163              
   3.164 +            driver = antTaskClass.getMethod("execute", null);
   3.165 +            driver.invoke(validateBPELObj, null);                    
   3.166 +System.out.println("8888");
   3.167              
   3.168 -            Method driver = antTaskClass.getMethod("setBuildDirectory",
   3.169 -                           new Class[] { java.lang.String.class });
   3.170 -            Object[] param = new Object[] {
   3.171 -                           this.mBuildDirectory
   3.172 -                       };
   3.173 -            driver.invoke(validateBPELObj,
   3.174 -                       param);
   3.175 -                       
   3.176 -            driver = antTaskClass.getMethod("setSourceDirectory",
   3.177 -                          new Class[] { java.lang.String.class });
   3.178 -            param = new Object[] {
   3.179 -                          this.mSourceDirectory
   3.180 -                      };
   3.181 -            driver.invoke(validateBPELObj,
   3.182 -                      param);   
   3.183 -                      
   3.184 -            driver = antTaskClass.getMethod("setProjectClassPath",
   3.185 -                          new Class[] { java.lang.String.class });
   3.186 -            param = new Object[] {
   3.187 -                          this.mProjectClassPath
   3.188 -                      };
   3.189 -            driver.invoke(validateBPELObj,
   3.190 -                      param);   
   3.191 -                      
   3.192 -            driver = antTaskClass.getMethod("setBuildDependentProjectDir",
   3.193 -                          new Class[] { java.lang.String.class });
   3.194 -            param = new Object[] {
   3.195 -                          this.mBuildDependentProjectFilesDirectory
   3.196 -                      };
   3.197 -            driver.invoke(validateBPELObj,
   3.198 -                      param);                        
   3.199 -            
   3.200 -            driver = antTaskClass.getMethod("execute",
   3.201 -                            null);
   3.202 -            driver.invoke(validateBPELObj, null);                    
   3.203 -            
   3.204 -            driver = antTaskClass.getMethod("isFoundErrors",
   3.205 -                    null);
   3.206 -            
   3.207 +            driver = antTaskClass.getMethod("isFoundErrors", null);
   3.208              Boolean isErrors = (Boolean) driver.invoke(validateBPELObj, null);
   3.209 +System.out.println("9999");
   3.210  
   3.211 -            if(isErrors.booleanValue()) {
   3.212 +            if (isErrors.booleanValue()) {
   3.213                  throw new BuildException("Found validation errors.");
   3.214              }
   3.215 -            
   3.216 -        }catch (Throwable ex) {
   3.217 -         //   ex.printStackTrace();
   3.218 -            if (!mAllowBuildWithError ) {
   3.219 +        }
   3.220 +        catch (Throwable ex) {
   3.221 +ex.printStackTrace();
   3.222 +            if ( !mAllowBuildWithError) {
   3.223                  logger.log(Level.FINE, "Validation has errors!!",ex );
   3.224 -                throw new BuildException("Found compilation errors.");
   3.225 +                throw new BuildException("!!! Found compilation errors.");
   3.226              }
   3.227          }
   3.228      }
   3.229      
   3.230 -    /**
   3.231 -     * Create custom classloader ( Ant classloader) with 
   3.232 -     * parentFirst = false
   3.233 -     */
   3.234      private void initClassLoader() {
   3.235          Path path = new Path(getProject());
   3.236          path.setRefid(m_ref);
   3.237 -        
   3.238          Path parentPath = new Path(getProject());
   3.239          ClassLoader cl = this.getClass().getClassLoader();
   3.240 +
   3.241          if (cl instanceof AntClassLoader) {
   3.242              parentPath.setPath(((AntClassLoader)cl).getClasspath());
   3.243              ((AntClassLoader)cl).setParent(null);
     4.1 --- a/bpel.project/nbproject/project.properties	Tue Jul 24 12:03:52 2007 +0000
     4.2 +++ b/bpel.project/nbproject/project.properties	Tue Jul 24 12:55:11 2007 +0000
     4.3 @@ -20,20 +20,20 @@
     4.4      
     4.5  #this is for running model with minimal nb dependency.
     4.6  test.unit.cp.extra=\
     4.7 -${netbeans.dest.dir}/platform6/lib/org-openide-util.jar:\
     4.8 -${netbeans.dest.dir}/platform6/core/org-openide-filesystems.jar:\
     4.9 -${netbeans.dest.dir}/platform6/modules/org-openide-loaders.jar:\
    4.10 -${netbeans.dest.dir}/ide7/modules/org-netbeans-modules-xml-xam.jar:\
    4.11 +${netbeans.dest.dir}/platform7/lib/org-openide-util.jar:\
    4.12 +${netbeans.dest.dir}/platform7/core/org-openide-filesystems.jar:\
    4.13 +${netbeans.dest.dir}/platform7/modules/org-openide-loaders.jar:\
    4.14 +${netbeans.dest.dir}/ide8/modules/org-netbeans-modules-xml-xam.jar:\
    4.15  ${netbeans.dest.dir}/soa1/modules/org-netbeans-modules-bpel-model.jar:\
    4.16  ${netbeans.dest.dir}/soa1/modules/org-netbeans-modules-bpel-project.jar:\
    4.17  ${netbeans.dest.dir}/soa1/modules/org-netbeans-modules-xml-wsdl-extensions.jar:\
    4.18  ${netbeans.dest.dir}/soa1/modules/org-netbeans-modules-xml-xpath.jar:\
    4.19 -${netbeans.dest.dir}/ide7/modules/org-netbeans-modules-xml-schema-model.jar:\
    4.20 -${netbeans.dest.dir}/ide7/modules/org-netbeans-modules-xml-wsdl-model.jar:\
    4.21 +${netbeans.dest.dir}/ide8/modules/org-netbeans-modules-xml-schema-model.jar:\
    4.22 +${netbeans.dest.dir}/ide8/modules/org-netbeans-modules-xml-wsdl-model.jar:\
    4.23  ${netbeans.dest.dir}/soa1/ant/nblib/org-netbeans-modules-bpel-project.jar:\
    4.24 -${netbeans.dest.dir}/ide7/ant/lib/ant.jar:\
    4.25 -${netbeans.dest.dir}/ide7/modules/org-apache-xml-resolver.jar:\
    4.26 -${netbeans.dest.dir}/ide7/modules/org-netbeans-modules-xml-retriever.jar:\
    4.27 -${netbeans.dest.dir}/ide7/ant/lib/ant-launcher.jar:\
    4.28 +${netbeans.dest.dir}/ide8/ant/lib/ant.jar:\
    4.29 +${netbeans.dest.dir}/ide8/modules/org-apache-xml-resolver.jar:\
    4.30 +${netbeans.dest.dir}/ide8/modules/org-netbeans-modules-xml-retriever.jar:\
    4.31 +${netbeans.dest.dir}/ide8/ant/lib/ant-launcher.jar:\
    4.32  
    4.33  test.unit.run.cp=${test.unit.cp.extra}
     5.1 --- a/bpel.samples/resources/AsynchronousSample/AsynchronousSample/build.xml	Tue Jul 24 12:03:52 2007 +0000
     5.2 +++ b/bpel.samples/resources/AsynchronousSample/AsynchronousSample/build.xml	Tue Jul 24 12:55:11 2007 +0000
     5.3 @@ -65,10 +65,9 @@
     5.4      </target>
     5.5      <target name="-init-caps" if="no.netbeans.home">
     5.6          <property file="${basedir}/nbproject/private/private.properties"/>
     5.7 -        <property name="netbeans.home" value="${caps.netbeans.home}/platform6"/>
     5.8 +        <property name="netbeans.home" value="${caps.netbeans.home}/platform7"/>
     5.9          <property name="netbeans.user" value="${caps.netbeans.user}"/>
    5.10          <property name="from.commandline" value="true"/>
    5.11      </target>
    5.12 -    <target name="pre-init" depends="-check-netbeans-home,-init-caps">
    5.13 -    </target>
    5.14 +    <target name="pre-init" depends="-check-netbeans-home,-init-caps"/>
    5.15  </project>
     6.1 --- a/bpel.samples/resources/AsynchronousSample/AsynchronousSampleApplication/build.xml	Tue Jul 24 12:03:52 2007 +0000
     6.2 +++ b/bpel.samples/resources/AsynchronousSample/AsynchronousSampleApplication/build.xml	Tue Jul 24 12:55:11 2007 +0000
     6.3 @@ -65,7 +65,7 @@
     6.4      </target>
     6.5      <target name="-init-caps" if="no.netbeans.home">
     6.6          <property file="${basedir}/nbproject/private/private.properties"/>
     6.7 -        <property name="netbeans.home" value="${caps.netbeans.home}/platform6"/>
     6.8 +        <property name="netbeans.home" value="${caps.netbeans.home}/platform7"/>
     6.9          <property name="netbeans.user" value="${caps.netbeans.user}"/>
    6.10          <property name="from.commandline" value="true"/>
    6.11      </target>
     7.1 --- a/bpel.samples/resources/SynchronousSample/SynchronousSample/build.xml	Tue Jul 24 12:03:52 2007 +0000
     7.2 +++ b/bpel.samples/resources/SynchronousSample/SynchronousSample/build.xml	Tue Jul 24 12:55:11 2007 +0000
     7.3 @@ -65,10 +65,9 @@
     7.4      </target>
     7.5      <target name="-init-caps" if="no.netbeans.home">
     7.6          <property file="${basedir}/nbproject/private/private.properties"/>
     7.7 -        <property name="netbeans.home" value="${caps.netbeans.home}/platform6"/>
     7.8 +        <property name="netbeans.home" value="${caps.netbeans.home}/platform7"/>
     7.9          <property name="netbeans.user" value="${caps.netbeans.user}"/>
    7.10          <property name="from.commandline" value="true"/>
    7.11      </target>
    7.12 -    <target name="pre-init" depends="-check-netbeans-home,-init-caps">
    7.13 -    </target>
    7.14 +    <target name="pre-init" depends="-check-netbeans-home,-init-caps"/>
    7.15  </project>
     8.1 --- a/bpel.samples/resources/SynchronousSample/SynchronousSampleApplication/build.xml	Tue Jul 24 12:03:52 2007 +0000
     8.2 +++ b/bpel.samples/resources/SynchronousSample/SynchronousSampleApplication/build.xml	Tue Jul 24 12:55:11 2007 +0000
     8.3 @@ -65,7 +65,7 @@
     8.4      </target>
     8.5      <target name="-init-caps" if="no.netbeans.home">
     8.6          <property file="${basedir}/nbproject/private/private.properties"/>
     8.7 -        <property name="netbeans.home" value="${caps.netbeans.home}/platform6"/>
     8.8 +        <property name="netbeans.home" value="${caps.netbeans.home}/platform7"/>
     8.9          <property name="netbeans.user" value="${caps.netbeans.user}"/>
    8.10          <property name="from.commandline" value="true"/>
    8.11      </target>
     9.1 --- a/bpel.samples/resources/TravelReservationService/TravelReservationService/build.xml	Tue Jul 24 12:03:52 2007 +0000
     9.2 +++ b/bpel.samples/resources/TravelReservationService/TravelReservationService/build.xml	Tue Jul 24 12:55:11 2007 +0000
     9.3 @@ -65,10 +65,9 @@
     9.4      </target>
     9.5      <target name="-init-caps" if="no.netbeans.home">
     9.6          <property file="${basedir}/nbproject/private/private.properties"/>
     9.7 -        <property name="netbeans.home" value="${caps.netbeans.home}/platform6"/>
     9.8 +        <property name="netbeans.home" value="${caps.netbeans.home}/platform7"/>
     9.9          <property name="netbeans.user" value="${caps.netbeans.user}"/>
    9.10          <property name="from.commandline" value="true"/>
    9.11      </target>
    9.12 -    <target name="pre-init" depends="-check-netbeans-home,-init-caps">
    9.13 -    </target>
    9.14 +    <target name="pre-init" depends="-check-netbeans-home,-init-caps"/>
    9.15  </project>
    10.1 --- a/bpel.samples/resources/TravelReservationService/TravelReservationServiceApplication/build.xml	Tue Jul 24 12:03:52 2007 +0000
    10.2 +++ b/bpel.samples/resources/TravelReservationService/TravelReservationServiceApplication/build.xml	Tue Jul 24 12:55:11 2007 +0000
    10.3 @@ -65,7 +65,7 @@
    10.4      </target>
    10.5      <target name="-init-caps" if="no.netbeans.home">
    10.6          <property file="${basedir}/nbproject/private/private.properties"/>
    10.7 -        <property name="netbeans.home" value="${caps.netbeans.home}/platform6"/>
    10.8 +        <property name="netbeans.home" value="${caps.netbeans.home}/platform7"/>
    10.9          <property name="netbeans.user" value="${caps.netbeans.user}"/>
   10.10          <property name="from.commandline" value="true"/>
   10.11      </target>
    11.1 --- a/compapp.projects.jbi/src/org/netbeans/modules/compapp/projects/jbi/resources/build.xsl	Tue Jul 24 12:03:52 2007 +0000
    11.2 +++ b/compapp.projects.jbi/src/org/netbeans/modules/compapp/projects/jbi/resources/build.xsl	Tue Jul 24 12:55:11 2007 +0000
    11.3 @@ -108,7 +108,7 @@
    11.4                  <xsl:attribute name="if">no.netbeans.home</xsl:attribute>
    11.5  
    11.6                  <property file="${{basedir}}/nbproject/private/private.properties"/>
    11.7 -                <property name="netbeans.home" value="${{caps.netbeans.home}}/platform6"/>
    11.8 +                <property name="netbeans.home" value="${{caps.netbeans.home}}/platform7"/>
    11.9                  <property name="netbeans.user" value="${{caps.netbeans.user}}"/>
   11.10                  <property name="from.commandline" value="true"/>
   11.11              </target>