Examples of License


Examples of org.apache.maven.model.License

            List<License> licenses = model.getLicenses();
            properties.put( "license.count", Integer.valueOf( licenses.size() ) );
            for ( int i = 0; i < licenses.size(); i++ )
            {
                License license = licenses.get( i );
                properties.put( "license." + i + ".name", license.getName() );
                properties.put( "license." + i + ".url", license.getUrl() );
                properties.put( "license." + i + ".comments", license.getComments() );
                properties.put( "license." + i + ".distribution", license.getDistribution() );
            }

            result.setProperties( properties );
        }
View Full Code Here

Examples of org.apache.maven.model.License

            List<License> licenses = model.getLicenses();
            properties.put( "license.count", Integer.valueOf( licenses.size() ) );
            for ( int i = 0; i < licenses.size(); i++ )
            {
                License license = licenses.get( i );
                properties.put( "license." + i + ".name", license.getName() );
                properties.put( "license." + i + ".url", license.getUrl() );
                properties.put( "license." + i + ".comments", license.getComments() );
                properties.put( "license." + i + ".distribution", license.getDistribution() );
            }

            result.setProperties( properties );
        }
View Full Code Here

Examples of org.apache.maven.model.License

        metadata.setDescription(project.getDescription());
        metadata.setCategory(category);

        if (project.getLicenses() != null) {
            for (Object licenseObj : project.getLicenses()) {
                License license = (License) licenseObj;
                LicenseType licenseType = new LicenseType();
                licenseType.setValue(license.getName());
                licenseType.setOsiApproved(osiApproved);
                metadata.getLicense().add(licenseType);
            }
        }
View Full Code Here

Examples of org.apache.maven.model.License

            List<License> licenses = model.getLicenses();
            properties.put( "license.count", Integer.valueOf( licenses.size() ) );
            for ( int i = 0; i < licenses.size(); i++ )
            {
                License license = licenses.get( i );
                properties.put( "license." + i + ".name", license.getName() );
                properties.put( "license." + i + ".url", license.getUrl() );
                properties.put( "license." + i + ".comments", license.getComments() );
                properties.put( "license." + i + ".distribution", license.getDistribution() );
            }

            result.setProperties( properties );
        }
View Full Code Here

Examples of org.apache.maven.model.License

        if ( src == null )
        {
            return null;
        }
       
        License result = new License();
       
        result.setComments( src.getComments() );
        result.setDistribution( src.getDistribution() );
        result.setName( src.getName() );
        result.setUrl( src.getUrl() );
       
        return result;
    }
View Full Code Here

Examples of org.apache.maven.model.License

            }

            Counter innerCount = new Counter( counter.getDepth() + 1 );
            while ( it.hasNext() )
            {
                License value = (License) it.next();
                Element el;
                if ( ( elIt != null ) && elIt.hasNext() )
                {
                    el = (Element) elIt.next();
                    if ( !elIt.hasNext() )
View Full Code Here

Examples of org.apache.maven.model.License

            List<License> licenses = model.getLicenses();
            properties.put( "license.count", Integer.valueOf( licenses.size() ) );
            for ( int i = 0; i < licenses.size(); i++ )
            {
                License license = licenses.get( i );
                properties.put( "license." + i + ".name", license.getName() );
                properties.put( "license." + i + ".url", license.getUrl() );
                properties.put( "license." + i + ".comments", license.getComments() );
                properties.put( "license." + i + ".distribution", license.getDistribution() );
            }

            result.setProperties( properties );
        }
View Full Code Here

Examples of org.apache.maven.model.License

        if ( notEmpty( v3Licenses ) )
        {
            for ( Iterator it = v3Licenses.iterator(); it.hasNext(); )
            {
                org.apache.maven.model.v3_0_0.License v3License = (org.apache.maven.model.v3_0_0.License) it.next();
                License license = new License();
                license.setComments( v3License.getComments() );
                license.setDistribution( v3License.getDistribution() );
                license.setName( v3License.getName() );
                license.setUrl( v3License.getUrl() );

                licenses.add( license );
            }
        }
View Full Code Here

Examples of org.apache.maven.model.License

            // parent.setVersion( "1" );
            // model.setParent( parent );

            // infer license for know projects, everything at eclipse is licensed under EPL
            // maybe too simplicistic, but better than nothing
            License license = new License();
            license.setName( "Eclipse Public License - v 1.0" ); //$NON-NLS-1$
            license.setUrl( "http://www.eclipse.org/org/documents/epl-v10.html" ); //$NON-NLS-1$
            model.addLicense( license );
        }

        if ( deps.length > 0 )
        {
View Full Code Here

Examples of org.apache.maven.model.License

     * @return License
     */
    private License parseLicense( String tagName, XmlPullParser parser, boolean strict )
        throws IOException, XmlPullParserException
    {
        License license = new License();
        java.util.Set parsed = new java.util.HashSet();
        while ( parser.nextTag() == XmlPullParser.START_TAG )
        {
            if ( checkFieldWithDuplicate( parser, "name", null, parsed ) )
            {
                license.setName( getTrimmedValue( parser.nextText() ) );
            }
            else if ( checkFieldWithDuplicate( parser, "url", null, parsed ) )
            {
                license.setUrl( getTrimmedValue( parser.nextText() ) );
            }
            else if ( checkFieldWithDuplicate( parser, "distribution", null, parsed ) )
            {
                license.setDistribution( getTrimmedValue( parser.nextText() ) );
            }
            else if ( checkFieldWithDuplicate( parser, "comments", null, parsed ) )
            {
                license.setComments( getTrimmedValue( parser.nextText() ) );
            }
            else
            {
                if ( strict )
                {
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.