Examples of License


Examples of org.apache.ivy.core.module.descriptor.License

                } else if ("info".equals(qName)) {
                    infoStarted(attributes);
                } else if (state == State.INFO && "extends".equals(qName)) {
                    extendsStarted(attributes);
                } else if (state == State.INFO && "license".equals(qName)) {
                    getMd().addLicense(new License(settings.substitute(attributes.getValue("name")),
                                        settings.substitute(attributes.getValue("url"))));
                } else if (state == State.INFO && "description".equals(qName)) {
                    getMd().setHomePage(settings.substitute(attributes.getValue("homepage")));
                    state = State.DESCRIPTION;
                    buffer = new StringBuffer();
View Full Code Here

Examples of org.apache.ivy.core.module.descriptor.License

                if (name == null) {
                    // The license name is required in Ivy but not in a POM!
                    name = "Unknown License";
                }
               
                lics.add(new License(name, url));
            }
        }
        return (License[]) lics.toArray(new License[lics.size()]);
    }
View Full Code Here

Examples of org.apache.maven.archiva.model.License

        model.setIssueManagement( issue );
        Organization org = new Organization();
        org.setName( TEST_ORGANIZATION_NAME );
        org.setUrl( TEST_ORGANIZATION_URL );
        model.setOrganization( org );
        License l = new License();
        l.setName( TEST_LICENSE_NAME );
        l.setUrl( TEST_LICENSE_URL );
        model.addLicense( l );
        l = new License();
        l.setName( TEST_LICENSE_NAME_2 );
        l.setUrl( TEST_LICENSE_URL_2 );
        model.addLicense( l );
        Scm scm = new Scm();
        scm.setConnection( TEST_SCM_CONNECTION );
        scm.setDeveloperConnection( TEST_SCM_DEV_CONNECTION );
        scm.setUrl( TEST_SCM_URL );
View Full Code Here

Examples of org.apache.maven.archiva.model.License

        {
            Iterator itLicense = elemLicenses.elements( "license" ).iterator();
            while ( itLicense.hasNext() )
            {
                Element elemLicense = (Element) itLicense.next();
                License license = new License();

                // TODO: Create LicenseIdentity class to managed license ids.
                // license.setId( elemLicense.elementTextTrim("id") );
                license.setName( elemLicense.elementTextTrim( "name" ) );
                license.setUrl( elemLicense.elementTextTrim( "url" ) );
                license.setComments( elemLicense.elementTextTrim( "comments" ) );

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

Examples of org.apache.maven.archiva.model.License

        Map ret = new HashMap();

        Iterator it = licenses.iterator();
        while ( it.hasNext() )
        {
            License license = (License) it.next();
            // TODO: Change to 'id' when LicenseTypeMapper is created.
            String key = license.getName();
            ret.put( key, license );
        }

        return ret;
    }
View Full Code Here

Examples of org.apache.maven.archiva.model.License

        Iterator it = mainLicensesMap.entrySet().iterator();
        while ( it.hasNext() )
        {
            Map.Entry entry = (Entry) it.next();
            String key = (String) entry.getKey();
            License mainLicense = (License) entry.getValue();
            License parentLicense = (License) parentLicensesMap.get( key );

            if ( parentLicense == null )
            {
                merged.add( mainLicense );
            }
View Full Code Here

Examples of org.apache.maven.archiva.model.License

        Map<String, License> parentLicensesMap = createLicensesMap( parentLicenses );

        for ( Map.Entry<String, License> entry : mainLicensesMap.entrySet() )
        {
            String key = entry.getKey();
            License mainLicense = entry.getValue();
            License parentLicense = parentLicensesMap.get( key );

            if ( parentLicense == null )
            {
                merged.add( mainLicense );
            }
View Full Code Here

Examples of org.apache.maven.model.License

            return null;
        StringBuffer sb = new StringBuffer();
        String del = "";
        for ( Iterator i = licenses.iterator(); i.hasNext(); )
        {
            License l = ( License ) i.next();
            String url = l.getUrl();
            if ( url == null )
                continue;
            sb.append( del );
            sb.append( url );
            del = ", ";
View Full Code Here

Examples of org.apache.maven.model.License

            metadata.setCategory(category);
            metadata.setPluginGroup(pluginGroup);

            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

            metadata.setCategory(category);
            metadata.setPluginGroup(pluginGroup);

            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
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.