Logo Search packages:      
Sourcecode: maven-repo-helper version File versions

void org::debian::maven::repo::POMCleanerTest::testCleanMavenPom (  )  throws Exception [inline]

Test of cleanPom method, of class POMCleaner.

Definition at line 35 of file POMCleanerTest.java.

References org::debian::maven::repo::POMTransformer::addDefaultRules(), org::debian::maven::repo::POMTransformer::addRule(), and org::debian::maven::repo::POMCleaner::cleanPom().

                                                     {
        pomProperties = new File(testDir, "pom.properties");
        usePom("maven.xml");
        boolean noParent = true;
        POMCleaner instance = new POMCleaner();
        instance.addDefaultRules();
        instance.addRule(new DependencyRule("org.codehaus.plexus plexus-container-default jar s/1\\.0-alpha-.*/1.0-alpha/"));
        instance.cleanPom(pom, updatedPom, pomProperties, noParent, false, null, "maven2");
        assertXMLEqual(read("maven.cleaned"), read(updatedPom));
        Properties pomInfo = new Properties();
        pomInfo.load(new FileInputStream(pomProperties));
        assertEquals("org.apache.maven", pomInfo.get("groupId"));
        assertEquals("maven", pomInfo.get("artifactId"));
        assertEquals("pom", pomInfo.get("type"));
        assertEquals("2.1.0-SNAPSHOT", pomInfo.get("version"));
        assertEquals("debian", pomInfo.get("debianVersion"));
    }


Generated by  Doxygen 1.6.0   Back to index