Search in sources :

Example 1 with OverlayPackagingTask

use of org.apache.maven.plugins.war.packaging.OverlayPackagingTask in project maven-plugins by apache.

the class AbstractWarMojo method getPackagingTasks.

/**
     * Returns a <tt>List</tt> of the {@link org.apache.maven.plugins.war.packaging.WarPackagingTask}
     * instances to invoke to perform the packaging.
     *
     * @param overlayManager the overlay manager
     * @return the list of packaging tasks
     * @throws MojoExecutionException if the packaging tasks could not be built
     */
private List<WarPackagingTask> getPackagingTasks(OverlayManager overlayManager) throws MojoExecutionException {
    final List<WarPackagingTask> packagingTasks = new ArrayList<WarPackagingTask>();
    packagingTasks.add(new CopyUserManifestTask());
    if (useCache) {
        packagingTasks.add(new DependenciesAnalysisPackagingTask());
    }
    final List<Overlay> resolvedOverlays = overlayManager.getOverlays();
    for (Overlay overlay : resolvedOverlays) {
        if (overlay.isCurrentProject()) {
            packagingTasks.add(new WarProjectPackagingTask(webResources, webXml, containerConfigXML, currentProjectOverlay));
        } else {
            packagingTasks.add(new OverlayPackagingTask(overlay, currentProjectOverlay));
        }
    }
    return packagingTasks;
}
Also used : WarProjectPackagingTask(org.apache.maven.plugins.war.packaging.WarProjectPackagingTask) ArrayList(java.util.ArrayList) CopyUserManifestTask(org.apache.maven.plugins.war.packaging.CopyUserManifestTask) DependenciesAnalysisPackagingTask(org.apache.maven.plugins.war.packaging.DependenciesAnalysisPackagingTask) OverlayPackagingTask(org.apache.maven.plugins.war.packaging.OverlayPackagingTask) WarPackagingTask(org.apache.maven.plugins.war.packaging.WarPackagingTask)

Aggregations

ArrayList (java.util.ArrayList)1 CopyUserManifestTask (org.apache.maven.plugins.war.packaging.CopyUserManifestTask)1 DependenciesAnalysisPackagingTask (org.apache.maven.plugins.war.packaging.DependenciesAnalysisPackagingTask)1 OverlayPackagingTask (org.apache.maven.plugins.war.packaging.OverlayPackagingTask)1 WarPackagingTask (org.apache.maven.plugins.war.packaging.WarPackagingTask)1 WarProjectPackagingTask (org.apache.maven.plugins.war.packaging.WarProjectPackagingTask)1