private static final ClassUtils classUtils = new ClassUtils();
private void processClientJar(ToolContext context) { ClassCollector oldCollector = context.get(ClassCollector.class); ClassCollector newCollector = new ClassCollector(); String oldClassDir = (String)context.get(ToolConstants.CFG_CLASSDIR); File tmpDir = FileUtils.createTmpDir(); context.put(ToolConstants.CFG_CLASSDIR, tmpDir.getAbsolutePath()); newCollector.setTypesClassNames(oldCollector.getTypesClassNames()); newCollector.setSeiClassNames(oldCollector.getSeiClassNames()); newCollector.setExceptionClassNames(oldCollector.getExceptionClassNames()); newCollector.setServiceClassNames(oldCollector.getServiceClassNames()); context.put(ClassCollector.class, newCollector); new ClassUtils().compile(context); generateLocalWSDL(context); File clientJarFile = new File((String)context.get(ToolConstants.CFG_OUTPUTDIR), (String)context.get(ToolConstants.CFG_CLIENT_JAR)); JarOutputStream jarout = null; try { jarout = new JarOutputStream(Files.newOutputStream(clientJarFile.toPath()), new Manifest()); createClientJar(tmpDir, jarout); jarout.close(); } catch (Exception e) { LOG.log(Level.SEVERE, "FAILED_TO_CREAT_CLIENTJAR", e); Message msg = new Message("FAILED_TO_CREAT_CLIENTJAR", LOG); throw new ToolException(msg, e); } context.put(ToolConstants.CFG_CLASSDIR, oldClassDir); context.put(ClassCollector.class, oldCollector); }
+ File.separator + str); try { copyXmlFile(otherFile, targetFile);
private void processClientJar(ToolContext context) { ClassCollector oldCollector = context.get(ClassCollector.class); ClassCollector newCollector = new ClassCollector(); String oldClassDir = (String)context.get(ToolConstants.CFG_CLASSDIR); File tmpDir = FileUtils.createTmpDir(); context.put(ToolConstants.CFG_CLASSDIR, tmpDir.getAbsolutePath()); newCollector.setTypesClassNames(oldCollector.getTypesClassNames()); newCollector.setSeiClassNames(oldCollector.getSeiClassNames()); newCollector.setExceptionClassNames(oldCollector.getExceptionClassNames()); newCollector.setServiceClassNames(oldCollector.getServiceClassNames()); context.put(ClassCollector.class, newCollector); new ClassUtils().compile(context); generateLocalWSDL(context); File clientJarFile = new File((String)context.get(ToolConstants.CFG_OUTPUTDIR), (String)context.get(ToolConstants.CFG_CLIENT_JAR)); JarOutputStream jarout = null; try { jarout = new JarOutputStream(Files.newOutputStream(clientJarFile.toPath()), new Manifest()); createClientJar(tmpDir, jarout); jarout.close(); } catch (Exception e) { LOG.log(Level.SEVERE, "FAILED_TO_CREAT_CLIENTJAR", e); Message msg = new Message("FAILED_TO_CREAT_CLIENTJAR", LOG); throw new ToolException(msg, e); } context.put(ToolConstants.CFG_CLASSDIR, oldClassDir); context.put(ClassCollector.class, oldCollector); }
+ File.separator + str); try { copyXmlFile(otherFile, targetFile);
(new ClassUtils()).compile(context);
new ClassUtils().compile(context);
new ClassUtils().compile(context);
new ClassUtils().compile(context);