Package org.wso2.maven
Class MavenUtils
- java.lang.Object
-
- org.wso2.maven.MavenUtils
-
public class MavenUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description MavenUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FilecreatePomFile(List<String> dependencies, List<String> repositories)static StringgetMavenHome()Retrieves the Maven home directory.static booleanisConnectorPackingSupported(org.apache.maven.project.MavenProject project)Checks the project runtime version and decides whether to pack connector dependencies or notstatic booleanisVersionedDeployment(org.apache.maven.project.MavenProject project)static voidsetupInvoker(org.apache.maven.shared.invoker.Invoker invoker, String projectPath)Sets up the Maven Invoker with the specified Maven home directory.static booleanuseLocalMaven(String projectPath)
-
-
-
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.MojoExecutionExceptionSets 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
-
createPomFile
public static File createPomFile(List<String> dependencies, List<String> repositories) throws IOException
- Throws:
IOException
-
useLocalMaven
public static boolean useLocalMaven(String projectPath)
-
isVersionedDeployment
public static boolean isVersionedDeployment(org.apache.maven.project.MavenProject project)
-
-