Examples of ProjectHelper


Examples of com.atlassian.maven.plugins.jgitflow.helper.ProjectHelper

    }

    @Test
    public void startReleaseWithMasterOnly() throws Exception
    {
        ProjectHelper projectHelper = (ProjectHelper) lookup(ProjectHelper.class.getName());
        JGitFlowSetupHelper setupHelper = (JGitFlowSetupHelper) lookup(JGitFlowSetupHelper.class.getName());

        Git git = null;
        Git remoteGit = null;

        List<MavenProject> remoteProjects = createReactorProjects("remote-git-project", null);

        File remoteDir = remoteProjects.get(0).getBasedir();

        //make sure we're clean
        File remoteGitDir = new File(remoteDir, ".git");
        if (remoteGitDir.exists())
        {
            FileUtils.cleanDirectory(remoteGitDir);
        }

        remoteGit = RepoUtil.createRepositoryWithMaster(remoteDir);
        projectHelper.commitAllChanges(remoteGit, "remote commit");

        File localProject = new File(testFileBase, "projects/local/local-git-project");
        git = Git.cloneRepository().setDirectory(localProject).setURI("file://" + remoteGit.getRepository().getWorkTree().getPath()).call();

        List<MavenProject> projects = createReactorProjects("remote-git-project", "local/local-git-project", null, false);
View Full Code Here

Examples of com.atlassian.maven.plugins.jgitflow.helper.ProjectHelper

    }

    @Test
    public void releaseBasicPomWithEmptyMaster() throws Exception
    {
        ProjectHelper projectHelper = (ProjectHelper) lookup(ProjectHelper.class.getName());
        JGitFlowSetupHelper setupHelper = (JGitFlowSetupHelper) lookup(JGitFlowSetupHelper.class.getName());

        Git git = null;
        Git remoteGit = null;
View Full Code Here

Examples of com.google.eclipse.javascript.jstestdriver.core.ProjectHelper

    try {
      String initProjectName = configuration.getAttribute(LaunchConfigurationConstants.PROJECT_NAME, "");
      if (initProjectName != null && !"".equals(initProjectName.trim())) {
        // find project
        selectComboItem(projectCombo, initProjectName);
        IProject project = new ProjectHelper().getProject(initProjectName);
        if (project == null || !project.exists()) {
          setErrorMessage(MessageFormat
              .format(
                  "Project named {0} does not exist. Please choose another project.",
                  initProjectName));
View Full Code Here

Examples of com.google.eclipse.javascript.jstestdriver.core.ProjectHelper

          EclipseJstdTestResult selected = (EclipseJstdTestResult) currentSelection;
          IProject project = null;
          try {
            String projectName =
                lastLaunchConfiguration.getAttribute(LaunchConfigurationConstants.PROJECT_NAME, "");
            project = new ProjectHelper().getProject(projectName);
          } catch (CoreException e) {
            logger.log(Level.WARNING, "Could not read project name from launch configuration.", e);
          }
          testCaseOpener.openTestSource(project, selected.getResult(), workbenchPage);
          return;
View Full Code Here

Examples of org.apache.tools.ant.ProjectHelper

                                         "be specified unless extensionOf is specified",
                                         target.getLocation());

            }
            if (extensionPoint != null) {
                ProjectHelper helper =
                    (ProjectHelper) context.getProject().
                    getReference(ProjectHelper.PROJECTHELPER_REFERENCE);
                for (String extPointName : Target.parseDepends(extensionPoint, name, "extensionOf")) {
                    if (extensionPointMissing == null) {
                        extensionPointMissing = OnMissingExtensionPoint.FAIL;
                    }
                    // defer extensionpoint resolution until the full
                    // import stack has been processed
                    if (isInIncludeMode()) {
                        // if in include mode, provide prefix we're including by
                        // so that we can try and resolve extension point from
                        // the local file first
                        helper.getExtensionStack().add(
                                new String[] {extPointName, target.getName(),
                                        extensionPointMissing.name(), prefix + sep});
                    } else {
                        helper.getExtensionStack().add(
                                new String[] {extPointName, target.getName(),
                                        extensionPointMissing.name()});
                    }
                }
            }
View Full Code Here

Examples of org.apache.tools.ant.ProjectHelper

    p.addBuildListener(consoleLogger);
    p.setUserProperty("ant.file", buildFile.getAbsolutePath());
    p.setProperty(BUILD_CLASSPATH, buildClasspathStr);
    p.setProperty(BUILD_VERBOSE, buildVerboseStr);
    p.init();
    final ProjectHelper helper = ProjectHelper.getProjectHelper();
    p.addReference("ant.projectHelper", helper);
    helper.parse(p, buildFile);
    final String[] buildTargets = buildTargetStr == null
        || buildTargetStr.isEmpty() ? new String[] { p
        .getDefaultTarget() } : buildTargetStr.split(",");
    for (final String t : buildTargets) {
      if (!t.trim().isEmpty()) {
View Full Code Here

Examples of org.apache.tools.ant.ProjectHelper

            project.fireBuildStarted();

            project.init();
            project.setBaseDir(publicationDirectory);

            ProjectHelper helper = ProjectHelper.getProjectHelper();
            helper.parse(project, buildFile);

            project.setUserProperty(
                PUBLICATION_DIRECTORY,
                publicationDirectory.getAbsolutePath());
            project.setUserProperty(PUBLICATION_ID, publicationId);
View Full Code Here

Examples of org.apache.tools.ant.ProjectHelper

        if (getOwningTarget() == null
            || !"".equals(getOwningTarget().getName())) {
            throw new BuildException("import only allowed as a top-level task");
        }

        ProjectHelper helper =
                (ProjectHelper) getProject().
                    getReference(ProjectHelper.PROJECTHELPER_REFERENCE);

        if (helper == null) {
            // this happens if the projecthelper was not registered with the project.
            throw new BuildException("import requires support in ProjectHelper");
        }

        Vector importStack = helper.getImportStack();

        if (importStack.size() == 0) {
            // this happens if ant is used with a project
            // helper that doesn't set the import.
            throw new BuildException("import requires support in ProjectHelper");
        }

        if (getLocation() == null || getLocation().getFileName() == null) {
            throw new BuildException("Unable to get location of import task");
        }

        File buildFile = new File(getLocation().getFileName()).getAbsoluteFile();

        // Paths are relative to the build file they're imported from,
        // *not* the current directory (same as entity includes).

        File buildFileParent = new File(buildFile.getParent());
        File importedFile = FILE_UTILS.resolveFile(buildFileParent, file);

        getProject().log("Importing file " + importedFile + " from "
                         + buildFile.getAbsolutePath(), Project.MSG_VERBOSE);

        if (!importedFile.exists()) {
            String message =
                "Cannot find " + file + " imported from "
                + buildFile.getAbsolutePath();
            if (optional) {
                getProject().log(message, Project.MSG_VERBOSE);
                return;
            } else {
                throw new BuildException(message);
            }
        }

        if (importStack.contains(importedFile)) {
            getProject().log(
                "Skipped already imported file:\n   "
                + importedFile + "\n", Project.MSG_VERBOSE);
            return;
        }

        try {
            helper.parse(getProject(), importedFile);
        } catch (BuildException ex) {
            throw ProjectHelper.addLocationToBuildException(
                ex, getLocation());
        }
    }
View Full Code Here

Examples of org.apache.tools.ant.ProjectHelper

     *
     * @param text the descriptive text
     */
    public void addText(String text) {

        ProjectHelper ph = ProjectHelper.getProjectHelper();
        if (!(ph instanceof ProjectHelperImpl)) {
            // New behavior for delayed task creation. Description
            // will be evaluated in Project.getDescription()
            return;
        }
View Full Code Here

Examples of org.apache.tools.ant.ProjectHelper

        if (getOwningTarget() == null
            || !"".equals(getOwningTarget().getName())) {
            throw new BuildException("import only allowed as a top-level task");
        }

        ProjectHelper helper =
                (ProjectHelper) getProject().
                    getReference(ProjectHelper.PROJECTHELPER_REFERENCE);

        if (helper == null) {
            // this happens if the projecthelper was not registered with the project.
            throw new BuildException("import requires support in ProjectHelper");
        }

        Vector<Object> importStack = helper.getImportStack();

        if (importStack.size() == 0) {
            // this happens if ant is used with a project
            // helper that doesn't set the import.
            throw new BuildException("import requires support in ProjectHelper");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.