[jboss-cvs] jboss-deployment/src/main/org/jboss/deployment/spi ...
Dimitris Andreadis
dimitris.andreadis at jboss.com
Fri Jul 21 11:43:55 EDT 2006
User: dimitris
Date: 06/07/21 11:43:55
Modified: src/main/org/jboss/deployment/spi
DeploymentManagerImpl.java
Log:
JBCTS-302 - if descriptor is missing, use the .ear extension to derive the type
Revision Changes Path
1.15 +7 -4 jboss-deployment/src/main/org/jboss/deployment/spi/DeploymentManagerImpl.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: DeploymentManagerImpl.java
===================================================================
RCS file: /cvsroot/jboss/jboss-deployment/src/main/org/jboss/deployment/spi/DeploymentManagerImpl.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- DeploymentManagerImpl.java 24 Nov 2005 17:04:43 -0000 1.14
+++ DeploymentManagerImpl.java 21 Jul 2006 15:43:55 -0000 1.15
@@ -72,7 +72,7 @@
* related information, such as, a list of deployment targets, and vendor unique
* runtime configuration information.
* @author thomas.diesler at jboss.org
- * @version $Revision: 1.14 $
+ * @version $Revision: 1.15 $
*/
public class DeploymentManagerImpl implements DeploymentManager
{
@@ -345,7 +345,7 @@
initDeploymentMetaData();
// create the temp file that contains the deployment
- TargetModuleInfo moduleInfo = createDeployment(moduleArchive);
+ TargetModuleInfo moduleInfo = createDeployment(moduleArchive, metaData.getDeploymentName());
URL deployment = moduleInfo.getModuleID();
// create the target module ids
@@ -410,7 +410,7 @@
* Create the JBoss deployment, by enhancing the content of the module
* archive with the entries in the deployment plan.
*/
- private TargetModuleInfo createDeployment(InputStream moduleArchive) throws IOException
+ private TargetModuleInfo createDeployment(InputStream moduleArchive, String moduleName) throws IOException
{
File tmpFile = File.createTempFile("jboss_deployment_", ".zip");
log.debug("temporary deployment file: " + tmpFile);
@@ -478,6 +478,9 @@
if (moduleType == null)
{
+ if (moduleName.endsWith(ModuleType.EAR.getModuleExtension()))
+ moduleType = ModuleType.EAR;
+ else
throw new RuntimeException("cannot obtain module type");
}
More information about the jboss-cvs-commits
mailing list