Esempio n. 1
0
 /**
  * Possibly null, whitespace-separated (including TAB, NL, etc) VM options to be used to launch
  * Maven process.
  *
  * <p>If mavenOpts is null or empty, we'll return the globally-defined MAVEN_OPTS.
  */
 public String getMavenOpts() {
   if ((mavenOpts != null) && (mavenOpts.trim().length() > 0)) {
     return mavenOpts.replaceAll("[\t\r\n]+", " ");
   } else {
     String globalOpts = DESCRIPTOR.getGlobalMavenOpts();
     if (globalOpts != null) {
       return globalOpts.replaceAll("[\t\r\n]+", " ");
     } else {
       return globalOpts;
     }
   }
 }
Esempio n. 2
0
 /** Gets the Maven to invoke. If null, we pick any random Maven installation. */
 public MavenInstallation getMaven() {
   for (MavenInstallation i : DESCRIPTOR.getMavenDescriptor().getInstallations()) {
     if (mavenName == null || i.getName().equals(mavenName)) return i;
   }
   return null;
 }