Skip to content

Conversation

rahlk
Copy link
Collaborator

@rahlk rahlk commented Nov 11, 2024

    private static final String MAVEN_CMD = BuildProject.getMavenCommand();
    private static String getMavenCommand() {
        Boolean isWindows = System.getProperty("os.name").toLowerCase().contains("windows");
        String mvnCommand;
        if (isWindows) {
            mvnCommand = new File(projectRootPom, "mvnw.bat").exists() ? String.valueOf(new File(projectRootPom, "mvnw.bat")) : "mvn.bat";
        } else {
            mvnCommand = new File(projectRootPom, "mvnw").exists() ? String.valueOf(new File(projectRootPom, "mvnw")) : "mvn";
        }
        return mvnCommand;
    }

Signed-off-by: Rahul Krishna <i.m.ralk@gmail.com>
@rahlk rahlk requested a review from sinha108 November 11, 2024 15:37
@rahlk rahlk merged commit bb3b2b6 into 1.X.X Nov 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant