Package org.apache.maven.model

Examples of org.apache.maven.model.Scm


    private void assembleScmInheritance( Model child, Model parent, String childPathAdjustment, boolean appendPaths )
    {
        if ( parent.getScm() != null )
        {
            Scm parentScm = parent.getScm();

            Scm childScm = child.getScm();

            if ( childScm == null )
            {
                childScm = new Scm();

                child.setScm( childScm );
            }

            if ( StringUtils.isEmpty( childScm.getConnection() ) && !StringUtils.isEmpty( parentScm.getConnection() ) )
            {
                childScm.setConnection(
                    appendPath( parentScm.getConnection(), child.getArtifactId(), childPathAdjustment, appendPaths ) );
            }

            if ( StringUtils.isEmpty( childScm.getDeveloperConnection() )
                && !StringUtils.isEmpty( parentScm.getDeveloperConnection() ) )
            {
                childScm
                    .setDeveloperConnection( appendPath( parentScm.getDeveloperConnection(), child.getArtifactId(),
                                                         childPathAdjustment, appendPaths ) );
            }

            if ( StringUtils.isEmpty( childScm.getUrl() ) && !StringUtils.isEmpty( parentScm.getUrl() ) )
            {
                childScm.setUrl(
                    appendPath( parentScm.getUrl(), child.getArtifactId(), childPathAdjustment, appendPaths ) );
            }
        }
    }
View Full Code Here


               
            }
           
            if ( !disableMaterialization )
            {
                Scm scm = model.getScm();
                if ( scm == null )
                {
                    scm = new Scm();
                    model.setScm( scm );
                }
               
                if ( scm.getUrl() == null )
                {
                    if ( scmUrl != null )
                    {
                        scm.setUrl( scmUrl );
                    }
                    else
                    {
                        getLog().info( "SCM view URL is missing, please type the URL for the viewable SCM interface:" );
                        scm.setUrl( inputHandler.readLine() );
                        rewrite = true;
                    }
                }
               
                if ( scm.getConnection() == null )
                {
                    if ( scmConnection != null )
                    {
                        scm.setConnection( scmConnection );
                    }
                    else
                    {
                        getLog().info( "SCM read-only connection URL is missing, please type the read-only SCM URL:" );
                        scm.setConnection( inputHandler.readLine() );
                        rewrite = true;
                    }
                }
            }
        }
View Full Code Here

        setName( "Maven Project No Javadoc and Source Jars" );
        setUrl( "http://maven.apache.org" );
        setPackaging( "jar" );
        setDescription( "Sample Maven Project that has no javadoc and source jar files." );

        Scm scm = new Scm();
        scm.setUrl( "http://svn.apache.org/maven/sample/trunk" );
        scm.setConnection( "scm:svn:http://svn.apache.org/maven/sample/trunk" );
        setScm( scm );

        Build build = new Build();
        build.setFinalName( "no-javadoc-sources" );
        build.setDirectory( getBasedir() + "/target/test/unit/no-javadoc-sources/target" );
View Full Code Here

        setName( "Maven Project No Sources Jar" );
        setUrl( "http://maven.apache.org" );
        setPackaging( "jar" );
        setDescription( "Sample Maven Project that has no sources jar file." );

        Scm scm = new Scm();
        scm.setUrl( "http://svn.apache.org/maven/sample/trunk" );
        scm.setConnection( "scm:svn:http://svn.apache.org/maven/sample/trunk" );
        setScm( scm );

        Build build = new Build();
        build.setFinalName( "no-sourcesjar" );
        build.setDirectory( getBasedir() + "/target/test/unit/no-sourcesjar/target" );
View Full Code Here

        setName( "No License File Project" );
        setUrl( "http://maven.apache.org" );
        setPackaging( "jar" );
        setDescription( "Sample Maven Project that has no license file." );

        Scm scm = new Scm();
        scm.setUrl( "http://svn.apache.org/maven/sample/trunk" );
        scm.setConnection( "scm:svn:http://svn.apache.org/maven/sample/trunk" );
        setScm( scm );

        Build build = new Build();
        build.setFinalName( "no-license-file" );
        build.setDirectory( getBasedir() + "/target/test/unit/no-license-file/target" );
View Full Code Here

        setName( "Maven Project No Javadoc Jar" );
        setUrl( "http://maven.apache.org" );
        setPackaging( "jar" );
        setDescription( "Sample Maven Project that has no javadoc jar file." );

        Scm scm = new Scm();
        scm.setUrl( "http://svn.apache.org/maven/sample/trunk" );
        scm.setConnection( "scm:svn:http://svn.apache.org/maven/sample/trunk" );
        setScm( scm );

        Build build = new Build();
        build.setFinalName( "no-javadocjar" );
        build.setDirectory( getBasedir() + "/target/test/unit/no-javadocjar/target" );
View Full Code Here

        setVersion( "1.0-SNAPSHOT" );
        setUrl( "http://maven.apache.org" );
        setPackaging( "jar" );
        setDescription( "Sample Maven Project that has no project name specified in the pom." );

        Scm scm = new Scm();
        scm.setUrl( "http://svn.apache.org/maven/sample/trunk" );
        scm.setConnection( "scm:svn:http://svn.apache.org/maven/sample/trunk" );
        setScm( scm );

        Build build = new Build();
        build.setFinalName( "no-project-name" );
        build.setDirectory( getBasedir() + "/target/test/unit/no-project-name/target" );
View Full Code Here

        setName( "Default Configuration Project" );
        setUrl( "http://maven.apache.org" );
        setPackaging( "jar" );
        setDescription( "Sample Maven Project that has default repository plugin configuration." );

        Scm scm = new Scm();
        scm.setUrl( "http://svn.apache.org/maven/sample/trunk" );
        scm.setConnection( "scm:svn:http://svn.apache.org/maven/sample/trunk" );
        setScm( scm );

        Build build = new Build();
        build.setFinalName( "default-configuration" );
        build.setDirectory( getBasedir() + "/target/test/unit/default-configuration/target" );
View Full Code Here

        setName( "POM Project" );
        setUrl( "http://maven.apache.org" );
        setPackaging( "pom" );
        setDescription( "Sample Maven Project that has default repository plugin configuration." );

        Scm scm = new Scm();
        scm.setUrl( "http://svn.apache.org/maven/sample/trunk" );
        scm.setConnection( "scm:svn:http://svn.apache.org/maven/sample/trunk" );
        setScm( scm );

        Build build = new Build();
        build.setFinalName( "pom-only" );
        build.setDirectory( getBasedir() + "/target/test/unit/pom-only/target" );
View Full Code Here

        return config;
    }

    private void mapScm( ReleaseDescriptor config )
    {
        Scm scm = new Scm();
        scm.setConnection( "scm:svn:file://localhost/tmp/scm-repo/trunk" );
        scm.setDeveloperConnection( "scm:svn:file://localhost/tmp/scm-repo/trunk" );
        scm.setUrl( "file://localhost/tmp/scm-repo/trunk" );
        config.mapOriginalScmInfo( "groupId:artifactId", scm );
    }
View Full Code Here

TOP

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

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.