Package org.apache.maven.buildcache
Class CacheUtils
- java.lang.Object
-
- org.apache.maven.buildcache.CacheUtils
-
public class CacheUtils extends Object
Cache Utils
-
-
Constructor Summary
Constructors Constructor Description CacheUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> voiddebugPrintCollection(org.slf4j.Logger logger, Collection<T> values, String heading, String elementCaption)static <T> TgetLast(List<T> list)static PathgetMultimoduleRoot(org.apache.maven.execution.MavenSession session)static <T> TgetOrCreate(org.apache.maven.execution.MavenSession session, Object key, Supplier<T> supplier)static booleanisArchive(File file)static booleanisPom(org.apache.maven.model.Dependency dependency)static booleanisPom(org.apache.maven.project.MavenProject project)static booleanisSnapshot(String version)static StringmojoExecutionKey(org.apache.maven.plugin.MojoExecution mojo)static StringnormalizedName(org.apache.maven.artifact.Artifact artifact)static ScmreadGitInfo(org.apache.maven.execution.MavenSession session)static voidunzip(Path zip, Path out)static voidzip(Path dir, Path zip)
-
-
-
Method Detail
-
isPom
public static boolean isPom(org.apache.maven.project.MavenProject project)
-
isPom
public static boolean isPom(org.apache.maven.model.Dependency dependency)
-
isSnapshot
public static boolean isSnapshot(String version)
-
normalizedName
public static String normalizedName(org.apache.maven.artifact.Artifact artifact)
-
mojoExecutionKey
public static String mojoExecutionKey(org.apache.maven.plugin.MojoExecution mojo)
-
getMultimoduleRoot
public static Path getMultimoduleRoot(org.apache.maven.execution.MavenSession session)
-
readGitInfo
public static Scm readGitInfo(org.apache.maven.execution.MavenSession session) throws IOException
- Throws:
IOException
-
getLast
public static <T> T getLast(List<T> list)
-
getOrCreate
public static <T> T getOrCreate(org.apache.maven.execution.MavenSession session, Object key, Supplier<T> supplier)
-
isArchive
public static boolean isArchive(File file)
-
zip
public static void zip(Path dir, Path zip) throws IOException
- Throws:
IOException
-
unzip
public static void unzip(Path zip, Path out) throws IOException
- Throws:
IOException
-
debugPrintCollection
public static <T> void debugPrintCollection(org.slf4j.Logger logger, Collection<T> values, String heading, String elementCaption)
-
-