Package hudson.maven

Examples of hudson.maven.MavenModuleSetBuild


        String moduleRoot = build.execute(new BuildCallable<String, IOException>() {
            private static final long serialVersionUID = 1L;

            //@Override
            public String call(MavenBuild mavenBuild) throws IOException, InterruptedException {
                 MavenModuleSetBuild moduleSetBuild = mavenBuild.getModuleSetBuild();
                 if (moduleSetBuild == null) {
                     throw new IOException("Parent build not found!");
                 }
                 return moduleSetBuild.getModuleRoot().getRemote();
            }
        });
        final File pomBaseDir = pom.getBasedir();
        final File remoteWorkspaceDir = new File(moduleRoot);
        if (pomBaseDir.equals(remoteWorkspaceDir)) {
View Full Code Here


        configureDefaultMaven();
        MavenModuleSet m = createMavenProject();
        m.setScm(new ExtractResourceSCM(getClass().getResource("../maven-surefire-unstable.zip")));
        m.setGoals("install");

        MavenModuleSetBuild b = m.scheduleBuild2(0).get();
        assertBuildStatus(Result.UNSTABLE, b);


        MavenBuild mb = b.getModuleLastBuilds().values().iterator().next();
        boolean foundFactory=false,foundSurefire=false;
        for (MavenProjectActionBuilder x : mb.getProjectActionBuilders()) {
            if (x instanceof FactoryImpl)
                foundFactory = true;
            if (x instanceof SurefireArchiver)
View Full Code Here

            // Configure for UNSTABLE
            m.setGoals("clean test");
            m.setScm(new ExtractResourceSCM(getClass().getResource("maven-test-failure.zip")));
        } // otherwise do nothing which gets FAILURE
        // First build should not trigger downstream project
        MavenModuleSetBuild b = m.scheduleBuild2(0).get();
        assertNoDownstreamBuild(dp, b);

        if (evenWhenUnstable) {
            // Configure for UNSTABLE
            m.setGoals("clean test");
View Full Code Here

  configureDefaultMaven();
  MavenModuleSet m = createMavenProject("maven-render-test");
  m.setScm(new ExtractResourceSCM(m.getClass().getResource("maven-test-failure-findbugs.zip")));
  m.setGoals("clean test");

  MavenModuleSetBuild b = assertBuildStatus(Result.UNSTABLE, m.scheduleBuild2(0).get());
  MavenBuild modBuild = (MavenBuild)b.getModuleLastBuilds().get(m.getModule("test:test"));
  TestResult tr = modBuild.getAction(SurefireReport.class).getResult();
        assertEquals(1,tr.getFailedTests().size());
        CaseResult cr = tr.getFailedTests().get(0);
        assertEquals("test.AppTest",cr.getClassName());
        assertEquals("testApp",cr.getName());
View Full Code Here

        project.setMaven("varMaven");
        project.setGoals("clean${" + DUMMY_LOCATION_VARNAME + "}");

        // test the regular slave - variable not expanded
        project.setAssignedLabel(slaveRegular.getSelfLabel());
        MavenModuleSetBuild build = project.scheduleBuild2(0).get();
        System.out.println(build.getDisplayName() + " completed");

        assertBuildStatus(Result.FAILURE, build);

        String buildLogRegular = getBuildLog(build);
        System.out.println(buildLogRegular);

        // test the slave with prepared environment
        project.setAssignedLabel(slaveEnv.getSelfLabel());
        build = project.scheduleBuild2(0).get();
        System.out.println(build.getDisplayName() + " completed");

        assertBuildStatusSuccess(build);

        // Check variable was expanded
        String buildLogEnv = getBuildLog(build);
View Full Code Here

            visitor.visitProject(item);

            List<? extends Run> runs = item.asProject().getBuilds();
            for (Run run : runs) {
                 if (run instanceof MavenModuleSetBuild) {
                    MavenModuleSetBuild mmsb = (MavenModuleSetBuild) run;

                    visitor.visitModuleSet(mmsb);
                 }
            }
        }
View Full Code Here

     * @param visitor
     * @param run
     */
    public static void traverse(HudsonVisitor visitor, Run run) {
        if (run instanceof MavenModuleSetBuild) {
            MavenModuleSetBuild item = (MavenModuleSetBuild) run;

            visitor.visitModuleSet(item);

            Map<MavenModule, List<MavenBuild>> modulesMap = item.getModuleBuilds();

            for (List<MavenBuild> builds : modulesMap.values()) {
                for (MavenBuild build : builds) {

                    log.trace("Visit mavenBuild {}", build);
View Full Code Here

TOP

Related Classes of hudson.maven.MavenModuleSetBuild

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.