org.apache.maven.plugin.eclipse.writers
Class AbstractWtpResourceWriter

java.lang.Object
  extended by org.apache.maven.plugin.eclipse.writers.AbstractEclipseResourceWriter
      extended by org.apache.maven.plugin.eclipse.writers.AbstractWtpResourceWriter
Direct Known Subclasses:
EclipseWtpComponentWriter, EclipseWtpFacetsWriter, EclipseWtpmodulesWriter

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 java.lang.String ARTIFACT_MAVEN_WAR_PLUGIN
           
protected static java.lang.String ATTR_DEPLOY_NAME
           
protected static java.lang.String ATTR_DEPLOY_PATH
           
protected static java.lang.String ATTR_MODULE_ID
           
protected static java.lang.String ATTR_MODULE_TYPE_ID
           
protected static java.lang.String ATTR_NAME
           
protected static java.lang.String ATTR_SOURCE_PATH
           
protected static java.lang.String ATTR_VALUE
           
protected static java.lang.String ELT_MODULE_TYPE
           
protected static java.lang.String ELT_PROJECT_MODULES
           
protected static java.lang.String ELT_PROPERTY
           
protected static java.lang.String ELT_VERSION
           
protected static java.lang.String ELT_WB_MODULE
           
protected static java.lang.String ELT_WB_RESOURCE
           
 
Fields inherited from class org.apache.maven.plugin.eclipse.writers.AbstractEclipseResourceWriter
deps
 
Constructor Summary
AbstractWtpResourceWriter(org.apache.maven.plugin.logging.Log log, java.io.File eclipseProjectDir, org.apache.maven.project.MavenProject project, IdeDependency[] deps)
           
 
Method Summary
protected  void addDependency(org.codehaus.plexus.util.xml.XMLWriter writer, IdeDependency dep, org.apache.maven.artifact.repository.ArtifactRepository localRepository, java.io.File basedir)
          Adds dependency for Eclipse WTP project.
protected  IdeDependency[] getDependencies()
          Returns Dependent artifacts for our project.
protected  java.lang.String resolveEjbVersion()
           
protected  java.lang.String resolveJ2eeVersion()
           
protected  java.lang.String resolveJavaVersion()
           
protected  java.lang.String resolveServletVersion()
           
abstract  void write(EclipseSourceDir[] sourceDirs, org.apache.maven.artifact.repository.ArtifactRepository localRepository, java.io.File buildOutputDirectory)
          Common elements of configuration are handled here.
protected  void writeModuleTypeAccordingToPackaging(org.apache.maven.project.MavenProject project, org.codehaus.plexus.util.xml.XMLWriter writer, java.lang.String packaging, java.io.File buildOutputDirectory)
           
protected  void writeWarOrEarResources(org.codehaus.plexus.util.xml.XMLWriter writer, org.apache.maven.project.MavenProject project, org.apache.maven.artifact.repository.ArtifactRepository localRepository)
           
 
Methods inherited from class org.apache.maven.plugin.eclipse.writers.AbstractEclipseResourceWriter
getEclipseProjectDirectory, getLog, getProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTR_VALUE

protected static final java.lang.String ATTR_VALUE
See Also:
Constant Field Values

ATTR_NAME

protected static final java.lang.String ATTR_NAME
See Also:
Constant Field Values

ELT_PROPERTY

protected static final java.lang.String ELT_PROPERTY
See Also:
Constant Field Values

ELT_VERSION

protected static final java.lang.String ELT_VERSION
See Also:
Constant Field Values

ATTR_MODULE_TYPE_ID

protected static final java.lang.String ATTR_MODULE_TYPE_ID
See Also:
Constant Field Values

ATTR_SOURCE_PATH

protected static final java.lang.String ATTR_SOURCE_PATH
See Also:
Constant Field Values

ATTR_DEPLOY_PATH

protected static final java.lang.String ATTR_DEPLOY_PATH
See Also:
Constant Field Values

ELT_WB_RESOURCE

protected static final java.lang.String ELT_WB_RESOURCE
See Also:
Constant Field Values

ELT_MODULE_TYPE

protected static final java.lang.String ELT_MODULE_TYPE
See Also:
Constant Field Values

ATTR_DEPLOY_NAME

protected static final java.lang.String ATTR_DEPLOY_NAME
See Also:
Constant Field Values

ELT_WB_MODULE

protected static final java.lang.String ELT_WB_MODULE
See Also:
Constant Field Values

ATTR_MODULE_ID

protected static final java.lang.String ATTR_MODULE_ID
See Also:
Constant Field Values

ELT_PROJECT_MODULES

protected static final java.lang.String ELT_PROJECT_MODULES
See Also:
Constant Field Values

ARTIFACT_MAVEN_WAR_PLUGIN

protected static final java.lang.String ARTIFACT_MAVEN_WAR_PLUGIN
See Also:
Constant Field Values
Constructor Detail

AbstractWtpResourceWriter

public AbstractWtpResourceWriter(org.apache.maven.plugin.logging.Log log,
                                 java.io.File eclipseProjectDir,
                                 org.apache.maven.project.MavenProject project,
                                 IdeDependency[] deps)
Method Detail

getDependencies

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

Returns:

write

public abstract void write(EclipseSourceDir[] sourceDirs,
                           org.apache.maven.artifact.repository.ArtifactRepository localRepository,
                           java.io.File buildOutputDirectory)
                    throws org.apache.maven.plugin.MojoExecutionException
Common elements of configuration are handled here.

Parameters:
sourceDirs -
localRepository -
buildOutputDirectory -
Throws:
org.apache.maven.plugin.MojoExecutionException

writeModuleTypeAccordingToPackaging

protected void writeModuleTypeAccordingToPackaging(org.apache.maven.project.MavenProject project,
                                                   org.codehaus.plexus.util.xml.XMLWriter writer,
                                                   java.lang.String packaging,
                                                   java.io.File buildOutputDirectory)
                                            throws org.apache.maven.plugin.MojoExecutionException
Parameters:
project -
writer -
packaging -
Throws:
org.apache.maven.plugin.MojoExecutionException

addDependency

protected void addDependency(org.codehaus.plexus.util.xml.XMLWriter writer,
                             IdeDependency dep,
                             org.apache.maven.artifact.repository.ArtifactRepository localRepository,
                             java.io.File basedir)
                      throws org.apache.maven.plugin.MojoExecutionException
Adds dependency for Eclipse WTP project.

Parameters:
writer -
artifact -
localRepository -
basedir -
Throws:
org.apache.maven.plugin.MojoExecutionException

writeWarOrEarResources

protected void writeWarOrEarResources(org.codehaus.plexus.util.xml.XMLWriter writer,
                                      org.apache.maven.project.MavenProject project,
                                      org.apache.maven.artifact.repository.ArtifactRepository localRepository)
                               throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

resolveServletVersion

protected java.lang.String resolveServletVersion()

resolveEjbVersion

protected java.lang.String resolveEjbVersion()

resolveJ2eeVersion

protected java.lang.String resolveJ2eeVersion()

resolveJavaVersion

protected java.lang.String resolveJavaVersion()


Copyright © 2002-2010 Apache Software Foundation. All Rights Reserved.