Package org.gradle.api.tasks.bundling

Examples of org.gradle.api.tasks.bundling.War


                    }
                }});
            }
        });
       
        War war = project.getTasks().add(WAR_TASK_NAME, War.class);
        war.setDescription("Generates a war archive with all the compiled classes, the web-app content and the libraries.");
        war.setGroup(BasePlugin.BUILD_GROUP);
        Configuration archivesConfiguration = project.getConfigurations().getByName(Dependency.ARCHIVES_CONFIGURATION);
        disableJarTaskAndRemoveFromArchivesConfiguration(project, archivesConfiguration);
        archivesConfiguration.addArtifact(new ArchivePublishArtifact(war));
        configureConfigurations(project.getConfigurations());
    }
View Full Code Here


        jettyRun.setDescription("Uses your files as and where they are and deploys them to Jetty.");
        jettyRun.setGroup(WarPlugin.WEB_APP_GROUP);
    }

    private Object getWebXml(Project project) {
        War war = (War) project.getTasks().getByName(WarPlugin.WAR_TASK_NAME);
        File webXml;
        if (war.getWebXml() != null) {
            webXml = war.getWebXml();
        } else {
            webXml = new File(getWarConvention(project).getWebAppDir(), "WEB-INF/web.xml");
        }
        return webXml;
    }
View Full Code Here

        jettyRun.setDescription("Uses your files as and where they are and deploys them to Jetty.");
        jettyRun.setGroup(WarPlugin.WEB_APP_GROUP);
    }

    private Object getWebXml(Project project) {
        War war = (War) project.getTasks().getByName(WarPlugin.WAR_TASK_NAME);
        File webXml;
        if (war.getWebXml() != null) {
            webXml = war.getWebXml();
        } else {
            webXml = new File(getWarConvention(project).getWebAppDir(), "WEB-INF/web.xml");
        }
        return webXml;
    }
View Full Code Here

                    }
                }});
            }
        });
       
        War war = project.getTasks().create(WAR_TASK_NAME, War.class);
        war.setDescription("Generates a war archive with all the compiled classes, the web-app content and the libraries.");
        war.setGroup(BasePlugin.BUILD_GROUP);
        ArchivePublishArtifact warArtifact = new ArchivePublishArtifact(war);
        project.getExtensions().getByType(DefaultArtifactPublicationSet.class).addCandidate(warArtifact);
        configureConfigurations(project.getConfigurations());
        configureComponent(project, warArtifact);
    }
View Full Code Here

TOP

Related Classes of org.gradle.api.tasks.bundling.War

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.