Examples of MavenInstallation


Examples of hudson.tasks.Maven.MavenInstallation

public class MavenArgumentInterceptorTest extends HudsonTestCase {

  public void testSimpleMaven3BuildWithArgInterceptor_Goals() throws Exception {

    MavenModuleSet m = createMavenProject();
    MavenInstallation mavenInstallation = configureMaven3();
    m.setMaven(mavenInstallation.getName());
    m.setScm(new ExtractResourceSCM(getClass().getResource("maven3-project.zip")));
    m.setGoals("dummygoal"); // build would fail with this goal

    // add an action to build, redefining the goals and options to be
    // executed
View Full Code Here

Examples of hudson.tasks.Maven.MavenInstallation

  }

  public void testSimpleMaven3BuildWithArgInterceptor_ArgBuilder() throws Exception {

    MavenModuleSet m = createMavenProject();
    MavenInstallation mavenInstallation = configureMaven3();
    m.setMaven(mavenInstallation.getName());
    m.setScm(new ExtractResourceSCM(getClass().getResource("maven-multimodule-unit-failure.zip")));
    m.setGoals("clean install"); // build would fail because of failing unit
                    // tests

    // add an action to build, adding argument to skip the test execution
View Full Code Here

Examples of hudson.tasks.Maven.MavenInstallation

public class Maven3BuildTest extends HudsonTestCase {
  
    public void testSimpleMaven3Build() throws Exception {
       
        MavenModuleSet m = createMavenProject();
        MavenInstallation mavenInstallation = configureMaven3();
        m.setMaven( mavenInstallation.getName() );
        m.getReporters().add(new TestReporter());
        m.setScm(new ExtractResourceSCM(getClass().getResource("maven3-project.zip")));
        m.setGoals( "clean install" );
        MavenModuleSetBuild b = buildAndAssertSuccess(m);
        assertTrue( MavenUtil.maven3orLater( b.getMavenVersionUsed() ) );
View Full Code Here

Examples of hudson.tasks.Maven.MavenInstallation

    }
   
    public void testSimpleMaven3BuildRedeployPublisher() throws Exception {
       
        MavenModuleSet m = createMavenProject();
        MavenInstallation mavenInstallation = configureMaven3();
        m.setMaven( mavenInstallation.getName() );
        File repo = createTmpDir();
        FileUtils.cleanDirectory( repo );
        m.getReporters().add(new TestReporter());
        m.getPublishersList().add(new RedeployPublisher("",repo.toURI().toString(),true, false));
        m.setScm(new ExtractResourceSCM(getClass().getResource("maven3-project.zip")));
View Full Code Here

Examples of hudson.tasks.Maven.MavenInstallation

        assertTrue("file not ended with -1.jar", files[0].endsWith( "-1.jar" ));
    }   
   
    public void testSiteBuildWithForkedMojo() throws Exception {
        MavenModuleSet m = createMavenProject();
        MavenInstallation mavenInstallation = configureMaven3();
        m.setMaven( mavenInstallation.getName() );       
        m.getReporters().add(new TestReporter());
        m.setScm(new ExtractResourceSCM(getClass().getResource("maven3-project.zip")));
        m.setGoals( "clean site" );
        MavenModuleSetBuild b = buildAndAssertSuccess(m);
        assertTrue( MavenUtil.maven3orLater( b.getMavenVersionUsed() ) );
View Full Code Here

Examples of hudson.tasks.Maven.MavenInstallation

    @Bug(value=8395)
    public void testMaven3BuildWrongScope() throws Exception {
       
        File pom = new File(this.getClass().getResource("test-pom-8395.xml").toURI());
        MavenModuleSet m = createMavenProject();
        MavenInstallation mavenInstallation = configureMaven3();
        m.setMaven( mavenInstallation.getName() );
        m.getReporters().add(new TestReporter());
        m.setRootPOM(pom.getAbsolutePath());
        m.setGoals( "clean validate" );
        MavenModuleSetBuild mmsb =  m.scheduleBuild2( 0 ).get();
        assertBuildStatus( Result.FAILURE, mmsb );
View Full Code Here

Examples of hudson.tasks.Maven.MavenInstallation

   
    @Bug(value=8390)
    public void testMaven3BuildWrongInheritence() throws Exception {
       
        MavenModuleSet m = createMavenProject();
        MavenInstallation mavenInstallation = configureMaven3();
        m.setMaven( mavenInstallation.getName() );
        m.getReporters().add(new TestReporter());
        m.setScm(new ExtractResourceSCM(getClass().getResource("incorrect-inheritence-testcase.zip")));
        m.setGoals( "clean validate" );
        MavenModuleSetBuild mmsb =  m.scheduleBuild2( 0 ).get();
        assertBuildStatus( Result.FAILURE, mmsb );
View Full Code Here

Examples of hudson.tasks.Maven.MavenInstallation

    @Bug(value=8445)
    public void testMavenSeveralModulesInDirectory() throws Exception {
       
        MavenModuleSet m = createMavenProject();
        MavenInstallation mavenInstallation = configureMaven3();
        m.setMaven( mavenInstallation.getName() );
        m.getReporters().add(new TestReporter());
        m.setScm(new ExtractResourceSCM(getClass().getResource("several-modules-in-directory.zip")));
        m.setGoals( "clean validate" );
        MavenModuleSetBuild mmsb =  buildAndAssertSuccess(m);
        assertFalse( mmsb.getProject().getModules().isEmpty());
View Full Code Here

Examples of hudson.tasks.Maven.MavenInstallation

   
    @Email("https://groups.google.com/d/msg/hudson-users/Xhw00UopVN0/FA9YqDAIsSYJ")
    public void testMavenWithDependencyVersionInEnvVar() throws Exception {
       
        MavenModuleSet m = createMavenProject();
        MavenInstallation mavenInstallation = configureMaven3();
        ParametersDefinitionProperty parametersDefinitionProperty =
            new ParametersDefinitionProperty(new StringParameterDefinition( "JUNITVERSION", "3.8.2" ));
       
        m.addProperty( parametersDefinitionProperty );
        m.setMaven( mavenInstallation.getName() );
        m.getReporters().add(new TestReporter());
        m.setScm(new ExtractResourceSCM(getClass().getResource("envars-maven-project.zip")));
        m.setGoals( "clean test-compile" );
        MavenModuleSetBuild mmsb =  buildAndAssertSuccess(m);
        assertFalse( mmsb.getProject().getModules().isEmpty());
View Full Code Here

Examples of hudson.tasks.Maven.MavenInstallation

        assertFalse( mmsb.getProject().getModules().isEmpty());
    }   
   
    @Bug(8484)
    public void testMultiModMavenNonRecursive() throws Exception {
        MavenInstallation mavenInstallation = configureMaven3();
        MavenModuleSet m = createMavenProject();
        m.setMaven( mavenInstallation.getName() );
        m.getReporters().add(new TestReporter());
        m.setScm(new ExtractResourceSCM(getClass().getResource("maven-multimod.zip")));
        m.setGoals( "-N validate" );
        assertTrue("MavenModuleSet.isNonRecursive() should be true", m.isNonRecursive());
        buildAndAssertSuccess(m);
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.