Class ReferenceBuildinfoUtil
java.lang.Object
org.apache.maven.plugins.artifact.buildinfo.ReferenceBuildinfoUtil
Utility to download reference artifacts and download or generate reference buildinfo.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.apache.maven.artifact.factory.ArtifactFactoryprivate final org.apache.maven.artifact.handler.manager.ArtifactHandlerManagerprivate final org.apache.maven.plugin.logging.Logprivate final FileDirectory of the downloaded reference files.private final org.eclipse.aether.RepositorySystemSessionprivate final org.eclipse.aether.RepositorySystemprivate final org.apache.maven.rtinfo.RuntimeInformation -
Constructor Summary
ConstructorsConstructorDescriptionReferenceBuildinfoUtil(org.apache.maven.plugin.logging.Log log, File referenceDir, Map<org.apache.maven.artifact.Artifact, String> artifacts, org.apache.maven.artifact.factory.ArtifactFactory artifactFactory, org.eclipse.aether.RepositorySystem repoSystem, org.eclipse.aether.RepositorySystemSession repoSession, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager, org.apache.maven.rtinfo.RuntimeInformation rtInformation) -
Method Summary
Modifier and TypeMethodDescription(package private) FiledownloadOrCreateReferenceBuildinfo(org.eclipse.aether.repository.RemoteRepository repo, org.apache.maven.project.MavenProject project, File buildinfoFile, boolean mono) private FiledownloadReference(org.eclipse.aether.repository.RemoteRepository repo, org.apache.maven.artifact.Artifact artifact) private FiledownloadReferenceBuildinfo(org.eclipse.aether.repository.RemoteRepository repo, org.apache.maven.project.MavenProject project) extractEnv(File file, org.apache.maven.artifact.Artifact artifact) private StringextractJavaVersion(Manifest manifest) private StringextractOsName(org.apache.maven.artifact.Artifact a, JarFile jar) private FilegetReference(String groupId, File file)
-
Field Details
-
JAR_TYPES
-
log
private final org.apache.maven.plugin.logging.Log log -
referenceDir
Directory of the downloaded reference files. -
artifacts
-
artifactFactory
private final org.apache.maven.artifact.factory.ArtifactFactory artifactFactory -
repoSystem
private final org.eclipse.aether.RepositorySystem repoSystem -
repoSession
private final org.eclipse.aether.RepositorySystemSession repoSession -
artifactHandlerManager
private final org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager -
rtInformation
private final org.apache.maven.rtinfo.RuntimeInformation rtInformation
-
-
Constructor Details
-
ReferenceBuildinfoUtil
ReferenceBuildinfoUtil(org.apache.maven.plugin.logging.Log log, File referenceDir, Map<org.apache.maven.artifact.Artifact, String> artifacts, org.apache.maven.artifact.factory.ArtifactFactory artifactFactory, org.eclipse.aether.RepositorySystem repoSystem, org.eclipse.aether.RepositorySystemSession repoSession, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager, org.apache.maven.rtinfo.RuntimeInformation rtInformation)
-
-
Method Details
-
downloadOrCreateReferenceBuildinfo
File downloadOrCreateReferenceBuildinfo(org.eclipse.aether.repository.RemoteRepository repo, org.apache.maven.project.MavenProject project, File buildinfoFile, boolean mono) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-
extractEnv
private ReferenceBuildinfoUtil.ReproducibleEnv extractEnv(File file, org.apache.maven.artifact.Artifact artifact) -
extractJavaVersion
-
extractOsName
-
downloadReferenceBuildinfo
private File downloadReferenceBuildinfo(org.eclipse.aether.repository.RemoteRepository repo, org.apache.maven.project.MavenProject project) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-
downloadReference
private File downloadReference(org.eclipse.aether.repository.RemoteRepository repo, org.apache.maven.artifact.Artifact artifact) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.artifact.resolver.ArtifactNotFoundException - Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.artifact.resolver.ArtifactNotFoundException
-
getReference
-