|
||||||||||
| 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
public class 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 String |
BUILDER_WST_VALIDATION
|
protected static String |
COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER
|
protected boolean |
limitProjectReferencesToWorkspace
Limit the use of project references to the current workspace. |
protected static String |
REQUIRED_PLUGINS_CONTAINER
|
protected String |
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 String[] |
WTP_SUPPORTED_VERSIONS
|
| Fields inherited from class org.apache.maven.plugin.ide.AbstractIdeSupportMojo |
|---|
artifactCollector, artifactFactory, artifactMetadataSource, artifactResolver, downloadJavadocs, downloadSources, executedProject, 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,
File basedir,
File buildOutputDirectory)
|
protected void |
checkExtraDeprecations()
|
protected void |
convertBuildCommandList(List commands)
|
protected EclipseWriterConfig |
createEclipseWriterConfig(IdeDependency[] deps)
|
protected IdeDependency[] |
doDependencyResolution()
Resolve project dependencies. |
protected void |
fillDefaultBuilders(String packaging)
|
protected void |
fillDefaultClasspathContainers(String packaging)
|
protected void |
fillDefaultNatures(String packaging)
|
List |
getAdditionalBuildcommands()
Getter for additionalBuildcommands. |
List |
getAdditionalProjectnatures()
Getter for additionalProjectnatures. |
List |
getBuildcommands()
Getter for buildcommands. |
File |
getBuildOutputDirectory()
Getter for buildOutputDirectory. |
List |
getClasspathContainers()
Getter for classpathContainers. |
File |
getEclipseProjectDir()
Getter for eclipseProjectDir. |
List |
getExcludes()
|
String |
getProjectNameForArifact(org.apache.maven.artifact.Artifact artifact)
Find the name of the project as used in eclipse. |
String |
getProjectNameTemplate()
|
List |
getProjectnatures()
Getter for projectnatures. |
boolean |
getUseProjectReferences()
Getter for useProjectReferences. |
protected IdeDependency[] |
getWorkspaceArtefacts()
|
WorkspaceConfiguration |
getWorkspaceConfiguration()
|
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(List additionalBuildcommands)
Setter for additionalBuildcommands. |
void |
setAdditionalProjectnatures(List additionalProjectnatures)
Setter for additionalProjectnatures. |
void |
setAddVersionToProjectName(boolean addVersionToProjectName)
Setter for addVersionToProjectName. |
void |
setBuildcommands(List buildcommands)
Setter for buildcommands. |
void |
setBuildOutputDirectory(File buildOutputDirectory)
Setter for buildOutputDirectory. |
void |
setClasspathContainers(List classpathContainers)
Setter for classpathContainers. |
void |
setEclipseProjectDir(File eclipseProjectDir)
Setter for eclipseProjectDir. |
void |
setProjectNameTemplate(String projectNameTemplate)
|
void |
setProjectnatures(List projectnatures)
Setter for projectnatures. |
boolean |
setup()
Hook for preparation steps before the actual plugin execution. |
protected void |
setupExtras()
|
void |
setUseProjectReferences(boolean useProjectReferences)
Setter for useProjectReferences. |
void |
setWtpversion(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()
|
protected void |
verifyClasspathContainerListIsComplete()
|
protected void |
writeAdditionalConfig()
|
void |
writeConfiguration(IdeDependency[] deps)
Main plugin method where dependencies should be processed in order to generate IDE configuration files. |
protected void |
writeExtraConfiguration(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 String BUILDER_WST_VALIDATION
protected static final String COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER
protected static final String REQUIRED_PLUGINS_CONTAINER
public static final String[] WTP_SUPPORTED_VERSIONS
protected String workspace
protected boolean limitProjectReferencesToWorkspace
| Constructor Detail |
|---|
public EclipsePlugin()
| Method Detail |
|---|
protected boolean isJavaProject()
protected boolean isPdeProject()
public List getBuildcommands()
buildcommands.
public void setBuildcommands(List buildcommands)
buildcommands.
buildcommands - The buildcommands to set.public File getBuildOutputDirectory()
buildOutputDirectory.
public void setBuildOutputDirectory(File buildOutputDirectory)
buildOutputDirectory.
buildOutputDirectory - The buildOutputDirectory to set.public List getClasspathContainers()
classpathContainers.
public void setClasspathContainers(List classpathContainers)
classpathContainers.
classpathContainers - The classpathContainers to set.public File getEclipseProjectDir()
eclipseProjectDir.
public void setEclipseProjectDir(File eclipseProjectDir)
eclipseProjectDir.
eclipseProjectDir - The eclipseProjectDir to set.public List getProjectnatures()
projectnatures.
public void setProjectnatures(List projectnatures)
projectnatures.
projectnatures - The projectnatures to set.public boolean getUseProjectReferences()
useProjectReferences.
getUseProjectReferences in class AbstractIdeSupportMojopublic void setUseProjectReferences(boolean useProjectReferences)
useProjectReferences.
useProjectReferences - The useProjectReferences to set.public String getWtpversion()
wtpversion.
public void setWtpversion(String wtpversion)
wtpversion.
wtpversion - The wtpversion to set.public List getAdditionalBuildcommands()
additionalBuildcommands.
public void setAdditionalBuildcommands(List additionalBuildcommands)
additionalBuildcommands.
additionalBuildcommands - The additionalBuildcommands to set.public List getAdditionalProjectnatures()
additionalProjectnatures.
public void setAdditionalProjectnatures(List additionalProjectnatures)
additionalProjectnatures.
additionalProjectnatures - The additionalProjectnatures to set.public boolean isAddVersionToProjectName()
addVersionToProjectName.
public void setAddVersionToProjectName(boolean addVersionToProjectName)
addVersionToProjectName.
public boolean isAddGroupIdToProjectName()
addGroupIdToProjectName.
public void setAddGroupIdToProjectName(boolean addGroupIdToProjectName)
addGroupIdToProjectName.
public String getProjectNameTemplate()
public void setProjectNameTemplate(String projectNameTemplate)
public boolean setup()
throws org.apache.maven.plugin.MojoExecutionException
AbstractIdeSupportMojo
setup in class AbstractIdeSupportMojotrue if execution should continue or false if not.
org.apache.maven.plugin.MojoExecutionException - generic mojo exceptionMojo.execute()protected void convertBuildCommandList(List commands)
protected void setupExtras()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void verifyClasspathContainerListIsComplete()
protected void validateExtras()
protected void checkExtraDeprecations()
public void writeConfiguration(IdeDependency[] deps)
throws org.apache.maven.plugin.MojoExecutionException
AbstractIdeSupportMojo
writeConfiguration in class AbstractIdeSupportMojodeps - list of IdeDependency objects, with artifacts, sources and javadocs already resolved
org.apache.maven.plugin.MojoExecutionException - generic mojo exception
protected void writeAdditionalConfig()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected EclipseWriterConfig createEclipseWriterConfig(IdeDependency[] deps)
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected void writeExtraConfiguration(EclipseWriterConfig config)
throws org.apache.maven.plugin.MojoExecutionException
config -
org.apache.maven.plugin.MojoExecutionExceptionprotected void fillDefaultNatures(String packaging)
protected void fillDefaultClasspathContainers(String packaging)
protected void fillDefaultBuilders(String packaging)
public EclipseSourceDir[] buildDirectoryList(org.apache.maven.project.MavenProject project,
File basedir,
File buildOutputDirectory)
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic String getProjectNameForArifact(org.apache.maven.artifact.Artifact artifact)
getProjectNameForArifact in class AbstractIdeSupportMojoartifact - The artifact to find the eclipse name for.
protected IdeDependency[] getWorkspaceArtefacts()
getWorkspaceArtefacts in class AbstractIdeSupportMojopublic WorkspaceConfiguration getWorkspaceConfiguration()
public List getExcludes()
getExcludes in class AbstractIdeSupportMojo
protected IdeDependency[] doDependencyResolution()
throws org.apache.maven.plugin.MojoExecutionException
AbstractIdeSupportMojo
doDependencyResolution in class AbstractIdeSupportMojoorg.apache.maven.plugin.MojoExecutionException - if dependencies can't be resolvedprotected boolean hasToResolveJar(org.apache.maven.artifact.Artifact art)
hasToResolveJar in class AbstractIdeSupportMojoart - the artifact to check
protected boolean useProjectReference(org.apache.maven.artifact.Artifact art)
useProjectReference in class AbstractIdeSupportMojoart - the artifact to check
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||