AnsweredAssumed Answered

Java based bar deployment

Question asked by bluerain on Apr 19, 2011
Latest reply on Apr 20, 2011 by jbarrez
I have written a java based bar deployer
but it doesnt seem to find the .bar file. It says couldnt find the *.bar file as it does not exists. But it exists in the deloyment directory as generated by the eclipse plugin.

public class BarDeployer {
   public static void main(String[] args) throws Exception {
      
      ProcessEngine processEngine =   SpringProcessEngineConfiguration.createProcessEngineConfigurationFromResourceDefault().buildProcessEngine();
         
      RepositoryService repositoryService = processEngine.getRepositoryService();
      String barFileName = "deployment/request_release_PO.bar";
      ZipInputStream inputStream = new ZipInputStream(new FileInputStream(barFileName));
      String deploymentID = repositoryService.createDeployment().name(barFileName).addZipInputStream(inputStream).deploy().getId();
      List<String> deployedResources = repositoryService.getDeploymentResourceNames(deploymentID);
      for (String deployedResource : deployedResources) {
         System.out.println("Deployed : " + deployedResource);
      }
      inputStream.close();
   }
}

Outcomes