Exemple #1
0
 private static List<String> getClasspath(final List<ITestNodeWrapper> tests) {
   final Set<IModule> uniqueModules = SetSequence.fromSet(new HashSet<IModule>());
   ModelAccess.instance()
       .runReadAction(
           new Runnable() {
             public void run() {
               for (ITestNodeWrapper testable : tests) {
                 IModule module = testable.getNodePointer().getModel().getModule();
                 SetSequence.fromSet(uniqueModules).addElement(module);
               }
             }
           });
   Set<String> classpath = SetSequence.fromSet(new LinkedHashSet<String>());
   for (IModule module : uniqueModules) {
     SetSequence.fromSet(classpath)
         .addSequence(ListSequence.fromList(Java_Command.getClasspath(module, true)));
   }
   return SetSequence.fromSet(classpath).toListSequence();
 }
Exemple #2
0
 public ProcessHandler createProcess(String antFilePath) throws ExecutionException {
   String jdkHome = Java_Command.getJdkHome();
   if ((jdkHome == null || jdkHome.length() == 0)) {
     throw new ExecutionException("Could not find valid java home.");
   }
   return new Java_Command()
       .createProcess(
           new ListCommandPart(
               ListSequence.fromListAndArray(
                   new ArrayList(),
                   new PropertyCommandPart("java.home", jdkHome),
                   new PropertyCommandPart("ant.home", myAntLocation_String),
                   new ListCommandPart(
                       Sequence.fromIterable(Ant_Command.getMacroValues()).toListSequence()),
                   (((myOptions_String != null && myOptions_String.length() > 0)
                       ? myOptions_String + " "
                       : "")),
                   new KeyValueCommandPart("-" + "f", new File(antFilePath)),
                   (((myTargetName_String == null || myTargetName_String.length() == 0)
                       ? ""
                       : " " + myTargetName_String)))),
           "org.apache.tools.ant.launch.Launcher",
           Ant_Command.getAntClassPath(myAntLocation_String));
 }