org.apache.maven.plugin.eclipse.writers

Class AbstractWtpResourceWriter

public abstract class AbstractWtpResourceWriter extends AbstractEclipseResourceWriter

Base class to hold common constants used by extending classes.

Author: Rahul Thakur Fabrizio Giustina

Field Summary
protected static StringARTIFACT_MAVEN_WAR_PLUGIN
protected static StringATTR_DEPLOY_NAME
protected static StringATTR_DEPLOY_PATH
protected static StringATTR_MODULE_ID
protected static StringATTR_MODULE_TYPE_ID
protected static StringATTR_NAME
protected static StringATTR_SOURCE_PATH
protected static StringATTR_VALUE
protected static StringELT_MODULE_TYPE
protected static StringELT_PROJECT_MODULES
protected static StringELT_PROPERTY
protected static StringELT_VERSION
protected static StringELT_WB_MODULE
protected static StringELT_WB_RESOURCE
Constructor Summary
AbstractWtpResourceWriter(Log log, File eclipseProjectDir, MavenProject project, IdeDependency[] deps)
Method Summary
protected voidaddDependency(XMLWriter writer, IdeDependency dep, ArtifactRepository localRepository, File basedir)
Adds dependency for Eclipse WTP project.
protected IdeDependency[]getDependencies()
Returns Dependent artifacts for our project.
protected StringresolveEjbVersion()
protected StringresolveJ2eeVersion()
protected StringresolveJavaVersion()
protected StringresolveServletVersion()
abstract voidwrite(EclipseSourceDir[] sourceDirs, ArtifactRepository localRepository, File buildOutputDirectory)
Common elements of configuration are handled here.
protected voidwriteModuleTypeAccordingToPackaging(MavenProject project, XMLWriter writer, String packaging, File buildOutputDirectory)
protected voidwriteWarOrEarResources(XMLWriter writer, MavenProject project, ArtifactRepository localRepository)

Field Detail

ARTIFACT_MAVEN_WAR_PLUGIN

protected static final String ARTIFACT_MAVEN_WAR_PLUGIN

ATTR_DEPLOY_NAME

protected static final String ATTR_DEPLOY_NAME

ATTR_DEPLOY_PATH

protected static final String ATTR_DEPLOY_PATH

ATTR_MODULE_ID

protected static final String ATTR_MODULE_ID

ATTR_MODULE_TYPE_ID

protected static final String ATTR_MODULE_TYPE_ID

ATTR_NAME

protected static final String ATTR_NAME

ATTR_SOURCE_PATH

protected static final String ATTR_SOURCE_PATH

ATTR_VALUE

protected static final String ATTR_VALUE

ELT_MODULE_TYPE

protected static final String ELT_MODULE_TYPE

ELT_PROJECT_MODULES

protected static final String ELT_PROJECT_MODULES

ELT_PROPERTY

protected static final String ELT_PROPERTY

ELT_VERSION

protected static final String ELT_VERSION

ELT_WB_MODULE

protected static final String ELT_WB_MODULE

ELT_WB_RESOURCE

protected static final String ELT_WB_RESOURCE

Constructor Detail

AbstractWtpResourceWriter

public AbstractWtpResourceWriter(Log log, File eclipseProjectDir, MavenProject project, IdeDependency[] deps)

Method Detail

addDependency

protected void addDependency(XMLWriter writer, IdeDependency dep, ArtifactRepository localRepository, File basedir)
Adds dependency for Eclipse WTP project.

Parameters: writer artifact localRepository basedir

Throws: MojoExecutionException

getDependencies

protected IdeDependency[] getDependencies()
Returns Dependent artifacts for our project.

Returns:

resolveEjbVersion

protected String resolveEjbVersion()

resolveJ2eeVersion

protected String resolveJ2eeVersion()

resolveJavaVersion

protected String resolveJavaVersion()

resolveServletVersion

protected String resolveServletVersion()

write

public abstract void write(EclipseSourceDir[] sourceDirs, ArtifactRepository localRepository, File buildOutputDirectory)
Common elements of configuration are handled here.

Parameters: sourceDirs localRepository buildOutputDirectory

Throws: MojoExecutionException

writeModuleTypeAccordingToPackaging

protected void writeModuleTypeAccordingToPackaging(MavenProject project, XMLWriter writer, String packaging, File buildOutputDirectory)

Parameters: project writer packaging

Throws: MojoExecutionException

writeWarOrEarResources

protected void writeWarOrEarResources(XMLWriter writer, MavenProject project, ArtifactRepository localRepository)
Copyright © 2002-2008 Apache Software Foundation. All Rights Reserved.