[Carbon-dev] svn commit r31238 - trunk/carbon-components/jar-services/org.wso2.carbon.jarservices/src/main/java/org/wso2/carbon/jarservices

azeez at wso2.com azeez at wso2.com
Sat Feb 21 13:30:44 PST 2009


Author: azeez
Date: Sat Feb 21 13:30:43 2009
New Revision: 31238
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=31238

Log:
updates

Modified:
   trunk/carbon-components/jar-services/org.wso2.carbon.jarservices/src/main/java/org/wso2/carbon/jarservices/JarServiceCreatorAdmin.java

Modified: trunk/carbon-components/jar-services/org.wso2.carbon.jarservices/src/main/java/org/wso2/carbon/jarservices/JarServiceCreatorAdmin.java
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/jar-services/org.wso2.carbon.jarservices/src/main/java/org/wso2/carbon/jarservices/JarServiceCreatorAdmin.java?rev=31238&r1=31237&r2=31238&view=diff
==============================================================================
--- trunk/carbon-components/jar-services/org.wso2.carbon.jarservices/src/main/java/org/wso2/carbon/jarservices/JarServiceCreatorAdmin.java	(original)
+++ trunk/carbon-components/jar-services/org.wso2.carbon.jarservices/src/main/java/org/wso2/carbon/jarservices/JarServiceCreatorAdmin.java	Sat Feb 21 13:30:43 2009
@@ -225,62 +225,8 @@
      */
     public void createAndDeployService(String directoryPath,
                                        ClassMethodsData[] data) throws AxisFault {
-        /*String filePathFromArchiveId = "TODO"; //TODO getFilePathFromArchiveId(directoryPath);
-
-        if (filePathFromArchiveId == null) {
-            String msg = "A non-existent file was requested";
-            log.warn(msg);
-            throw new AxisFault(msg);
-        }*/
-
-//        int endIndex = filePathFromArchiveId.lastIndexOf(File.separator);
-//        String filePath = filePathFromArchiveId.substring(0, endIndex);
-//        String archiveFileName = filePathFromArchiveId.substring(endIndex);
         String archiveFileName = UUIDGenerator.getUUID();
 
-        ArchiveManipulator archiveManipulator = new ArchiveManipulator();
-
-        // ----------------- Unzip the file ------------------------------------
-        /*String unzippeDir = filePath + File.separator + "temp";
-        File unzipped = new File(unzippeDir);
-        unzipped.mkdirs();
-
-        try {
-            archiveManipulator.extract(filePathFromArchiveId, unzippeDir);
-        } catch (IOException e) {
-            throw new AxisFault("Cannot extract archive", e);
-        }*/
-
-        // copy resources to lib folder.
-//        File resourceLibDir = new File(unzipped.getAbsolutePath()
-//                                       + File.separator + "lib");
-//        resourceLibDir.mkdirs();
-        /*List resourceList = new ArrayList();
-        for (int i = 0; i < resourceId.length; i++) {
-            if (!resourceId[i].equals(directoryPath)) {
-                String fileAbsPath = "TODO"; // TODO getFilePathFromArchiveId(resourceId[i]);
-                if (fileAbsPath == null) {
-                    throw new AxisFault("Resource cannot be located");
-                }
-                resourceList.add(new File(fileAbsPath));
-            }
-        }
-        FileManipulator fileMan = new FileManipulator();
-        for (Iterator iterator = resourceList.iterator(); iterator.hasNext();) {
-            File file = (File) iterator.next();
-            try {
-                String absPath = file.getAbsolutePath();
-                if (File.separatorChar == '\\') {
-                    absPath = absPath.replace("\\", "/");
-                }
-                int nameIndex = absPath.lastIndexOf("/");
-                String fileName = absPath.substring(nameIndex + 1);
-                fileMan.copyFile(file, new File(resourceLibDir, fileName));
-            } catch (IOException e) {
-                String msg = "Error occured when copying resources";
-                throw new AxisFault(msg, e);
-            }
-        }*/
 
         // ---- Generate the services.xml and place it in META-INF -----
         File file = new File(directoryPath + File.separator + "META-INF" + File.separator +
@@ -312,6 +258,9 @@
                                 + ".aar";
 
         try {
+            ArchiveManipulator archiveManipulator = new ArchiveManipulator();
+            //TODO: Avoid the AAR also going into the archive
+            
             archiveManipulator.archiveDir(outAARFilename, directoryPath);
         } catch (IOException e) {
             String msg = "Cannot create new AAR archive";



More information about the Carbon-dev mailing list