cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giac...@apache.org
Subject svn commit: r465233 - in /cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin: ./ src/main/java/org/apache/cocoon/maven/deployer/
Date Wed, 18 Oct 2006 12:28:23 GMT
Author: giacomo
Date: Wed Oct 18 05:28:22 2006
New Revision: 465233

URL: http://svn.apache.org/viewvc?view=rev&rev=465233
Log:
upgrade to 2.0.1 of maven-war-plugin

Modified:
    cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/   (props changed)
    cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/pom.xml
    cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java
    cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/DeployExplodedMojo.java
    cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/DeployWarMojo.java

Propchange: cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Oct 18 05:28:22 2006
@@ -3,3 +3,4 @@
 .project
 .wtpmodules
 *.iml
+.settings

Modified: cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/pom.xml?view=diff&rev=465233&r1=465232&r2=465233
==============================================================================
--- cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/pom.xml (original)
+++ cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/pom.xml Wed Oct 18 05:28:22
2006
@@ -78,7 +78,7 @@
     <dependency>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-war-plugin</artifactId>
-      <version>2.0-beta-2</version>
+      <version>2.0.1</version>
     </dependency>
     <!-- Xalan neccessary for XPath operations -->
     <dependency>

Modified: cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java?view=diff&rev=465233&r1=465232&r2=465233
==============================================================================
--- cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java
(original)
+++ cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java
Wed Oct 18 05:28:22 2006
@@ -41,6 +41,7 @@
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.resolver.ArtifactResolver;
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugin.war.AbstractWarMojo;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.artifact.MavenMetadataSource;
@@ -175,7 +176,7 @@
      * Deploy a monolithic Cocoon web application. This means it doesn't use the
      * features that the blocks-fw offers.
      */
-    protected void deployMonolithicCocoonAppAsWebapp(final String blocksdir) throws MojoExecutionException
{
+    protected void deployMonolithicCocoonAppAsWebapp(final String blocksdir) throws MojoExecutionException,
MojoFailureException {
         this.buildExplodedWebapp(getWebappDirectory());
         MonolithicCocoonDeployer deployer = new MonolithicCocoonDeployer(this.getLog());
         deployer.deploy(getBlockArtifactsAsMap(null), getWebappDirectory(), blocksdir);
@@ -183,7 +184,8 @@
         // make sure that all configuration files available in the webapp
         // override block configuration files
         try {
-            copyResources(getWarSourceDirectory(), getWebappDirectory(), getWebXml());
+            //super.copyResources(getWarSourceDirectory(), getWebappDirectory(), getWebXml());
+            super.copyResources(getWarSourceDirectory(), getWebappDirectory());
         } catch (IOException e) {
             throw new MojoExecutionException("A problem occurred while copying webapp resources.",
e);
         }
@@ -200,7 +202,7 @@
      * Deploy a particular block at development time.
      */
     protected void blockDeploymentMonolithicCocoon(final String blocksdir, final DevelopmentBlock[]
blocks,
-            final DevelopmentProperty[] properties) throws MojoExecutionException {
+            final DevelopmentProperty[] properties) throws MojoExecutionException, MojoFailureException
{
         this.buildExplodedWebapp(getWebappDirectory());
         // remove WEB-INF/classes as they are loaded by ReloadingClassloader
         // from a dirrerent location
@@ -309,9 +311,12 @@
     private void shieldCocoonWebapp() throws MojoExecutionException {
         String webInfSlashWebXml = "WEB-INF" + File.separatorChar + "web.xml";
 
-        String webXmlLocation = this.getWebXml();
-        if (webXmlLocation == null) {
+        File webXmlLocationFile = super.getWebXml();
+        String webXmlLocation = null;
+        if (webXmlLocationFile == null) {
             webXmlLocation = getWarSourceDirectory().getAbsolutePath() + File.separatorChar
+ webInfSlashWebXml;
+        } else {
+            webXmlLocation = webXmlLocationFile.getAbsolutePath();
         }
 
         String targetWebXmlLocation = getWebappDirectory().getAbsolutePath() + File.separatorChar
+ webInfSlashWebXml;

Modified: cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/DeployExplodedMojo.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/DeployExplodedMojo.java?view=diff&rev=465233&r1=465232&r2=465233
==============================================================================
--- cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/DeployExplodedMojo.java
(original)
+++ cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/DeployExplodedMojo.java
Wed Oct 18 05:28:22 2006
@@ -19,6 +19,7 @@
 import org.apache.cocoon.maven.deployer.monolithic.DevelopmentBlock;
 import org.apache.cocoon.maven.deployer.monolithic.DevelopmentProperty;
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
 
 /**
  * Create a web application that makes use of Cocoon blocks. In the case of a web application
module, 
@@ -57,7 +58,7 @@
      */
     private DevelopmentProperty[] properties = new DevelopmentProperty[0];
 	
-	public void execute() throws MojoExecutionException {
+	public void execute() throws MojoExecutionException, MojoFailureException {
 		if(this.serverVersion.equals("2.2")) {
             if(this.getProject().getPackaging().equals("war")) {
                 this.deployMonolithicCocoonAppAsWebapp(this.blocksdir);

Modified: cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/DeployWarMojo.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/DeployWarMojo.java?view=diff&rev=465233&r1=465232&r2=465233
==============================================================================
--- cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/DeployWarMojo.java
(original)
+++ cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/DeployWarMojo.java
Wed Oct 18 05:28:22 2006
@@ -23,6 +23,7 @@
 import org.apache.maven.archiver.MavenArchiver;
 import org.apache.maven.artifact.DependencyResolutionRequiredException;
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
 import org.codehaus.plexus.archiver.ArchiverException;
 import org.codehaus.plexus.archiver.jar.ManifestException;
 import org.codehaus.plexus.archiver.war.WarArchiver;
@@ -75,7 +76,7 @@
      */
     private MavenArchiveConfiguration archive = new MavenArchiveConfiguration();
 
-    public void execute() throws MojoExecutionException {
+    public void execute() throws MojoExecutionException, MojoFailureException {
         File warFile = new File(outputDirectory, warName + ".war");
         this.deployMonolithicCocoonAppAsWebapp(this.blocksdir);
 



Mime
View raw message