|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.plugin.eclipse.writers.AbstractEclipseWriter org.apache.maven.plugin.eclipse.writers.AbstractEclipseManifestWriter
public abstract class AbstractEclipseManifestWriter
Common behaviours for creating or adapting the manifest files for eclipse environments.
Field Summary | |
---|---|
protected static String |
MANIFEST_MF_FILENAME
|
protected static String |
META_INF_DIRECTORY
|
Fields inherited from class org.apache.maven.plugin.eclipse.writers.AbstractEclipseWriter |
---|
config, log |
Constructor Summary | |
---|---|
AbstractEclipseManifestWriter()
|
Method Summary | |
---|---|
protected void |
addDependencyToClassPath(StringBuilder classpath,
IdeDependency dependency)
Add one dependency to the blank separated classpath StringBuilder. |
protected boolean |
areManifestsEqual(Manifest manifest,
Manifest existingManifest)
Check if the two manifests are equal. |
protected String |
constructManifestClasspath()
Convert all dependencies in a blank seperated list of jars and projects representing the classpath. |
protected Manifest |
createNewManifest()
Create a manifest contaigning the required classpath. |
protected abstract String |
getMetaInfBaseDirectory(MavenProject project)
Search the project for the existing META-INF directory where the manifest should be located. |
protected String |
orderClasspath(String newValue)
Aphabeticaly sort the classpath. |
protected Manifest |
readExistingManifest(File manifestFile)
Read and parse the existing manifest file. |
protected boolean |
shouldNewManifestFileBeWritten(Manifest manifest,
File manifestFile)
Verify is the manifest sould be overwritten this sould take in account that the manifest should only be written if the contents of the classpath was changed not the order. |
void |
write()
If the existing manifest file located in getMetaInfBaseDirectory() already has a correct
MANIFEST_VERSION and CLASS_PATH value then do nothing. |
Methods inherited from class org.apache.maven.plugin.eclipse.writers.AbstractEclipseWriter |
---|
init |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String MANIFEST_MF_FILENAME
protected static final String META_INF_DIRECTORY
Constructor Detail |
---|
public AbstractEclipseManifestWriter()
Method Detail |
---|
protected String orderClasspath(String newValue)
newValue
- classpath to sort
protected Manifest readExistingManifest(File manifestFile) throws IOException
manifestFile
- file
IOException
- if the file could not be readprotected void addDependencyToClassPath(StringBuilder classpath, IdeDependency dependency)
classpath
- existing classpath to appenddependency
- dependency to append as jar or as projectprotected boolean areManifestsEqual(Manifest manifest, Manifest existingManifest)
manifest
- the new manifestexistingManifest
- to compaire the new one with
protected String constructManifestClasspath()
protected Manifest createNewManifest()
protected boolean shouldNewManifestFileBeWritten(Manifest manifest, File manifestFile) throws MojoExecutionException
manifest
- the newly created classpathmanifestFile
- the file where the manifest
MojoExecutionException
protected abstract String getMetaInfBaseDirectory(MavenProject project) throws MojoExecutionException
MojoExecutionException
public void write() throws MojoExecutionException
getMetaInfBaseDirectory()
already has a correct
MANIFEST_VERSION and CLASS_PATH value then do nothing.
Otherwise generate a NEW (i.e the old one is overwritten) which only contains values for MANIFEST_VERSION and CLASS_PATH, all other previous entries are not kept.
sourceDirs
- all eclipse source directoryslocalRepository
- the local reposetorybuildOutputDirectory
- build output directory (target)
MojoExecutionException
- when writing the config files was not possibleAbstractWtpResourceWriter#write(EclipseSourceDir[], ArtifactRepository, File)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |