gaurav created MSHARED-926: ------------------------------ Summary: Maven invoker build stuck at compiling a module Key: MSHARED-926 URL: https://issues.apache.org/jira/browse/MSHARED-926 Project: Maven Shared Components Issue Type: Bug Components: maven-invoker Affects Versions: maven-invoker-3.0.1 Environment: windows 10 64bit, intel i7-4770, 16gb ram, Reporter: gaurav Attachments: app_dump.txt, mvn_dump.txt
Hi all, I am creating a tool to schedule two maven builds one after another using maven-invoker APIs. Both maven projects are multi-module huge projects. The first projects build without issues and the next project build stucks after sometime. I suspect there is some kind of thread related issue which causes it. {code:java} private void invokerAPI(Path pomRootPath, Properties props) { InvocationRequest request = new DefaultInvocationRequest(); request.setPomFile(Paths.get(pomRootPath.toAbsolutePath().toString(), "pom.xml").toFile()); request.setGoals(Arrays.asList("clean", "install")); request.setProfiles(Collections.singletonList("qa")); request.setProperties(getInvokerProps(props)); request.setUserSettingsFile(new File("C:\\Users\\gauravd\\.m2\\settings.xml")); invoker.setMavenHome(new File("C:\\Program Files\\Apache Software Foundation\\apache-maven-3.6.1")); try { InvocationResult result = invoker.execute(request); if (result.getExitCode() != 0) { if (result.getExecutionException() != null) { logger.error("Failed to run the maven command. Exited with status {}", result.getExitCode(), result.getExecutionException()); throw new RuntimeException("Failed to run the maven command. Exited with status " + result.getExitCode(), result.getExecutionException()); } else { logger.error("Failed to run the maven command. Exited with status {}", result.getExitCode()); throw new RuntimeException("Failed to run the maven command. Exited with status " + result.getExitCode()); } } } catch (MavenInvocationException e) { logger.error("Failed to run the maven command.", e); throw new RuntimeException("Failed to run the maven command.", e); } } {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)