Package com.atlassian.maven.plugins.jgitflow.manager

Examples of com.atlassian.maven.plugins.jgitflow.manager.FlowReleaseManager


        assertOnDevelop(flow);

        initialCommitAll(flow);

        FlowReleaseManager relman = getFeatureManager();

        ReleaseContext ctx = new ReleaseContext(projectRoot);
        ctx.setInteractive(false).setDefaultFeatureName(FEATURE_NAME).setEnableFeatureVersions(true);

        MavenSession session = new MavenSession(getContainer(), new Settings(), localRepository, null, null, null, projectRoot.getAbsolutePath(), new Properties(), new Properties(), null);

        relman.start(ctx, projects, session);

        //reload the projects
        projects = createReactorProjectsNoClean("rewrite-for-release", projectSubdir);

        String pom = FileUtils.readFileToString(projects.get(0).getFile());
View Full Code Here


        JGitFlow flow = JGitFlow.getOrInit(projectRoot);
        flow.git().checkout().setName(flow.getDevelopBranchName()).call();
        assertOnDevelop(flow);

        initialCommitAll(flow);
        FlowReleaseManager relman = getReleaseManager();

        MavenSession session = new MavenSession(getContainer(),new Settings(),localRepository,null,null,null,projectRoot.getAbsolutePath(),new Properties(),new Properties(), null);

        relman.start(ctx,projects,session);

        assertOnRelease(flow, ctx.getDefaultReleaseVersion());

        compareSnapPomFiles(projects);
View Full Code Here

        JGitFlow flow = JGitFlow.getOrInit(projectRoot);
        flow.git().checkout().setName(flow.getMasterBranchName()).call();
        assertOnMaster(flow);

        initialCommitAll(flow);
        FlowReleaseManager relman = getHotfixManager();

        MavenSession session = new MavenSession(getContainer(),new Settings(),localRepository,null,null,null,projectRoot.getAbsolutePath(),new Properties(),new Properties(), null);

        ctx.setInteractive(false);
       
        relman.start(ctx,projects,session);

        assertOnHotfix(flow);

        compareSnapPomFiles(projects);
View Full Code Here

    {
        String projectSubdir = "basic-pom";
        List<MavenProject> projects = createReactorProjects("rewrite-for-release", projectSubdir);
        File projectRoot = projects.get(0).getBasedir();

        FlowReleaseManager relman = getReleaseManager();

        ReleaseContext ctx = new ReleaseContext(projectRoot);
        ctx.setDefaultReleaseVersion("1.0");
        ctx.setInteractive(false).setNoTag(true);

        try
        {
            MavenSession session = new MavenSession(getContainer(), new Settings(), localRepository, null, null, null, projectRoot.getAbsolutePath(), new Properties(), new Properties(), null);

            relman.start(ctx, projects, session);
        }
        catch (MavenJGitFlowException e)
        {
            assertEquals(DirtyWorkingTreeException.class, e.getCause().getClass());
            throw e;
View Full Code Here

        assertOnDevelop(flow);

        assertTrue(GitHelper.localBranchExists(flow.git(), flow.getReleaseBranchPrefix() + "1.0"));

        FlowReleaseManager relman = getReleaseManager();

        ReleaseContext ctx = new ReleaseContext(projectRoot);
        ctx.setInteractive(false).setNoTag(true);

        MavenSession session = new MavenSession(getContainer(), new Settings(), localRepository, null, null, null, projectRoot.getAbsolutePath(), new Properties(), new Properties(), null);

        relman.start(ctx, projects, session);

        assertOnRelease(flow, ctx.getDefaultReleaseVersion());

        compareSnapPomFiles(projects);
    }
View Full Code Here

        assertOnDevelop(flow);

        assertTrue(GitHelper.localBranchExists(flow.git(), flow.getReleaseBranchPrefix() + "0.2"));

        FlowReleaseManager relman = getReleaseManager();

        ReleaseContext ctx = new ReleaseContext(projectRoot);
        ctx.setInteractive(false).setNoTag(true);

        MavenSession session = new MavenSession(getContainer(), new Settings(), localRepository, null, null, null, projectRoot.getAbsolutePath(), new Properties(), new Properties(), null);

        relman.start(ctx, projects, session);

        assertOnRelease(flow, ctx.getDefaultReleaseVersion());

        compareSnapPomFiles(projects);
    }
View Full Code Here

        flow.git().checkout().setName(flow.getDevelopBranchName()).call();

        assertOnDevelop(flow);

        initialCommitAll(flow);
        FlowReleaseManager relman = getReleaseManager();

        ReleaseContext ctx = new ReleaseContext(projectRoot);
        ctx.setInteractive(false).setNoTag(true);

        MavenSession session = new MavenSession(getContainer(), new Settings(), localRepository, null, null, null, projectRoot.getAbsolutePath(), new Properties(), new Properties(), null);

        relman.start(ctx, projects, session);

        assertOnRelease(flow, "1.0");

        compareSnapPomFiles(projects);
    }
View Full Code Here

        assertOnDevelop(flow);

        assertTrue(GitHelper.localBranchExists(flow.git(), flow.getFeatureBranchPrefix() + FEATURE_NAME));

        FlowReleaseManager relman = getFeatureManager();

        ReleaseContext ctx = new ReleaseContext(projectRoot);
        ctx.setInteractive(false).setDefaultFeatureName(FEATURE_NAME);

        try
        {
            MavenSession session = new MavenSession(getContainer(), new Settings(), localRepository, null, null, null, projectRoot.getAbsolutePath(), new Properties(), new Properties(), null);

            relman.start(ctx, projects, session);
        }
        catch (MavenJGitFlowException e)
        {
            assertEquals(LocalBranchExistsException.class, e.getCause().getClass());
            throw e;
View Full Code Here

        ctx.setNoBuild(true).setScmCommentPrefix(commentPrefix).setScmCommentSuffix(commentSuffix);

        JGitFlow flow = JGitFlow.getOrInit(projectRoot);
        setupProjectsForMasterAndDevelop(projectRoot,projectName);
       
        FlowReleaseManager relman = getReleaseManager();

        relman.start(ctx, projects, session);

        assertOnRelease(flow, ctx.getDefaultReleaseVersion());

        //reload the projects
        projects = createReactorProjectsNoClean("release-projects", projectName);

        relman.finish(ctx, projects, session);

        String fullMessage = GitHelper.getLatestCommit(flow.git(), flow.git().getRepository().getBranch()).getFullMessage();

        assertTrue(fullMessage.startsWith(commentPrefix));
        assertTrue(fullMessage.endsWith(commentSuffix));
View Full Code Here

        JGitFlow flow = initCommand.setDirectory(git.getRepository().getWorkTree()).call();

        ReleaseContext ctx = new ReleaseContext(projectRoot);
        ctx.setInteractive(false).setNoBuild(true);

        FlowReleaseManager relman = getReleaseManager();

        relman.start(ctx,projects,session);

        assertEquals(flow.getReleaseBranchPrefix() + "1.0", git.getRepository().getBranch());

        relman.finish(ctx, projects, session);
       
    }
View Full Code Here

TOP

Related Classes of com.atlassian.maven.plugins.jgitflow.manager.FlowReleaseManager

Copyright © 2018 www.massapicom. 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.