org.apache.maven.plugin.eclipse
Class EclipsePlugin

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugin.ide.AbstractIdeSupportMojo
          extended by org.apache.maven.plugin.eclipse.EclipsePlugin
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.codehaus.plexus.logging.LogEnabled

public class EclipsePlugin
extends AbstractIdeSupportMojo

Generates the following eclipse configuration files:

If this goal is run on a multiproject root, dependencies between modules will be configured as direct project dependencies in Eclipse (unless useProjectReferences is set to false)

Version:
$Id: EclipsePlugin.java 391954 2006-04-06 10:21:29Z fgiust $
Author:
Trygve Laugstøl, Fabrizio Giustina

Field Summary
static java.lang.String[] WTP_SUPPORTED_VERSIONS
           
 
Fields inherited from class org.apache.maven.plugin.ide.AbstractIdeSupportMojo
artifactCollector, artifactFactory, artifactMetadataSource, artifactResolver, downloadSources, executedProject, localRepository, project, reactorProjects, remoteArtifactRepositories
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
EclipsePlugin()
           
 
Method Summary
 EclipseSourceDir[] buildDirectoryList(org.apache.maven.project.MavenProject project, java.io.File basedir, java.io.File buildOutputDirectory)
           
 java.util.List getAdditionalBuildcommands()
          Getter for additionalBuildcommands.
 java.util.List getAdditionalProjectnatures()
          Getter for additionalProjectnatures.
 java.util.List getBuildcommands()
          Getter for buildcommands.
 java.io.File getBuildOutputDirectory()
          Getter for buildOutputDirectory.
 java.util.List getClasspathContainers()
          Getter for classpathContainers.
 java.io.File getEclipseProjectDir()
          Getter for eclipseProjectDir.
 java.util.List getProjectnatures()
          Getter for projectnatures.
 boolean getUseProjectReferences()
          Getter for useProjectReferences.
 java.lang.String getWtpversion()
          Getter for wtpversion.
 void setAdditionalBuildcommands(java.util.List additionalBuildcommands)
          Setter for additionalBuildcommands.
 void setAdditionalProjectnatures(java.util.List additionalProjectnatures)
          Setter for additionalProjectnatures.
 void setBuildcommands(java.util.List buildcommands)
          Setter for buildcommands.
 void setBuildOutputDirectory(java.io.File buildOutputDirectory)
          Setter for buildOutputDirectory.
 void setClasspathContainers(java.util.List classpathContainers)
          Setter for classpathContainers.
 void setEclipseProjectDir(java.io.File eclipseProjectDir)
          Setter for eclipseProjectDir.
 void setProjectnatures(java.util.List projectnatures)
          Setter for projectnatures.
 boolean setup()
          Hook for preparation steps before the actual plugin execution.
 void setUseProjectReferences(boolean useProjectReferences)
          Setter for useProjectReferences.
 void setWtpversion(java.lang.String wtpversion)
          Setter for wtpversion.
 void writeConfiguration(IdeDependency[] deps)
          Main plugin method where dependencies should be processed in order to generate IDE configuration files.
 
Methods inherited from class org.apache.maven.plugin.ide.AbstractIdeSupportMojo
doDependencyResolution, enableLogging, execute, getArtifactFactory, getArtifactMetadataSource, getArtifactResolver, getDownloadSources, getExecutedProject, getLocalRepository, getProject, getReactorProjects, getRemoteArtifactRepositories, setArtifactFactory, setArtifactMetadataSource, setArtifactResolver, setDownloadSources, setExecutedProject, setLocalRepository, setProject, setReactorProjects, setRemoteArtifactRepositories
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WTP_SUPPORTED_VERSIONS

public static final java.lang.String[] WTP_SUPPORTED_VERSIONS
Constructor Detail

EclipsePlugin

public EclipsePlugin()
Method Detail

getBuildcommands

public java.util.List getBuildcommands()
Getter for buildcommands.

Returns:
Returns the buildcommands.

setBuildcommands

public void setBuildcommands(java.util.List buildcommands)
Setter for buildcommands.

