Changeset 6041 for trunk

Show
Ignore:
Timestamp:
11/03/11 16:37:46 (7 months ago)
Author:
mtld
Message:

create missing target folders

Location:
trunk/pustefix-plugins
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/pustefix-plugins/pustefix-iwrapper-plugin/src/main/java/org/pustefixframework/maven/plugins/Apt.java

    r6040 r6041  
    7777        lastRunFile.delete(); 
    7878        try { 
     79            if(!lastRunFile.getParentFile().exists()) lastRunFile.getParentFile().mkdirs(); 
    7980            lastRunFile.createNewFile(); 
    8081        } catch (IOException x) { 
    81             throw new MojoExecutionException("cannot create " + lastRun); 
     82            throw new MojoExecutionException("cannot create " + lastRun, x); 
    8283        } 
    8384        return modified.size(); 
  • trunk/pustefix-plugins/pustefix-webapp-plugin/src/main/java/org/pustefixframework/maven/plugins/PustefixWebappMojo.java

    r6040 r6041  
    1919package org.pustefixframework.maven.plugins; 
    2020 
     21import java.io.File; 
     22 
    2123import org.apache.maven.plugin.AbstractMojo; 
    2224import org.apache.maven.plugin.MojoExecutionException; 
    2325import org.apache.maven.project.MavenProject; 
     26 
     27import de.schlund.pfixxml.config.GlobalConfig; 
     28import de.schlund.pfixxml.config.GlobalConfigurator; 
    2429 
    2530/** 
     
    3136 * @requiresDependencyResolution compile 
    3237 */ 
    33 @Deprecated 
    3438public class PustefixWebappMojo extends AbstractMojo { 
     39     
     40    /** 
     41     * Docroot of the application 
     42     *  
     43     * @parameter default-value="${project.build.directory}/${project.artifactId}-${project.version}" 
     44     */ 
     45    private String docroot; 
    3546     
    3647    /** 
     
    5162        } 
    5263         
     64        // because all executions operate on the same pfixcore classes: 
     65        GlobalConfig.reset(); 
     66         
     67        GlobalConfigurator.setDocroot(docroot); 
     68        new File(docroot, "WEB-INF").mkdirs(); 
     69 
     70         
    5371        getLog().warn("************************************************************************"); 
    5472        getLog().warn("* You're calling a deprecated Maven plugin goal. You should remove     *"); 
  • trunk/pustefix-plugins/pustefix-webservice-plugin/src/main/java/org/pustefixframework/maven/plugins/PustefixWebserviceMojo.java

    r5524 r6041  
    172172                    } 
    173173                    // Setup WSDL repository 
    174                     if (!webappdir.exists()) throw new MojoExecutionException("Web application directory of project '" + projectName + "' doesn't exist: " + webappdir.getAbsolutePath()); 
     174                    if (!webappdir.exists()) webappdir.mkdirs(); 
    175175                    File wsdlDir = tmpDir; 
    176176                    if (globConf.getWSDLSupportEnabled()) { 
     
    196196                    // Check if WEB-INF exists 
    197197                    File webInfDir = new File(webappdir, "WEB-INF"); 
    198                     if (!webInfDir.exists()) 
    199                         throw new MojoExecutionException("Web application WEB-INF subdirectory of project '" + projectName + "' doesn't exist"); 
     198                    if (!webInfDir.exists()) webInfDir.mkdirs(); 
    200199                     
    201200                    // Iterate over services