You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2008/07/01 10:06:59 UTC
svn commit: r673020 -
/webservices/axis2/trunk/java/modules/tool/axis2-eclipse-service-plugin/src/main/java/org/apache/axis2/tool/service/control/Controller.java
Author: sandakith
Date: Tue Jul 1 01:06:59 2008
New Revision: 673020
URL: http://svn.apache.org/viewvc?rev=673020&view=rev
Log:
Applying the patch by saminda wijeratne for the issue 3881
Modified:
webservices/axis2/trunk/java/modules/tool/axis2-eclipse-service-plugin/src/main/java/org/apache/axis2/tool/service/control/Controller.java
Modified: webservices/axis2/trunk/java/modules/tool/axis2-eclipse-service-plugin/src/main/java/org/apache/axis2/tool/service/control/Controller.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-eclipse-service-plugin/src/main/java/org/apache/axis2/tool/service/control/Controller.java?rev=673020&r1=673019&r2=673020&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-eclipse-service-plugin/src/main/java/org/apache/axis2/tool/service/control/Controller.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-eclipse-service-plugin/src/main/java/org/apache/axis2/tool/service/control/Controller.java Tue Jul 1 01:06:59 2008
@@ -160,35 +160,40 @@
String wsdlFilter = ".wsdl";
try {
+ String metaInfFolderName="META-INF";
+ String libFolderName="lib";
+
//create a temporary directory and copy the files
- tempFileFolder = new File("Service-copy");
+ tempFileFolder = File.createTempFile("temp",".tmp");
+ tempFileFolder.deleteOnExit();
if (tempFileFolder.exists()){deleteDir(tempFileFolder);}
tempFileFolder.mkdir();
- File metaInfFolder = new File(tempFileFolder, "META-INF");
+ File metaInfFolder = new File(tempFileFolder, metaInfFolderName);
metaInfFolder.mkdir();
- File libFolder = new File(tempFileFolder,"lib");
+ File libFolder = new File(tempFileFolder,libFolderName);
libFolder.mkdir();
FileCopier classFilecopier = new FileCopier();
//copy the classes
classFilecopier.copyFiles(classFileFolder, tempFileFolder,page1Bean.getFilter());
-
+
//copy the service.xml
FileCopier serviceXMLcopier = new FileCopier();
serviceXMLcopier.copyFiles(serviceFile, metaInfFolder,xmlFilter);
-
+
//copy the libs
FileCopier libCopier = new FileCopier();
for (int i=0;i < fileList.size();i++){
- libCopier.copyFiles((File)fileList.get(i),libFolder,null);
+ libCopier.copyFiles((File)fileList.get(i),libFolder,null);
}
if (isWSDLAvailable){
new FileCopier().copyFiles(wsdlFile, metaInfFolder,wsdlFilter);
}
//jar the temp directory. the output folder will be created if missing
+
new JarFileWriter().writeJarFile(outputFolder,
outputFileName,
tempFileFolder);
@@ -198,8 +203,6 @@
deleteDir(tempFileFolder);
if (isServiceCreated)
serviceFile.delete();
-
-
}
}