[jboss-cvs] JBossAS SVN: r108661 - in trunk: system-jmx/src/main/java/org/jboss/deployment and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 19 12:32:36 EDT 2010
Author: alesj
Date: 2010-10-19 12:32:35 -0400 (Tue, 19 Oct 2010)
New Revision: 108661
Added:
trunk/testsuite/src/resources/deployers/weld/translator3rdparty/
trunk/testsuite/src/resources/deployers/weld/translator3rdparty/META-INF/
trunk/testsuite/src/resources/deployers/weld/translator3rdparty/META-INF/application.xml
Modified:
trunk/server/src/main/java/org/jboss/deployment/EARContentsDeployer.java
trunk/system-jmx/src/main/java/org/jboss/deployment/MainDeployer.java
trunk/testsuite/imports/sections/weld.xml
Log:
Fix legacy MainDeployer -- check if the deploy file actually exists.
Fix Weld 3rd party lib test build.
Modified: trunk/server/src/main/java/org/jboss/deployment/EARContentsDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/deployment/EARContentsDeployer.java 2010-10-19 15:57:20 UTC (rev 108660)
+++ trunk/server/src/main/java/org/jboss/deployment/EARContentsDeployer.java 2010-10-19 16:32:35 UTC (rev 108661)
@@ -112,7 +112,11 @@
public void deploy(VFSDeploymentUnit unit) throws DeploymentException
{
VirtualFile root = unit.getRoot();
- VirtualFile ear = unit.getFile(unit.getRelativePath());
+ String relativePath = unit.getRelativePath();
+ VirtualFile ear = unit.getFile(relativePath);
+ if (ear == null)
+ throw new DeploymentException("No such ear file, relative path: '" + relativePath + "', root: " + root);
+
deploy(unit, root, ear);
}
Modified: trunk/system-jmx/src/main/java/org/jboss/deployment/MainDeployer.java
===================================================================
--- trunk/system-jmx/src/main/java/org/jboss/deployment/MainDeployer.java 2010-10-19 15:57:20 UTC (rev 108660)
+++ trunk/system-jmx/src/main/java/org/jboss/deployment/MainDeployer.java 2010-10-19 16:32:35 UTC (rev 108661)
@@ -21,23 +21,17 @@
*/
package org.jboss.deployment;
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
+import java.io.*;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
import org.jboss.bootstrap.api.as.config.JBossASServerConfig;
import org.jboss.deployers.client.spi.DeployerClient;
import org.jboss.deployers.client.spi.Deployment;
@@ -364,6 +358,9 @@
{
// avoid caching
VirtualFile file = VFS.getChild(url);
+ if (file == null || file.exists() == false)
+ throw new DeploymentException("File doesn't exist: " + url);
+
VFSDeployment deployment = deploymentFactory.createVFSDeployment(file);
delegate.addDeployment(deployment);
deploymentName = deployment.getName();
@@ -372,11 +369,15 @@
contextMap.put(url, deploymentName);
delegate.checkComplete(deployment);
}
+ catch (DeploymentException e)
+ {
+ log.warn("Failed to deploy: "+url, e);
+ throw e;
+ }
catch(Exception e)
{
log.warn("Failed to deploy: "+url, e);
- DeploymentException ex = new DeploymentException("Failed to deploy: "+url, e);
- throw ex;
+ throw new DeploymentException("Failed to deploy: "+url, e);
}
}
}
Modified: trunk/testsuite/imports/sections/weld.xml
===================================================================
--- trunk/testsuite/imports/sections/weld.xml 2010-10-19 15:57:20 UTC (rev 108660)
+++ trunk/testsuite/imports/sections/weld.xml 2010-10-19 16:32:35 UTC (rev 108661)
@@ -103,8 +103,7 @@
</fileset>
</jar>
- <!-- This is still OK application.xml as we don't include lib jar -->
- <ear destfile="${build.lib}/weld-translator3rdpartylib.ear" appxml="${source.resources}/deployers/weld/translatorWithManifestClasspath/META-INF/application.xml">
+ <ear destfile="${build.lib}/weld-translator3rdpartylib.ear" appxml="${source.resources}/deployers/weld/translator3rdparty/META-INF/application.xml">
<fileset dir="${build.lib}">
<include name="weld-translator-3rdpartylib.jar"/>
<include name="weld-translator.war"/>
@@ -133,7 +132,7 @@
</target>
- <target name="_jars-weld" depends="numberguess, translator, plainEjbTranslator,translatorWithManifestClasspath">
+ <target name="_jars-weld" depends="numberguess, translator, plainEjbTranslator,translatorWithManifestClasspath, translatorWith3rdPartyLib">
<mkdir dir="${build.lib}" />
</target>
Copied: trunk/testsuite/src/resources/deployers/weld/translator3rdparty/META-INF/application.xml (from rev 108655, trunk/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/META-INF/application.xml)
===================================================================
--- trunk/testsuite/src/resources/deployers/weld/translator3rdparty/META-INF/application.xml (rev 0)
+++ trunk/testsuite/src/resources/deployers/weld/translator3rdparty/META-INF/application.xml 2010-10-19 16:32:35 UTC (rev 108661)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+
+<application xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
+ version="5">
+
+ <display-name>weld-translator3rdparty-ear</display-name>
+ <module>
+ <web>
+ <web-uri>weld-translator.war</web-uri>
+ <context-root>/weld-translator3rdpartylib</context-root>
+ </web>
+ </module>
+ <module>
+ <ejb>weld-translator-3rdpartylib.jar</ejb>
+ </module>
+</application>
More information about the jboss-cvs-commits
mailing list