Class P2GeneratorImpl
- java.lang.Object
-
- org.eclipse.tycho.p2.impl.publisher.AbstractMetadataGenerator
-
- org.eclipse.tycho.p2.impl.publisher.P2GeneratorImpl
-
- All Implemented Interfaces:
P2Generator
- Direct Known Subclasses:
DefaultDependencyMetadataGenerator
public class P2GeneratorImpl extends AbstractMetadataGenerator implements P2Generator
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
dependenciesOnly
Whether we need full p2 metadata (false) or just required capabilities.private static java.lang.String[]
SUPPORTED_TYPES
-
Constructor Summary
Constructors Constructor Description P2GeneratorImpl()
P2GeneratorImpl(boolean dependenciesOnly)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static <T> boolean
eq(T a, T b)
java.util.Map<java.lang.String,IP2Artifact>
generateMetadata(java.util.List<IArtifactFacade> artifacts, PublisherOptions options, java.io.File targetDir)
DependencyMetadata
generateMetadata(IArtifactFacade artifact, java.util.List<TargetEnvironment> environments, PublisherOptions options)
private org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor
getCanonicalArtifact(java.lang.String classifier, java.util.Set<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> artifactDescriptors)
private java.util.List<java.io.File>
getCategoryFiles(java.io.File projectLocation)
private org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor
getPackedArtifactDescriptor(java.util.Set<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> artifactDescriptors)
private java.util.List<java.io.File>
getProductFiles(java.io.File projectLocation)
Looks for all files at the base of the project that extension is ".product" Duplicated in the EclipseRepositoryProjectprotected java.util.List<org.eclipse.equinox.p2.publisher.IPublisherAction>
getPublisherActions(IArtifactFacade artifact, java.util.List<TargetEnvironment> environments, OptionalResolutionAction optionalAction)
protected java.util.List<org.eclipse.equinox.p2.publisher.IPublisherAdvice>
getPublisherAdvice(IArtifactFacade artifact, PublisherOptions options)
boolean
isSupported(java.lang.String type)
void
persistMetadata(java.util.Map<java.lang.String,IP2Artifact> metadata, java.io.File unitsXml, java.io.File artifactsXml)
-
Methods inherited from class org.eclipse.tycho.p2.impl.publisher.AbstractMetadataGenerator
generateMetadata, getBuildPropertiesParser, getExtraEntriesAdvice, setBuildPropertiesParser
-
-
-
-
Method Detail
-
generateMetadata
public java.util.Map<java.lang.String,IP2Artifact> generateMetadata(java.util.List<IArtifactFacade> artifacts, PublisherOptions options, java.io.File targetDir) throws java.io.IOException
- Specified by:
generateMetadata
in interfaceP2Generator
targetDir
- location to store artifacts created during meta data generation (e.g. root file zip)- Throws:
java.io.IOException
-
getPackedArtifactDescriptor
private org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor getPackedArtifactDescriptor(java.util.Set<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> artifactDescriptors)
-
getCanonicalArtifact
private org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor getCanonicalArtifact(java.lang.String classifier, java.util.Set<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> artifactDescriptors)
-
eq
private static <T> boolean eq(T a, T b)
-
persistMetadata
public void persistMetadata(java.util.Map<java.lang.String,IP2Artifact> metadata, java.io.File unitsXml, java.io.File artifactsXml) throws java.io.IOException
- Specified by:
persistMetadata
in interfaceP2Generator
- Throws:
java.io.IOException
-
generateMetadata
public DependencyMetadata generateMetadata(IArtifactFacade artifact, java.util.List<TargetEnvironment> environments, PublisherOptions options)
-
getPublisherActions
protected java.util.List<org.eclipse.equinox.p2.publisher.IPublisherAction> getPublisherActions(IArtifactFacade artifact, java.util.List<TargetEnvironment> environments, OptionalResolutionAction optionalAction)
- Specified by:
getPublisherActions
in classAbstractMetadataGenerator
-
isSupported
public boolean isSupported(java.lang.String type)
-
getProductFiles
private java.util.List<java.io.File> getProductFiles(java.io.File projectLocation)
Looks for all files at the base of the project that extension is ".product" Duplicated in the EclipseRepositoryProject- Parameters:
projectLocation
-- Returns:
- The list of product files to parse for an eclipse-repository project
-
getCategoryFiles
private java.util.List<java.io.File> getCategoryFiles(java.io.File projectLocation)
-
getPublisherAdvice
protected java.util.List<org.eclipse.equinox.p2.publisher.IPublisherAdvice> getPublisherAdvice(IArtifactFacade artifact, PublisherOptions options)
- Specified by:
getPublisherAdvice
in classAbstractMetadataGenerator
-
-