[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xml-cocoon-cvs
Subject:    svn commit: r523693 -
From:       reinhard () apache ! org
Date:       2007-03-29 13:02:14
Message-ID: 20070329130214.B30531A983E () eris ! apache ! org
[Download RAW message or body]

Author: reinhard
Date: Thu Mar 29 06:02:13 2007
New Revision: 523693

URL: http://svn.apache.org/viewvc?view=rev&rev=523693
Log:
- don't create the output in wrong directory in aggregated builds
- don't invoke the plugin if it isn't a Cocoon block having a COB-INF directory.
- minor formatting

Modified:
    cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin/src/main/java/org/apache/cocoon/maven/rcl/ReloadingWebappMojo.java


Modified: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin/src/main/java/org/apache/cocoon/maven/rcl/ReloadingWebappMojo.java
                
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin/src/ \
main/java/org/apache/cocoon/maven/rcl/ReloadingWebappMojo.java?view=diff&rev=523693&r1=523692&r2=523693
 ==============================================================================
--- cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin/src/main/java/org/apache/cocoon/maven/rcl/ReloadingWebappMojo.java \
                (original)
+++ cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin/src/main/java/org/apache/cocoon/maven/rcl/ReloadingWebappMojo.java \
Thu Mar 29 06:02:13 2007 @@ -84,9 +84,9 @@
     /**
      * The directory that contains the Cocoon web application.
      * 
-     * @parameter expression="${cocoon.rcl.target}"
+     * @parameter expression="./target/rcl"
      */
-    private File target = new File("./target/rcl");
+    private File target;
     
     /**
      * The directory that contains the Cocoon web application.
@@ -170,12 +170,22 @@
     private MavenProject project;    
 
     public void execute() throws MojoExecutionException {
+        // check if this plugin is useful at all
+        if(!project.getPackaging().equals("jar") || 
+                !(new File(project.getBasedir(), \
"src/main/resources/COB-INF").exists())) { +            getLog().info("Don't execute \
the Cocoon RCL plugin becaues either its packaging " +  +                    "type is \
not 'jar' or it doesn't have a directory 'src/main/resources/COB-INF'."); +           \
return; +        }
+        
         getLog().info("Creating a reloading Cocoon web application.");
         
         // create web application containing all necessary files (web.xml, \
applicationContext.xml, log4j.xconf)  File webAppBaseDir = new File(target, \
                "webapp");
-        writeInputStreamToFile(readResourceFromClassloader(WEB_INF_WEB_XML), \
                createPath(new File(webAppBaseDir, WEB_INF_WEB_XML)));
-        writeInputStreamToFile(readResourceFromClassloader(WEB_INF_APP_CONTEXT), \
createPath(new File(webAppBaseDir, WEB_INF_APP_CONTEXT))); +        \
writeInputStreamToFile(readResourceFromClassloader(WEB_INF_WEB_XML),  +               \
createPath(new File(webAppBaseDir, WEB_INF_WEB_XML))); +        \
writeInputStreamToFile(readResourceFromClassloader(WEB_INF_APP_CONTEXT),  +           \
createPath(new File(webAppBaseDir, WEB_INF_APP_CONTEXT)));  \
writeLog4jXml(webAppBaseDir);          
         // copy rcl webapp wrapper and all its dependencies to WEB-INF/lib


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic