| 14 | } |
| 15 | |
| 16 | public static boolean install(String groupId, String artifactId, String version, String fileName) throws IOException { |
| 17 | String mvnInstallStr = "mvn install:install-java.file -DgroupId=" + groupId + " -DartifactId=" + artifactId + " " + |
| 18 | "-Dversion=" + version + " -Dfile=" + fileName + " -Dpackaging=jar -DgeneratePom=true"; |
| 19 | ToolShell.ToolCommandExec toolCommandExec = new ToolShell.ToolCommandExec(true, false, mvnInstallStr); |
| 20 | ToolShell.ToolCommandResult toolCommandResult = ToolShell.execCmd(toolCommandExec); |
| 21 | return toolCommandResult.errorMsg.length() <= 1; |
| 22 | } |
| 23 | |
| 24 | public static boolean jar(String filePath) throws IOException { |
| 25 | String jarStr = "mvn jar:jar"; |