<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">+
+    /**
+     * Resolves the given path with respect to given base. If the path represents an absolute path, a file representing
+     * it is returned, otherwise a file representing a path relative to base is returned.
+     * &lt;p&gt;
+     * It would be nice if File#File(File, String) were doing this.
+     * @param base File that represents the parent, may be null if path is absolute
+     * @param path Path of the file, may not be null
+     * @return new File(name) if name represents an absolute path, new File(base, name) otherwise
+     * @see hudson.FilePath#absolutize() 
+     */
+    public static File absolutize(File base, String path) {
+        if (isAbsolute(path))
+            return new File(path);
+        return new File(base, path);
+    }
+
+    /**
+     * See {@link hudson.FilePath#isAbsolute(String)}.
+     * @param path String representing &lt;code&gt; Platform Specific &lt;/code&gt; (unlike FilePath, which may get Platform agnostic paths), may not be null
+     * @return true if String represents absolute path on this platform, false otherwise
+     */
+    public static boolean isAbsolute(String path) {
+        Pattern DRIVE_PATTERN = Pattern.compile("[A-Za-z]:[\\\\/].*");
+        return path.startsWith("/") || DRIVE_PATTERN.matcher(path).matches();
+    }
 }
Index: maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
===================================================================
--- maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java    (revision 34001)
+++ maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java    (working copy)
@@ -24,55 +24,22 @@
  */
 package hudson.maven;
 
-import hudson.AbortException;
-import hudson.FilePath;
-import hudson.Launcher;
-import hudson.Util;
-import hudson.EnvVars;
-import hudson.scm.ChangeLogSet;
+import hudson.*;
 import hudson.FilePath.FileCallable;
 import hudson.maven.MavenBuild.ProxyImpl2;
 import hudson.maven.reporters.MavenFingerprinter;
 import hudson.maven.reporters.MavenMailer;
-import hudson.model.AbstractProject;
-import hudson.model.Action;
-import hudson.model.Build;
-import hudson.model.BuildListener;
-import hudson.model.Environment;
-import hudson.model.Fingerprint;
-import hudson.model.Hudson;
-import hudson.model.ParametersAction;
-import hudson.model.Result;
-import hudson.model.Computer;
-import hudson.model.Run;
-import hudson.model.TaskListener;
+import hudson.model.*;
 import hudson.model.Cause.UpstreamCause;
 import hudson.remoting.Channel;
 import hudson.remoting.VirtualChannel;
+import hudson.scm.ChangeLogSet;
 import hudson.tasks.BuildWrapper;
 import hudson.tasks.MailSender;
 import hudson.tasks.Maven.MavenInstallation;
 import hudson.util.ArgumentListBuilder;
+import hudson.util.IOUtils;
 import hudson.util.StreamTaskListener;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.io.Serializable;
-import java.io.InterruptedIOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.Map.Entry;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
 import org.apache.maven.BuildFailureException;
 import org.apache.maven.embedder.MavenEmbedderException;
 import org.apache.maven.execution.MavenSession;
@@ -84,6 +51,12 @@
 import org.kohsuke.stapler.StaplerRequest;
 import org.kohsuke.stapler.StaplerResponse;
 
+import java.io.*;
+import java.util.*;
+import java.util.Map.Entry;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
 import static hudson.model.Result.FAILURE;
 
 /**
@@ -865,16 +838,21 @@
         }
 
         public List&lt;PomInfo&gt; invoke(File ws, VirtualChannel channel) throws IOException {
-            File pom = new File(ws,rootPOM);
+            File pom;
 
             PrintStream logger = listener.getLogger();
 
+            if (IOUtils.isAbsolute(rootPOM)) {
+                pom = new File(rootPOM);
+            } else {
             // choice of module root ('ws' in this method) is somewhat arbitrary
             // when multiple CVS/SVN modules are checked out, so also check
             // the path against the workspace root if that seems like what the user meant (see issue #1293)
+                pom = new File(ws, rootPOM);
             File parentLoc = new File(ws.getParentFile(),rootPOM);
             if(!pom.exists() &amp;&amp; parentLoc.exists())
                 pom = parentLoc;
+            }
 
             if(!pom.exists())
                 throw new AbortException(Messages.MavenModuleSetBuild_NoSuchPOMFile(pom));
</pre></body></html>