<commit_before>package org.activiti.cycle.impl.connector.signavio.action;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;

import org.activiti.cycle.Content;
import org.activiti.cycle.RepositoryArtifact;
import org.activiti.cycle.RepositoryArtifactLink;
import org.activiti.cycle.RepositoryConnector;
import org.activiti.cycle.RepositoryException;
import org.activiti.cycle.impl.connector.signavio.provider.ActivitiCompliantBpmn20Provider;
import org.activiti.cycle.impl.connector.util.TransactionalConnectorUtils;
import org.activiti.cycle.impl.db.entity.RepositoryArtifactLinkEntity;
import org.activiti.cycle.service.CycleRepositoryService;
import org.activiti.cycle.service.CycleServiceFactory;
import org.activiti.engine.impl.util.IoUtil;

public class CreateMavenProjectAction extends CreateTechnicalBpmnXmlAction {

  private static final long serialVersionUID = 1L;

  public static final String PARAM_TARGET_FOLDER = "targetFolderId";
  public static final String PARAM_TARGET_CONNECTOR = "targetConnectorId";
  public static final String PARAM_TARGET_NAME = "targetName";
  public static final String PARAM_COMMENT = "comment";
  public static final String CREATE_LINK_NAME = "createLink";

  private static final String REPLACE_STRING = "activiti.project.template";

  public static String ACTIVITI_HOME_PATH;

  private static Logger log = Logger.getLogger(CreateMavenProjectAction.class.getName());

  public CreateMavenProjectAction() {
    // TODO: remove when real labels are introduced in the GUI
    super("Create default maven project");
    try {
      ACTIVITI_HOME_PATH = new File("../../../").getCanonicalPath();
    } catch (IOException e) {      
      ACTIVITI_HOME_PATH = new File(".").getAbsolutePath();
      log.log(Level.WARNING, "Couldn't set Activiti Home path (see nested exception for the cause), using '" + ACTIVITI_HOME_PATH + "' instead.", e);
    }
    // change backslashed on windows to forward slashes for ant<commit_msg>fixed create default maven project action (added @CycleComponent)<commit_after>package org.activiti.cycle.impl.connector.signavio.action;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;

import org.activiti.cycle.Content;
import org.activiti.cycle.RepositoryArtifact;
import org.activiti.cycle.RepositoryArtifactLink;
import org.activiti.cycle.RepositoryConnector;
import org.activiti.cycle.RepositoryException;
import org.activiti.cycle.annotations.CycleComponent;
import org.activiti.cycle.annotations.ExcludesCycleComponents;
import org.activiti.cycle.context.CycleContextType;
import org.activiti.cycle.impl.action.DefaultCopyArtifactAction;
import org.activiti.cycle.impl.connector.signavio.provider.ActivitiCompliantBpmn20Provider;
import org.activiti.cycle.impl.connector.util.TransactionalConnectorUtils;
import org.activiti.cycle.impl.db.entity.RepositoryArtifactLinkEntity;
import org.activiti.cycle.service.CycleRepositoryService;
import org.activiti.cycle.service.CycleServiceFactory;
import org.activiti.engine.impl.util.IoUtil;

@CycleComponent(context = CycleContextType.APPLICATION)
public class CreateMavenProjectAction extends CreateTechnicalBpmnXmlAction {

  private static final long serialVersionUID = 1L;

  public static final String PARAM_TARGET_FOLDER = "targetFolderId";
  public static final String PARAM_TARGET_CONNECTOR = "targetConnectorId";
  public static final String PARAM_TARGET_NAME = "targetName";
  public static final String PARAM_COMMENT = "comment";
  public static final String CREATE_LINK_NAME = "createLink";

  private static final String REPLACE_STRING = "activiti.project.template";

  public static String ACTIVITI_HOME_PATH;

  private static Logger log = Logger.getLogger(CreateMavenProjectAction.class.getName());

  public CreateMavenProjectAction() {
    // TODO: remove when real labels are introduced in the GUI
    super("Create default maven project");
    try {
      ACTIVITI_HOME_PATH = new File("../../../").getCanonicalPath();
    } catch (IOException e) {      
      ACTIVITI_HOME_PATH = new File(".").getAbsolutePath();
      log.log(Level.WARNING, "Couldn't set Activiti Home path (see nested exception for the cause), using '" + ACTIVITI_HOME_PATH + "' instead.", e);
    }
    // change backslashed on windows to forward slashes for ant
{'fraction_non_alphanumeric': 0.09335920655454938, 'fraction_numerical': 0.00129366106080207, 'mean_word_length': 5.434119278779473, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1095511', 'n_tokens_mistral': 1349, 'n_tokens_neox': 1318, 'n_words': 310}