Package org.apache.maven.plugins.invoker
Class MetadataUtils
- java.lang.Object
-
- org.apache.maven.plugins.invoker.MetadataUtils
-
class MetadataUtils extends java.lang.ObjectProvides utility methods for artifact metadata processing.
-
-
Constructor Summary
Constructors Constructor Description MetadataUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static org.codehaus.plexus.util.xml.Xpp3DomaddChild(org.codehaus.plexus.util.xml.Xpp3Dom parent, java.lang.String childName, java.lang.String childValue)private static org.codehaus.plexus.util.xml.Xpp3DomaddChildren(org.codehaus.plexus.util.xml.Xpp3Dom parent, java.lang.String childName, java.util.Collection<java.lang.String> childValues)static voidcreateMetadata(java.io.File file, org.apache.maven.artifact.Artifact artifact)Creates local metadata files for the specified artifact.private static org.codehaus.plexus.util.xml.Xpp3DomreadMetadata(java.io.File metadataFile)private static voidwriteMetadata(java.io.File metadataFile, org.codehaus.plexus.util.xml.Xpp3Dom metadata)
-
-
-
Method Detail
-
createMetadata
public static void createMetadata(java.io.File file, org.apache.maven.artifact.Artifact artifact) throws java.io.IOExceptionCreates 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:
java.io.IOException- If the metadata could not be created.
-
addChild
private static org.codehaus.plexus.util.xml.Xpp3Dom addChild(org.codehaus.plexus.util.xml.Xpp3Dom parent, java.lang.String childName, java.lang.String childValue)
-
addChildren
private static org.codehaus.plexus.util.xml.Xpp3Dom addChildren(org.codehaus.plexus.util.xml.Xpp3Dom parent, java.lang.String childName, java.util.Collection<java.lang.String> childValues)
-
readMetadata
private static org.codehaus.plexus.util.xml.Xpp3Dom readMetadata(java.io.File metadataFile) throws java.io.IOException- Throws:
java.io.IOException
-
writeMetadata
private static void writeMetadata(java.io.File metadataFile, org.codehaus.plexus.util.xml.Xpp3Dom metadata) throws java.io.IOException- Throws:
java.io.IOException
-
-