Package org.apache.maven.plugins.changes.model

Examples of org.apache.maven.plugins.changes.model.Release


        // Loop through the List of releases from changes.xml and casting each
        // release to a Release
        for ( Object changesRelease : changesReleases )
        {
            Release release = (Release) changesRelease;
            releases.add( release );
        }
        return releases;
    }
View Full Code Here


        if ( releases != null )
        {
            for ( Object release1 : releases )
            {
                final Release release = (Release) release1;
                final Release componentRelease = getRelease( componentReleases, release.getVersion() );
                if ( componentRelease != null )
                {
                    release.addComponent( componentName, componentRelease );
                }
                mergedReleases.add( release );
            }
        }

        for ( Object componentRelease1 : componentReleases )
        {
            final Release release = (Release) componentRelease1;
            final Release mergedRelease = getRelease( mergedReleases, release.getVersion() );
            if ( mergedRelease == null )
            {
                final Release componentRelease = new Release();
                componentRelease.setVersion( release.getVersion() );
                componentRelease.setDateRelease( release.getDateRelease() );
                componentRelease.addComponent( componentName, release );
                mergedReleases.add( componentRelease );
            }
        }

        return mergedReleases;
View Full Code Here

    {
        final List<SyndEntry> entries = new ArrayList<SyndEntry>( 1 );

        if ( releases.size() > 0 )
        {
            final Release release = releases.get( 0 ); // TODO: is this guaranteed to be the latest?

            final SyndEntry entry = new SyndEntryImpl();
            entry.setTitle( release.getVersion() );
            entry.setLink( link + "#" + HtmlTools.encodeId( release.getVersion() ) );
            entry.setDescription( getSyndContent( release ) );
            entry.setPublishedDate( getDate( release.getDateRelease(), dateFormat ) );

            entries.add( entry );
        }

        return entries;
View Full Code Here

            }
            else if ( xmlPath.exists() )
            {
                ChangesXML xml = new ChangesXML( xmlPath, getLog() );
                ReleaseUtils releaseUtils = new ReleaseUtils( getLog() );
                Release release =
                    releaseUtils.getLatestRelease( releaseUtils.convertReleaseList( xml.getReleaseList() ), version );

                if ( !isValidDate( release.getDateRelease(), releaseDateFormat, releaseDateLocale ) )
                {
                    throw new MojoExecutionException(
                        "The file " + xmlPath.getAbsolutePath() + " has an invalid release date." );

                }
View Full Code Here

        assertEquals( "Changes report Project", changesXML.getTitle() );

        List releases = changesXML.getReleaseList();
        assertEquals( 2, releases.size() );
        for (Object release1 : releases) {
            Release release = (Release) release1;
            if ("1.0".equals(release.getVersion())) {
                Action action = release.getActions().get(0);
                assertEquals(2, action.getFixedIssues().size());
                assertEquals("JIRA-XXX", action.getFixedIssues().get(0).getIssue());
                assertEquals("JIRA-YYY", action.getFixedIssues().get(1).getIssue());
                assertEquals(2, action.getDueTos().size());
            }
View Full Code Here

        List<Release> mergedReleases;

        mergedReleases = releaseUtils.mergeReleases( firstReleases, secondReleases );
        assertEquals( "Both empty", 0, mergedReleases.size() );

        Release release = new Release();
        release.setVersion( "1.0" );
        firstReleases.add( release );

        mergedReleases = releaseUtils.mergeReleases( firstReleases, secondReleases );
        assertEquals( "One release in first", 1, mergedReleases.size() );

        release = new Release();
        release.setVersion( "1.1" );
        secondReleases.add( release );

        mergedReleases = releaseUtils.mergeReleases( firstReleases, secondReleases );
        assertEquals( "One release each", 2, mergedReleases.size() );

        release = new Release();
        release.setVersion( "1.1" );
        firstReleases.add( release );

        mergedReleases = releaseUtils.mergeReleases( firstReleases, secondReleases );
        assertEquals( "Two releases in first, one release in second with one version being the same",
                      2, mergedReleases.size() );

        release = new Release();
        release.setVersion( "1.2" );
        secondReleases.add( release );

        mergedReleases = releaseUtils.mergeReleases( firstReleases, secondReleases );
        assertEquals( "Two releases each with one version being the same", 3, mergedReleases.size() );
    }
View Full Code Here

        generator.setAuthor( "author" );
        generator.setTitle( "title" );
        generator.setLink( "url" );
        generator.setDateFormat( null );

        Release release = new Release();
        release.setVersion( "1.0" );
        List<Release> releases = new ArrayList<Release>( 1 );

        try
        {
            // test with no release: should fail
View Full Code Here

TOP

Related Classes of org.apache.maven.plugins.changes.model.Release

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.