Package org.eclipse.tycho.pomless
Class TychoBundleMapping
- java.lang.Object
-
- org.eclipse.tycho.pomless.AbstractTychoMapping
-
- org.eclipse.tycho.pomless.TychoBundleMapping
-
- All Implemented Interfaces:
org.apache.maven.model.io.ModelReader
,org.sonatype.maven.polyglot.mapping.Mapping
@Component(role=org.sonatype.maven.polyglot.mapping.Mapping.class, hint="eclipse-plugin") public class TychoBundleMapping extends AbstractTychoMapping
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
BUNDLE_SYMBOLIC_NAME
static java.lang.String
MANIFEST_MF
static java.lang.String
META_INF_DIRECTORY
static java.lang.String
PACKAGING
private static java.lang.String
PACKAGING_TEST
-
Fields inherited from class org.eclipse.tycho.pomless.AbstractTychoMapping
container, logger
-
-
Constructor Summary
Constructors Constructor Description TychoBundleMapping()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.String
getBundleSymbolicName(java.util.jar.Attributes headers, java.io.File manifestFile)
private static java.lang.String
getManifestAttributeValue(java.util.jar.Attributes headers, java.lang.String attributeName, java.io.File manifestFile)
protected java.lang.String
getPackaging()
protected java.io.File
getPrimaryArtifact(java.io.File dir)
private java.lang.String
getRequiredHeaderValue(java.lang.String headerKey, java.util.jar.Attributes headers, java.io.File manifestFile)
protected void
initModel(org.apache.maven.model.Model model, java.io.Reader artifactReader, java.io.File artifactFile)
private boolean
isTestBundle(java.lang.String bundleSymbolicName, java.util.jar.Attributes manifestHeaders, java.io.File bundleRoot)
protected boolean
isValidLocation(java.lang.String location)
private java.util.jar.Attributes
readManifestHeaders(java.io.File manifestFile)
-
Methods inherited from class org.eclipse.tycho.pomless.AbstractTychoMapping
accept, findParent, getBuildProperties, getFlavour, getPomVersion, getPrimaryArtifactCharset, getPriority, getReader, getRealArtifactFile, getWriter, locatePom, locatePomReference, read, read, read
-
-
-
-
Field Detail
-
META_INF_DIRECTORY
public static final java.lang.String META_INF_DIRECTORY
- See Also:
- Constant Field Values
-
MANIFEST_MF
public static final java.lang.String MANIFEST_MF
- See Also:
- Constant Field Values
-
PACKAGING
public static final java.lang.String PACKAGING
- See Also:
- Constant Field Values
-
BUNDLE_SYMBOLIC_NAME
private static final java.lang.String BUNDLE_SYMBOLIC_NAME
- See Also:
- Constant Field Values
-
PACKAGING_TEST
private static final java.lang.String PACKAGING_TEST
- See Also:
- Constant Field Values
-
-
Method Detail
-
isValidLocation
protected boolean isValidLocation(java.lang.String location)
- Specified by:
isValidLocation
in classAbstractTychoMapping
-
getPrimaryArtifact
protected java.io.File getPrimaryArtifact(java.io.File dir)
- Specified by:
getPrimaryArtifact
in classAbstractTychoMapping
-
getPackaging
protected java.lang.String getPackaging()
- Specified by:
getPackaging
in classAbstractTychoMapping
-
initModel
protected void initModel(org.apache.maven.model.Model model, java.io.Reader artifactReader, java.io.File artifactFile) throws org.apache.maven.model.io.ModelParseException, java.io.IOException
- Specified by:
initModel
in classAbstractTychoMapping
- Throws:
org.apache.maven.model.io.ModelParseException
java.io.IOException
-
readManifestHeaders
private java.util.jar.Attributes readManifestHeaders(java.io.File manifestFile) throws java.io.IOException
- Throws:
java.io.IOException
-
getBundleSymbolicName
private java.lang.String getBundleSymbolicName(java.util.jar.Attributes headers, java.io.File manifestFile) throws org.apache.maven.model.io.ModelParseException
- Throws:
org.apache.maven.model.io.ModelParseException
-
getRequiredHeaderValue
private java.lang.String getRequiredHeaderValue(java.lang.String headerKey, java.util.jar.Attributes headers, java.io.File manifestFile) throws org.apache.maven.model.io.ModelParseException
- Throws:
org.apache.maven.model.io.ModelParseException
-
isTestBundle
private boolean isTestBundle(java.lang.String bundleSymbolicName, java.util.jar.Attributes manifestHeaders, java.io.File bundleRoot) throws java.io.IOException
- Throws:
java.io.IOException
-
getManifestAttributeValue
private static java.lang.String getManifestAttributeValue(java.util.jar.Attributes headers, java.lang.String attributeName, java.io.File manifestFile) throws java.io.IOException
- Throws:
java.io.IOException
-
-