Package org.apache.maven.model

Examples of org.apache.maven.model.License


            }

            List<License> licenses = model.getLicenses();
            if ( licenses.isEmpty() )
            {
                License license = new License();

                getLog().info( "License name is missing, please type the license name:" );
                license.setName( inputHandler.readLine() );
                getLog().info( "License URL is missing, please type the license URL:" );
                license.setUrl( inputHandler.readLine() );
                licenses.add( license );
                rewrite = true;
            }
           
            if ( disableMaterialization )
View Full Code Here


            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

                elIt = null;
            }
            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

    /**
     * Creates a new license object.
     */
    public License license(String name, String url) {
        License l = new License();
        l.setName(name);
        l.setUrl(url);
        return l;
    }
View Full Code Here

            List<License> licenses = model.getLicenses();
            properties.put( "license.count", 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 );

            setArtifactProperties( result, model );
View Full Code Here

     * @throws Exception if any
     */
    public void testInterpolate()
        throws Exception
    {
        License license = new License();
        license.setName( "licenseName" );
        license.setUrl( "licenseUrl" );

        List<Developer> developers = new ArrayList<Developer>();
        Developer developer1 = new Developer();
        developer1.setId( "id1" );
        developer1.setName( "developerName1" );
View Full Code Here

                elIt = null;
            }
            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

            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

      "IF YOU DO USE THEM IN SUCH A MANNER, IT IS AT YOUR OWN RISK. \n"+
      "THE AUTHOR AND PUBLISHER DISCLAIM ALL LIABILITY FOR DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES RESULTING FROM YOUR USE OF THE PROGRAMS.";

      String LICENCE = "";
      for (Object licence: project.getLicenses()){
        License lic = (License) licence;
        LICENCE = LICENCE + lic.getName() + " " + lic.getUrl() + "\n";
      }
     
      Component[] layout = {
      new Label(name),new Label(""),
      new Label("Version"),new Label(version),
View Full Code Here

            List<License> licenses = model.getLicenses();
            properties.put( "license.count", 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 );

            setArtifactProperties( result, model );
View Full Code Here

TOP

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

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.