|
|
@@ -37,7 +37,13 @@ public class MavenCompiler implements CodeCompiler {
|
|
|
@Override
|
|
|
public void compile(String appId, String appCompileHome) throws Exception {
|
|
|
String pomPath = appCompileHome + "/pom.xml";
|
|
|
- String appDirname = appDirPath.substring(appDirPath.lastIndexOf(File.separator)+1);
|
|
|
+ String appDirname;
|
|
|
+ if (appDirPath.startsWith("/")) {
|
|
|
+ appDirname = appDirPath.substring(1);
|
|
|
+ } else {
|
|
|
+ appDirname = appDirPath;
|
|
|
+ }
|
|
|
+
|
|
|
setInvocationRequest(appDirname, pomPath);
|
|
|
InvocationResult result = invoker.execute(request);
|
|
|
if (result.getExitCode() != 0) {
|