How can I find the jar path from intelliJ by coding?

Viewed 19

I'm developing a intelliJ plugin, A function is to use maven tool to package automatically via codes, after packaged,I want to find the .jar,especially in the case of multiple modules . but i dont know how to do via codes,Could you give me some advice? THX here is the codes

ApplicationManager.getApplication().invokeAndWait(() -> {
            
            Project project = anActionEvent.getProject();
            @SystemIndependent String basePath = project.getBasePath();
            List<String> goals = Arrays.asList("clean", "compile", "package");
            MavenRunnerParameters params = new MavenRunnerParameters(true, basePath,goals, null, null);
            MavenRunner instance = MavenRunner.getInstance(project);
            instance.run(params,null, () -> {
                System.out.println("package successfully");
            });
        });
    }

my intellij plugin will package the maven project automatically , after that there will be many jars under modules, i want to find the jar which can be run,is there any methods I can call ?

0 Answers
Related