Package org.bsc.maven.plugin.libutils
Class MojoUtils
- java.lang.Object
-
- org.bsc.maven.plugin.libutils.MojoUtils
-
public class MojoUtils extends Object
- Author:
- softphone
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MojoUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Optional<T>
getArtifactCoordinateFromPropsInJar(JarFile jarFile, java.util.function.Function<Properties,T> creator, Optional<String> groupId)
static <T> Optional<T>
getArtifactCoordinateFromXmlInJar(JarFile jarFile, java.util.function.Function<org.apache.maven.model.Model,T> creator)
static org.apache.maven.model.Model
readModel(InputStream pomFile)
-
-
-
Method Detail
-
readModel
public static org.apache.maven.model.Model readModel(InputStream pomFile) throws org.apache.maven.plugin.MojoExecutionException
- Parameters:
pomFile
-- Returns:
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getArtifactCoordinateFromPropsInJar
public static <T> Optional<T> getArtifactCoordinateFromPropsInJar(JarFile jarFile, java.util.function.Function<Properties,T> creator, Optional<String> groupId) throws IOException, org.apache.maven.plugin.MojoExecutionException
- Type Parameters:
T
-- Parameters:
jarFile
-creator
-- Returns:
- Artifact
- Throws:
IOException
org.apache.maven.plugin.MojoExecutionException
-
getArtifactCoordinateFromXmlInJar
public static <T> Optional<T> getArtifactCoordinateFromXmlInJar(JarFile jarFile, java.util.function.Function<org.apache.maven.model.Model,T> creator) throws IOException, org.apache.maven.plugin.MojoExecutionException
- Type Parameters:
T
-- Parameters:
jarFile
-creator
-- Returns:
- Artifact
- Throws:
IOException
org.apache.maven.plugin.MojoExecutionException
-
-