private MavenRunnerParameters createBuildParameters(Location l) {
    final PsiElement element = l.getPsiElement();
    final Project project = l.getProject();

    final Module module = ModuleUtil.findModuleForPsiElement(element);
    if (module == null) return null;

    final MavenProjectsManager mavenProjectsManager = MavenProjectsManager.getInstance(project);
    final MavenProject mavenProject = mavenProjectsManager.findProject(module);

    if (mavenProject == null) return null;

    // todo: check this code
    final List<MavenArtifact> dependencies = mavenProject.getDependencies();
    MavenArtifact artifact = null;
    for (MavenArtifact dependence : dependencies) {
      if (dependence.getArtifactId().equals(GROUP_ID_LIFT)) {
        artifact = dependence;
        break;
      } else if (dependence.getArtifactId().equals(ARTIFACT_ID_LIFT)) {
        artifact = dependence;
        break;
      }
    }
    // final MavenArtifact artifact = mavenProjectModel.findDependency(GROUP_ID_LIFT,
    // ARTIFACT_ID_LIFT);

    if (artifact == null) return null;

    mySourceElement = element;

    MavenExplicitProfiles profiles =
        MavenProjectsManager.getInstance(project).getExplicitProfiles();
    List<String> goals = new ArrayList<String>();

    goals.add(JETTY_RUN);

    final VirtualFile file = module.getModuleFile();
    if (file == null) return null;

    final VirtualFile parent = file.getParent();
    if (parent == null) return null;

    return new MavenRunnerParameters(true, parent.getPath(), goals, profiles);
  }
 private void createExclusion(MavenArtifact artifactToExclude, MavenDomExclusions exclusions) {
   MavenDomExclusion exclusion = exclusions.addExclusion();
   exclusion.getGroupId().setValue(artifactToExclude.getGroupId());
   exclusion.getArtifactId().setValue(artifactToExclude.getArtifactId());
 }