geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r544710 - /geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WsdlGenerator.java
Date Wed, 06 Jun 2007 02:20:08 GMT
Author: gawor
Date: Tue Jun  5 19:20:07 2007
New Revision: 544710

URL: http://svn.apache.org/viewvc?view=rev&rev=544710
Log:
handle condition when getBaseDir() return a file and not a directory

Modified:
    geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WsdlGenerator.java

Modified: geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WsdlGenerator.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WsdlGenerator.java?view=diff&rev=544710&r1=544709&r2=544710
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WsdlGenerator.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WsdlGenerator.java
Tue Jun  5 19:20:07 2007
@@ -123,8 +123,9 @@
     }
     
     private static String getModuleClasspath(Module module, DeploymentContext context) throws
DeploymentException {
-        EARContext moduleContext = module.getEarContext();
-        String baseDir = moduleContext.getBaseDir().getAbsolutePath();
+        File moduleBase = module.getEarContext().getBaseDir();
+        File moduleBaseDir = (moduleBase.isFile()) ? moduleBase.getParentFile() : moduleBase;
+        String baseDir = moduleBaseDir.getAbsolutePath();
         List<String> moduleClassPath = context.getConfiguration().getClassPath();
         StringBuilder classpath = new StringBuilder();
         for (String s : moduleClassPath) {          
@@ -298,7 +299,8 @@
                                PortInfo portInfo) throws DeploymentException {
         //call wsgen tool to generate the wsdl file based on the bindingtype.
         //let's set the outputDir as the module base directory in server repository.
-        File moduleBaseDir = module.getEarContext().getBaseDir();
+        File moduleBase = module.getEarContext().getBaseDir();
+        File moduleBaseDir = (moduleBase.isFile()) ? moduleBase.getParentFile() : moduleBase;
         File baseDir;
         
         try {
@@ -349,7 +351,7 @@
                 if (wsdlFile == null) {
                     throw new DeploymentException("Unable to find the service wsdl file");
                 }
-                return getRelativeNameOrURL(moduleBaseDir, wsdlFile);
+                return getRelativeNameOrURL(moduleBase, wsdlFile);
             } else {
                 throw new DeploymentException("wsgen failed: " + wsgenOutput);
             }



Mime
View raw message