コード例 #1
0
 @Override
 public void postUpdate(
     ApplicationInfo appInfo,
     List<ArtifactGroup> artifactGroups,
     List<ArtifactGroup> deletedFeatures)
     throws PhrescoException {
   File pomFile =
       new File(
           Utility.getProjectHome()
               + appInfo.getAppDirName()
               + File.separator
               + Constants.POM_NAME);
   ProjectUtils projectUtils = new ProjectUtils();
   projectUtils.deletePluginExecutionFromPom(pomFile);
   if (CollectionUtils.isNotEmpty(deletedFeatures)) {
     projectUtils.removeExtractedFeatures(appInfo, deletedFeatures);
   }
   if (CollectionUtils.isNotEmpty(artifactGroups)) {
     projectUtils.updatePOMWithPluginArtifact(pomFile, artifactGroups);
     excludeModule(appInfo, artifactGroups);
   }
   BufferedReader breader = projectUtils.ExtractFeature(appInfo);
   try {
     String line = "";
     while ((line = breader.readLine()) != null) {
       if (line.startsWith("[ERROR]")) {
         System.err.println(line);
       }
     }
   } catch (IOException e) {
     throw new PhrescoException(e);
   }
 }
コード例 #2
0
 private void createProjectFolders(ProjectInfo info, File file) throws PhrescoException {
   if (isDebugEnabled) {
     S_LOGGER.debug(
         "Entering Method ArchetypeExecutorImpl.createProjectFolders(ProjectInfo info, File file)");
     S_LOGGER.debug("createProjectFolders()  path=" + file.getPath());
   }
   // create .phresco folder inside the project
   if (isDebugEnabled) {
     S_LOGGER.debug("createProjectFolders()  ProjectCode=" + info.getCode());
   }
   File phrescoFolder =
       new File(
           file.getPath() + File.separator + info.getCode() + File.separator + DOT_PHRESCO_FOLDER);
   phrescoFolder.mkdirs();
   if (isDebugEnabled) {
     S_LOGGER.info("create .phresco folder inside the project");
   }
   ProjectUtils.writeProjectInfo(info, phrescoFolder);
 }