|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.apache.maven.plugin.ide.AbstractIdeSupportMojo
org.apache.maven.plugin.eclipse.EclipsePlugin
Generates the following eclipse configuration files:
.project
and .classpath
files.setting/org.eclipse.jdt.core.prefs
with project specific compiler settingswtpversion
is set to a
valid version (WTP configuration is not generated by default)useProjectReferences
is set to false
).
Field Summary | |
protected static java.lang.String |
ASPECTJ_RT_CONTAINER
|
protected static java.lang.String |
BUILDER_WST_VALIDATION
|
protected static java.lang.String |
COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER
|
protected boolean |
limitProjectReferencesToWorkspace
Limit the use of project references to the current workspace. |
protected static java.lang.String |
REQUIRED_PLUGINS_CONTAINER
|
protected java.io.File |
workspace
This eclipse workspace is read and all artifacts detected there will be connected as eclipse projects and will not be linked to the jars in the local repository. |
static java.lang.String[] |
WTP_SUPPORTED_VERSIONS
|
Fields inherited from class org.apache.maven.plugin.ide.AbstractIdeSupportMojo |
artifactCollector, artifactFactory, artifactMetadataSource, artifactResolver, downloadJavadocs, downloadSources, executedProject, forceRecheck, localRepository, logger, packaging, 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)
|
protected void |
checkDeprecationsExtras()
Extension point for subclasses. |
protected void |
convertBuildCommandList(java.util.List commands)
Convert any Strings in the commands List to BuildCommand s. |
protected EclipseWriterConfig |
createEclipseWriterConfig(IdeDependency[] deps)
Create the EclipseWriterConfig for the specified dependencies. |
protected void |
fillDefaultBuilders(java.lang.String packaging)
Fill getBuildcommands() with values. |
protected void |
fillDefaultClasspathContainers(java.lang.String packaging)
Fill getClasspathContainers() with values. |
protected void |
fillDefaultNatures(java.lang.String packaging)
Fill getProjectnatures() with values. |
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 |
getExcludes()
|
java.lang.String |
getProjectNameForArifact(org.apache.maven.artifact.Artifact artifact)
Find the name of the project as used in eclipse. |
java.lang.String |
getProjectNameTemplate()
Getter for projectNameTemplate |
java.util.List |
getProjectnatures()
Getter for projectnatures . |
boolean |
getUseProjectReferences()
Getter for useProjectReferences . |
protected IdeDependency[] |
getWorkspaceArtefacts()
|
WorkspaceConfiguration |
getWorkspaceConfiguration()
|
java.lang.String |
getWtpversion()
Getter for wtpversion . |
protected boolean |
hasToResolveJar(org.apache.maven.artifact.Artifact art)
Checks if jar has to be resolved for the given artifact |
boolean |
isAddGroupIdToProjectName()
Getter for addGroupIdToProjectName . |
boolean |
isAddVersionToProjectName()
Getter for addVersionToProjectName . |
protected boolean |
isJavaProject()
|
protected boolean |
isPdeProject()
|
void |
setAddGroupIdToProjectName(boolean addGroupIdToProjectName)
Setter for addGroupIdToProjectName . |
void |
setAdditionalBuildcommands(java.util.List additionalBuildcommands)
Setter for additionalBuildcommands . |
void |
setAdditionalProjectnatures(java.util.List additionalProjectnatures)
Setter for additionalProjectnatures . |
void |
setAddVersionToProjectName(boolean addVersionToProjectName)
Setter for addVersionToProjectName . |
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 |
setProjectNameTemplate(java.lang.String projectNameTemplate)
Setter for projectNameTemplate . |
void |
setProjectnatures(java.util.List projectnatures)
Setter for projectnatures . |
boolean |
setup()
Hook for preparation steps before the actual plugin execution. |
protected void |
setupExtras()
Extension point for subclasses. |
void |
setUseProjectReferences(boolean useProjectReferences)
Setter for useProjectReferences . |
void |
setWtpversion(java.lang.String wtpversion)
Setter for wtpversion . |
protected boolean |
useProjectReference(org.apache.maven.artifact.Artifact art)
Checks if a projects reference has to be used for the given artifact |
protected void |
validateExtras()
Extension point for subclasses. |
void |
writeConfiguration(IdeDependency[] deps)
Main plugin method where dependencies should be processed in order to generate IDE configuration files. |
protected void |
writeConfigurationExtras(EclipseWriterConfig config)
Write any extra configuration information for the Eclipse project. |
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 |
protected static final java.lang.String BUILDER_WST_VALIDATION
protected static final java.lang.String COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER
protected static final java.lang.String ASPECTJ_RT_CONTAINER
protected static final java.lang.String REQUIRED_PLUGINS_CONTAINER
public static final java.lang.String[] WTP_SUPPORTED_VERSIONS
protected java.io.File workspace
protected boolean limitProjectReferencesToWorkspace
Constructor Detail |
public EclipsePlugin()
Method Detail |
protected final boolean isJavaProject()
protected final boolean isPdeProject()
public final java.util.List getBuildcommands()
buildcommands
.
public final void setBuildcommands(java.util.List buildcommands)
buildcommands
.
buildcommands
- The buildcommands to set.public final java.io.File getBuildOutputDirectory()
buildOutputDirectory
.
public final void setBuildOutputDirectory(java.io.File buildOutputDirectory)
buildOutputDirectory
.
buildOutputDirectory
- The buildOutputDirectory to set.public final java.util.List getClasspathContainers()
classpathContainers
.
public final void setClasspathContainers(java.util.List classpathContainers)
classpathContainers
.
classpathContainers
- The classpathContainers to set.public final java.io.File getEclipseProjectDir()
eclipseProjectDir
.
public final void setEclipseProjectDir(java.io.File eclipseProjectDir)
eclipseProjectDir
.
eclipseProjectDir
- The eclipseProjectDir to set.public final java.util.List getProjectnatures()
projectnatures
.
public final void setProjectnatures(java.util.List projectnatures)
projectnatures
.
projectnatures
- The projectnatures to set.public final boolean getUseProjectReferences()
useProjectReferences
.
getUseProjectReferences
in class AbstractIdeSupportMojo
public final void setUseProjectReferences(boolean useProjectReferences)
useProjectReferences
.
useProjectReferences
- The useProjectReferences to set.public final java.lang.String getWtpversion()
wtpversion
.
public final void setWtpversion(java.lang.String wtpversion)
wtpversion
.
wtpversion
- The wtpversion to set.public final java.util.List getAdditionalBuildcommands()
additionalBuildcommands
.
public final void setAdditionalBuildcommands(java.util.List additionalBuildcommands)
additionalBuildcommands
.
additionalBuildcommands
- The additionalBuildcommands to set.public final java.util.List getAdditionalProjectnatures()
additionalProjectnatures
.
public final void setAdditionalProjectnatures(java.util.List additionalProjectnatures)
additionalProjectnatures
.
additionalProjectnatures
- The additionalProjectnatures to set.public final boolean isAddVersionToProjectName()
addVersionToProjectName
.
public final void setAddVersionToProjectName(boolean addVersionToProjectName)
addVersionToProjectName
.
public final boolean isAddGroupIdToProjectName()
addGroupIdToProjectName
.
public final void setAddGroupIdToProjectName(boolean addGroupIdToProjectName)
addGroupIdToProjectName
.
public final java.lang.String getProjectNameTemplate()
projectNameTemplate
public final void setProjectNameTemplate(java.lang.String projectNameTemplate)
projectNameTemplate
.
projectNameTemplate
- projectNameTemplatepublic final boolean setup() throws org.apache.maven.plugin.MojoExecutionException
AbstractIdeSupportMojo
setup
in class AbstractIdeSupportMojo
true
if execution should continue or false
if not.
org.apache.maven.plugin.MojoExecutionException
- generic mojo exceptionMojo.execute()
protected final void convertBuildCommandList(java.util.List commands)
commands
List to BuildCommand
s. The conversion happens
in situ.
commands
- a list of commands to convert into BuildCommand
protected void setupExtras() throws org.apache.maven.plugin.MojoExecutionException
Called during setup
.
org.apache.maven.plugin.MojoExecutionException
- mojo failures.protected void validateExtras() throws org.apache.maven.plugin.MojoExecutionException
Called during setup
and used to validate that the configuration is sane.
org.apache.maven.plugin.MojoExecutionException
- mojo failures.protected void checkDeprecationsExtras()
Check for any extra deprecations and log warnings. Called during setup
public final void writeConfiguration(IdeDependency[] deps) throws org.apache.maven.plugin.MojoExecutionException
AbstractIdeSupportMojo
writeConfiguration
in class AbstractIdeSupportMojo
deps
- list of IdeDependency
objects, with artifacts, sources and javadocs already resolved
org.apache.maven.plugin.MojoExecutionException
- generic mojo exceptionprotected final EclipseWriterConfig createEclipseWriterConfig(IdeDependency[] deps) throws org.apache.maven.plugin.MojoExecutionException
EclipseWriterConfig
for the specified dependencies.
deps
- the project dependencies
EclipseWriterConfig
org.apache.maven.plugin.MojoExecutionException
- mojo failures.protected void writeConfigurationExtras(EclipseWriterConfig config) throws org.apache.maven.plugin.MojoExecutionException
config
-
org.apache.maven.plugin.MojoExecutionException
protected void fillDefaultNatures(java.lang.String packaging)
Subclasses should call super and then calculate their own additions and insert them via
getProjectnatures().addAll()
.
packaging
- the pom's packagingprotected void fillDefaultClasspathContainers(java.lang.String packaging)
Subclasses should call super and then calculate their own additions and insert them via
getClasspathContainers().addAll()
.
packaging
- the pom's packagingprotected void fillDefaultBuilders(java.lang.String packaging)
Subclasses should call super and then calculate their own additions and insert them via
getBuildcommands().addAll()
.
packaging
- the pom's packagingpublic final EclipseSourceDir[] buildDirectoryList(org.apache.maven.project.MavenProject project, java.io.File basedir, java.io.File buildOutputDirectory) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public java.lang.String getProjectNameForArifact(org.apache.maven.artifact.Artifact artifact)
getProjectNameForArifact
in class AbstractIdeSupportMojo
artifact
- The artifact to find the eclipse name for.
protected final IdeDependency[] getWorkspaceArtefacts()
getWorkspaceArtefacts
in class AbstractIdeSupportMojo
public final WorkspaceConfiguration getWorkspaceConfiguration()
public final java.util.List getExcludes()
getExcludes
in class AbstractIdeSupportMojo
protected final boolean hasToResolveJar(org.apache.maven.artifact.Artifact art)
hasToResolveJar
in class AbstractIdeSupportMojo
art
- the artifact to check
protected final boolean useProjectReference(org.apache.maven.artifact.Artifact art)
useProjectReference
in class AbstractIdeSupportMojo
art
- the artifact to check
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |