public abstract class AbstractTychoMapping extends Object implements org.sonatype.maven.polyglot.mapping.Mapping, org.apache.maven.model.io.ModelReader
Mapping
and ModelReader
that handles all the low-level
stuff, implementations must only handle a small subsetModifier and Type | Field and Description |
---|---|
protected org.codehaus.plexus.PlexusContainer |
container |
protected org.codehaus.plexus.logging.Logger |
logger |
Constructor and Description |
---|
AbstractTychoMapping() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Map<String,?> options) |
protected org.apache.maven.model.Parent |
findParent(File projectRoot,
Map<String,?> projectOptions) |
protected static Properties |
getBuildProperties(File dir) |
String |
getFlavour() |
protected abstract String |
getPackaging() |
protected static String |
getPomVersion(String pdeVersion) |
protected abstract File |
getPrimaryArtifact(File dir) |
protected Charset |
getPrimaryArtifactCharset()
returns the charset that should be used when reading artifact, default is UTF-8 might be
overridden by subclasses
|
float |
getPriority() |
org.apache.maven.model.io.ModelReader |
getReader() |
protected File |
getRealArtifactFile(File polyglotArtifactFile) |
org.apache.maven.model.io.ModelWriter |
getWriter() |
protected abstract void |
initModel(org.apache.maven.model.Model model,
Reader artifactReader,
File artifactFile) |
protected abstract boolean |
isValidLocation(String location) |
File |
locatePom(File dir) |
protected PomReference |
locatePomReference(File folder,
String nameHint)
Locates the
PomReference for the given folder and the given nameHint |
org.apache.maven.model.Model |
read(File input,
Map<String,?> options) |
org.apache.maven.model.Model |
read(InputStream input,
Map<String,?> options) |
org.apache.maven.model.Model |
read(Reader input,
Map<String,?> options) |
@Requirement protected org.codehaus.plexus.PlexusContainer container
@Requirement protected org.codehaus.plexus.logging.Logger logger
public File locatePom(File dir)
locatePom
in interface org.sonatype.maven.polyglot.mapping.Mapping
public boolean accept(Map<String,?> options)
accept
in interface org.sonatype.maven.polyglot.mapping.Mapping
public org.apache.maven.model.io.ModelReader getReader()
getReader
in interface org.sonatype.maven.polyglot.mapping.Mapping
public org.apache.maven.model.io.ModelWriter getWriter()
getWriter
in interface org.sonatype.maven.polyglot.mapping.Mapping
public org.apache.maven.model.Model read(InputStream input, Map<String,?> options) throws IOException, org.apache.maven.model.io.ModelParseException
read
in interface org.apache.maven.model.io.ModelReader
IOException
org.apache.maven.model.io.ModelParseException
public org.apache.maven.model.Model read(File input, Map<String,?> options) throws IOException, org.apache.maven.model.io.ModelParseException
read
in interface org.apache.maven.model.io.ModelReader
IOException
org.apache.maven.model.io.ModelParseException
public org.apache.maven.model.Model read(Reader input, Map<String,?> options) throws IOException, org.apache.maven.model.io.ModelParseException
read
in interface org.apache.maven.model.io.ModelReader
IOException
org.apache.maven.model.io.ModelParseException
protected org.apache.maven.model.Parent findParent(File projectRoot, Map<String,?> projectOptions) throws org.apache.maven.model.io.ModelParseException, IOException
org.apache.maven.model.io.ModelParseException
IOException
protected PomReference locatePomReference(File folder, String nameHint)
PomReference
for the given folder and the given nameHintfolder
- the folder to searchnameHint
- the name hint to usePomReference
or null
public float getPriority()
getPriority
in interface org.sonatype.maven.polyglot.mapping.Mapping
public String getFlavour()
getFlavour
in interface org.sonatype.maven.polyglot.mapping.Mapping
protected abstract boolean isValidLocation(String location)
protected abstract String getPackaging()
protected Charset getPrimaryArtifactCharset()
protected abstract void initModel(org.apache.maven.model.Model model, Reader artifactReader, File artifactFile) throws org.apache.maven.model.io.ModelParseException, IOException
org.apache.maven.model.io.ModelParseException
IOException
protected static Properties getBuildProperties(File dir) throws IOException
IOException
Copyright © 2008–2020 Eclipse Foundation. All rights reserved.