508 return true;
509 } catch(Exception e) {
510 return false;
511 }
512 }
513
514 protected boolean compileGeneratedClasses(ErrorReceiver receiver, WsimportListener listener){
515 List<String> sourceFiles = new ArrayList<String>();
516
517 for (File f : options.getGeneratedFiles()) {
518 if (f.exists() && f.getName().endsWith(".java")) {
519 sourceFiles.add(f.getAbsolutePath());
520 }
521 }
522
523 if (sourceFiles.size() > 0) {
524 String classDir = options.destDir.getAbsolutePath();
525 String classpathString = createClasspathString();
526 boolean bootCP = useBootClasspath(EndpointContext.class) || useBootClasspath(JAXBPermission.class);
527 List<String> args = new ArrayList<String>();
528 args.add("-addmods");
529 args.add("java.xml.ws");
530 args.add("-d");
531 args.add(classDir);
532 args.add("-classpath");
533 args.add(classpathString);
534 //javac is not working in osgi as the url starts with a bundle
535 if (bootCP) {
536 args.add("-Xbootclasspath/p:"
537 + JavaCompilerHelper.getJarFile(EndpointContext.class)
538 + File.pathSeparator
539 + JavaCompilerHelper.getJarFile(JAXBPermission.class));
540 }
541
542 if (options.debug) {
543 args.add("-g");
544 }
545
546 if (options.encoding != null) {
547 args.add("-encoding");
548 args.add(options.encoding);
|
508 return true;
509 } catch(Exception e) {
510 return false;
511 }
512 }
513
514 protected boolean compileGeneratedClasses(ErrorReceiver receiver, WsimportListener listener){
515 List<String> sourceFiles = new ArrayList<String>();
516
517 for (File f : options.getGeneratedFiles()) {
518 if (f.exists() && f.getName().endsWith(".java")) {
519 sourceFiles.add(f.getAbsolutePath());
520 }
521 }
522
523 if (sourceFiles.size() > 0) {
524 String classDir = options.destDir.getAbsolutePath();
525 String classpathString = createClasspathString();
526 boolean bootCP = useBootClasspath(EndpointContext.class) || useBootClasspath(JAXBPermission.class);
527 List<String> args = new ArrayList<String>();
528 args.add("--add-modules");
529 args.add("java.xml.ws");
530 args.add("-d");
531 args.add(classDir);
532 args.add("-classpath");
533 args.add(classpathString);
534 //javac is not working in osgi as the url starts with a bundle
535 if (bootCP) {
536 args.add("-Xbootclasspath/p:"
537 + JavaCompilerHelper.getJarFile(EndpointContext.class)
538 + File.pathSeparator
539 + JavaCompilerHelper.getJarFile(JAXBPermission.class));
540 }
541
542 if (options.debug) {
543 args.add("-g");
544 }
545
546 if (options.encoding != null) {
547 args.add("-encoding");
548 args.add(options.encoding);
|