Package org.apache.maven.model

Examples of org.apache.maven.model.Site


    @Override
    protected Site determineDeploySite()
        throws MojoExecutionException
    {
        Site staging = new Site();
        staging.setId( "stagingLocal" );

        final File outputDirectory = determineStagingDirectory();
        getLog().info( "Using this base directory for staging: " + outputDirectory );

        // Safety
        if ( !outputDirectory.exists() )
        {
            outputDirectory.mkdirs();
        }

        staging.setUrl( "file://" + outputDirectory.getAbsolutePath() );

        return staging;
    }
View Full Code Here


        if ( distributionManagement == null )
        {
            throw new MojoExecutionException( "Missing distribution management in project " + getFullName( project ) );
        }

        final Site site = distributionManagement.getSite();

        if ( site == null )
        {
            throw new MojoExecutionException( "Missing site information in the distribution management of the project "
                + getFullName( project ) );
        }

        if ( site.getUrl() == null || site.getId() == null )
        {
            throw new MojoExecutionException( "Missing site data: specify url and id for project "
                + getFullName( project ) );
        }
View Full Code Here

     * @see URIPathDescriptor#sameSite(java.net.URI)
     */
    protected MavenProject getTopLevelProject( MavenProject project )
        throws MojoExecutionException
    {
        Site site = getSite( project );

        MavenProject parent = project;

        while ( parent.getParent() != null )
        {
            MavenProject oldProject = parent;
            // MSITE-585, MNG-1943
            parent = siteTool.getParentProject( parent, reactorProjects, localRepository );

            Site oldSite = site;

            try
            {
                site = getSite( parent );
            }
            catch ( MojoExecutionException e )
            {
                return oldProject;
            }

            // MSITE-600
            URIPathDescriptor siteURI = new URIPathDescriptor( URIEncoder.encodeURI( site.getUrl() ), "" );
            URIPathDescriptor oldSiteURI = new URIPathDescriptor( URIEncoder.encodeURI( oldSite.getUrl() ), "" );

            if ( !siteURI.sameSite( oldSiteURI.getBaseURI() ) )
            {
                return oldProject;
            }
View Full Code Here

    @Override
    protected Site determineDeploySite()
        throws MojoExecutionException
    {
        Site top = new Site();

        top.setId( stagingRepoId() );
        getLog().info( "Using this server ID for stage deploy: " + top.getId() );

        String stagingURL = determineStageDeploySiteURL();
        getLog().info( "Using this base URL for stage deploy: " + stagingURL );

        top.setUrl( stagingURL );

        return top;
    }
View Full Code Here

     * @return Site
     */
    private Site parseSite( String tagName, XmlPullParser parser, boolean strict )
        throws IOException, XmlPullParserException
    {
        Site site = new Site();
        java.util.Set parsed = new java.util.HashSet();
        while ( parser.nextTag() == XmlPullParser.START_TAG )
        {
            if ( checkFieldWithDuplicate( parser, "id", null, parsed ) )
            {
                site.setId( getTrimmedValue( parser.nextText() ) );
            }
            else if ( checkFieldWithDuplicate( parser, "name", null, parsed ) )
            {
                site.setName( getTrimmedValue( parser.nextText() ) );
            }
            else if ( checkFieldWithDuplicate( parser, "url", null, parsed ) )
            {
                site.setUrl( getTrimmedValue( parser.nextText() ) );
            }
            else
            {
                if ( strict )
                {
View Full Code Here

        }
        catch ( Exception e )
        {
            throw new RuntimeException( e );
        }
        Site site = new Site();
        site.setId( "localhost" );
        distributionManagement.setSite( site );
    }
View Full Code Here

    @Override
    protected Site determineDeploySite()
        throws MojoExecutionException
    {
        Site top = new Site();

        top.setId( stagingRepoId() );
        getLog().info( "Using this server ID for stage deploy: " + top.getId() );

        String stagingURL = determineStageDeploySiteURL();
        getLog().info( "Using this base URL for stage deploy: " + stagingURL );

        top.setUrl( stagingURL );

        return top;
    }
View Full Code Here

    @Override
    protected Site determineDeploySite()
        throws MojoExecutionException
    {
        Site staging = new Site();
        staging.setId( "stagingLocal" );

        final File outputDirectory = determineStagingDirectory();
        getLog().info( "Using this base directory for staging: " + outputDirectory );

        // Safety
        if ( !outputDirectory.exists() )
        {
            outputDirectory.mkdirs();
        }

        staging.setUrl( "file://" + outputDirectory.getAbsolutePath() );

        return staging;
    }
View Full Code Here

            if ( distributionManagement == null )
            {
                throw new ContinuumException( "Missing distribution management information in the project." );
            }

            Site site = distributionManagement.getSite();
            if ( site == null )
            {
                throw new ContinuumException(
                    "Missing site information in the distribution management element in the project." );
            }

            url = site.getUrl();
            id = site.getId();
        }

        if ( url == null )
        {
            throw new ContinuumException( "The URL to the site is not defined." );
View Full Code Here

            if ( childDistMgmt.getSite() == null )
            {
                if ( parentDistMgmt.getSite() != null )
                {
                    Site site = new Site();

                    childDistMgmt.setSite( site );

                    site.setId( parentDistMgmt.getSite().getId() );

                    site.setName( parentDistMgmt.getSite().getName() );

                    site.setUrl( parentDistMgmt.getSite().getUrl() );

                    if ( site.getUrl() != null )
                    {
                        site.setUrl(
                            appendPath( site.getUrl(), child.getArtifactId(), childPathAdjustment, appendPaths ) );
                    }
                }
            }

            if ( childDistMgmt.getRepository() == null )
View Full Code Here

TOP

Related Classes of org.apache.maven.model.Site

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.