Package org.apache.maven.plugins.invoker
Class MetadataUtils
java.lang.Object
org.apache.maven.plugins.invoker.MetadataUtils
Provides utility methods for artifact metadata processing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static org.codehaus.plexus.util.xml.Xpp3Dom
private static org.codehaus.plexus.util.xml.Xpp3Dom
addChildren
(org.codehaus.plexus.util.xml.Xpp3Dom parent, String childName, Collection<String> childValues) static void
createMetadata
(File file, org.apache.maven.artifact.Artifact artifact) Creates local metadata files for the specified artifact.private static org.codehaus.plexus.util.xml.Xpp3Dom
readMetadata
(File metadataFile) private static void
writeMetadata
(File metadataFile, org.codehaus.plexus.util.xml.Xpp3Dom metadata)
-
Constructor Details
-
MetadataUtils
MetadataUtils()
-
-
Method Details
-
createMetadata
public static void createMetadata(File file, org.apache.maven.artifact.Artifact artifact) throws IOException Creates local metadata files for the specified artifact. The goal is to simulate the installation of the artifact by a local build, thereby decoupling the forked builds from the inderministic collection of remote repositories that are available to the main build and from which the artifact was originally resolved.- Parameters:
file
- The artifact's file in the local test repository, must not benull
.artifact
- The artifact to create metadata for, must not benull
.- Throws:
IOException
- If the metadata could not be created.
-
addChild
-
addChildren
private static org.codehaus.plexus.util.xml.Xpp3Dom addChildren(org.codehaus.plexus.util.xml.Xpp3Dom parent, String childName, Collection<String> childValues) -
readMetadata
private static org.codehaus.plexus.util.xml.Xpp3Dom readMetadata(File metadataFile) throws IOException - Throws:
IOException
-
writeMetadata
private static void writeMetadata(File metadataFile, org.codehaus.plexus.util.xml.Xpp3Dom metadata) throws IOException - Throws:
IOException
-