Parameters:
buildcommands - The buildcommands to set.

getBuildOutputDirectory

public java.io.File getBuildOutputDirectory()
Getter for buildOutputDirectory.

Returns:
Returns the buildOutputDirectory.

setBuildOutputDirectory

public void setBuildOutputDirectory(java.io.File buildOutputDirectory)
Setter for buildOutputDirectory.

Parameters:
buildOutputDirectory - The buildOutputDirectory to set.

getClasspathContainers

public java.util.List getClasspathContainers()
Getter for classpathContainers.

Returns:
Returns the classpathContainers.

setClasspathContainers

public void setClasspathContainers(java.util.List classpathContainers)
Setter for classpathContainers.

Parameters:
classpathContainers - The classpathContainers to set.

getEclipseProjectDir

public java.io.File getEclipseProjectDir()
Getter for eclipseProjectDir.

Returns:
Returns the eclipseProjectDir.

setEclipseProjectDir

public void setEclipseProjectDir(java.io.File eclipseProjectDir)
Setter for eclipseProjectDir.

Parameters:
eclipseProjectDir - The eclipseProjectDir to set.

getProjectnatures

public java.util.List getProjectnatures()
Getter for projectnatures.

Returns:
Returns the projectnatures.

setProjectnatures

public void setProjectnatures(java.util.List projectnatures)
Setter for projectnatures.

Parameters:
projectnatures - The projectnatures to set.

getUseProjectReferences

public boolean getUseProjectReferences()
Getter for useProjectReferences.

Specified by:
getUseProjectReferences in class AbstractIdeSupportMojo
Returns:
Returns the useProjectReferences.

setUseProjectReferences

public void setUseProjectReferences(boolean useProjectReferences)
Setter for useProjectReferences.

Parameters:
useProjectReferences - The useProjectReferences to set.

getWtpversion

public java.lang.String getWtpversion()
Getter for wtpversion.

Returns:
Returns the wtpversion.

setWtpversion

public void setWtpversion(java.lang.String wtpversion)
Setter for wtpversion.

Parameters:
wtpversion - The wtpversion to set.

getAdditionalBuildcommands

public java.util.List getAdditionalBuildcommands()
Getter for additionalBuildcommands.

Returns:
Returns the additionalBuildcommands.

setAdditionalBuildcommands

public void setAdditionalBuildcommands(java.util.List additionalBuildcommands)
Setter for additionalBuildcommands.

Parameters:
additionalBuildcommands - The additionalBuildcommands to set.

getAdditionalProjectnatures

public java.util.List getAdditionalProjectnatures()
Getter for additionalProjectnatures.

Returns:
Returns the additionalProjectnatures.

setAdditionalProjectnatures

public void setAdditionalProjectnatures(java.util.List additionalProjectnatures)
Setter for additionalProjectnatures.

Parameters:
additionalProjectnatures - The additionalProjectnatures to set.

setup

public boolean setup()
              throws org.apache.maven.plugin.MojoExecutionException
Description copied from class: AbstractIdeSupportMojo
Hook for preparation steps before the actual plugin execution.

Specified by:
setup in class AbstractIdeSupportMojo
Returns:
true if execution should continue or false if not.
Throws:
org.apache.maven.plugin.MojoExecutionException - generic mojo exception
See Also:
Mojo.execute()

writeConfiguration

public void writeConfiguration(IdeDependency[] deps)
                        throws org.apache.maven.plugin.MojoExecutionException
Description copied from class: AbstractIdeSupportMojo
Main plugin method where dependencies should be processed in order to generate IDE configuration files.

Specified by:
writeConfiguration in class AbstractIdeSupportMojo
Parameters:
deps - list of IdeDependency objects, with artifacts, sources and javadocs already resolved
Throws:
org.apache.maven.plugin.MojoExecutionException - generic mojo exception

buildDirectoryList

public EclipseSourceDir[] buildDirectoryList(org.apache.maven.project.MavenProject project,
                                             java.io.File basedir,
                                             java.io.File buildOutputDirectory)
                                      throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException


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