Class MavenUtils


  • public class MavenUtils
    extends Object
    • Constructor Detail

      • MavenUtils

        public MavenUtils()
    • Method Detail

      • getMavenHome

        public static String getMavenHome()
                                   throws org.apache.maven.plugin.MojoExecutionException
        Retrieves the Maven home directory.
        Returns:
        The Maven home directory path, or null if it cannot be determined.
        Throws:
        org.apache.maven.plugin.MojoExecutionException - if an error occurs while determining the Maven home directory.
      • setupInvoker

        public static void setupInvoker​(org.apache.maven.shared.invoker.Invoker invoker,
                                        String projectPath)
                                 throws org.apache.maven.plugin.MojoExecutionException
        Sets up the Maven Invoker with the specified Maven home directory.
        Parameters:
        projectPath - The project directory.
        invoker - The Maven Invoker to set up.
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • isConnectorPackingSupported

        public static boolean isConnectorPackingSupported​(org.apache.maven.project.MavenProject project)
        Checks the project runtime version and decides whether to pack connector dependencies or not
        Parameters:
        project - Maven project
        Returns:
        whether to pack connector dependencies or not
      • useLocalMaven

        public static boolean useLocalMaven​(String projectPath)
      • isVersionedDeployment

        public static boolean isVersionedDeployment​(org.apache.maven.project.MavenProject project)