public class EclipsePlugin extends AbstractIdeSupportMojo
.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).| Modifier and Type | Field and Description |
|---|---|
private boolean |
addGroupIdToProjectName
If set to
true, the groupId of the artifact is appended to the name of the generated Eclipse
project. |
private java.util.List |
additionalBuildcommands
List of eclipse build commands to be added to the default ones.
|
private EclipseConfigFile[] |
additionalConfig
Allow to configure additional generic configuration files for eclipse that will be written out to disk when
running eclipse:eclipse.
|
private java.util.Map |
additionalProjectFacets
List of eclipse project facets to be added to the default ones.
|
private java.util.List |
additionalProjectnatures
List of eclipse project natures to be added to the default ones.
|
private boolean |
addVersionToProjectName
If set to
true, the version number of the artifact is appended to the name of the generated Eclipse
project. |
private boolean |
ajdt
Is it an AJDT project? If yes, the plugin adds the necessary natures and build commands to the .project file.
|
private java.lang.String |
ajdtVersion
The version of AJDT for which configuration files will be generated.
|
private static java.lang.String |
ASPECT_DIRECTORY |
private static java.lang.String |
ASPECT_LIBRARIES |
private static java.lang.String |
ASPECT_LIBRARY |
static java.lang.String |
ASPECTJ_FILE_PATTERN |
private static java.lang.String |
ASPECTJ_MAVEN_PLUGIN |
protected static java.lang.String |
ASPECTJ_RT_CONTAINER |
private java.util.List |
buildcommands
List of eclipse build commands.
|
private static java.lang.String |
BUILDER_AJDT_CORE_JAVA |
private static java.lang.String |
BUILDER_JDT_CORE_JAVA |
private static java.lang.String |
BUILDER_PDE_MANIFEST |
private static java.lang.String |
BUILDER_PDE_SCHEMA |
private static java.lang.String |
BUILDER_WST_COMPONENT_STRUCTURAL |
private static java.lang.String |
BUILDER_WST_COMPONENT_STRUCTURAL_DEPENDENCY_RESOLVER |
private static java.lang.String |
BUILDER_WST_FACET |
protected static java.lang.String |
BUILDER_WST_VALIDATION |
private java.io.File |
buildOutputDirectory
The default output directory
|
private java.util.List |
classpathContainers
List of container classpath entries.
|
protected boolean |
classpathContainersLast
Put classpath container entries last in eclipse classpath configuration.
|
protected static java.lang.String |
COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER |
private static java.lang.String |
DEFAULT_ASPECT_DIRECTORY |
private static java.lang.String |
DEFAULT_TEST_ASPECT_DIRECTORY |
private boolean |
eclipseDownloadSources
Deprecated.
use downloadSources
|
private java.io.File |
eclipseProjectDir
Eclipse workspace directory.
|
private java.util.List |
excludes
List of artifacts, represented as
groupId:artifactId, to exclude from the eclipse classpath,
being provided by some eclipse classPathContainer. |
private boolean |
isJavaProject
Not a plugin parameter.
|
static java.lang.String |
JAVA_FILE_PATTERN |
protected java.lang.String |
jeeversion
The plugin is often capable in predicting the required jee version based on the dependencies of the project.
|
protected boolean |
limitProjectReferencesToWorkspace
Limit the use of project references to the current workspace.
|
private java.util.List |
linkedResources
A list of links to local files in the system.
|
private org.codehaus.plexus.resource.ResourceManager |
locator
ResourceManager for getting additonalConfig files from resources
|
private java.io.File |
manifest
The relative path of the manifest file
|
private org.apache.maven.settings.MavenSettingsBuilder |
mavenSettingsBuilder
MavenSettingsBuilder for accessing settings.xml.
|
private static java.lang.String |
NATURE_AJDT_CORE_JAVA |
private static java.lang.String |
NATURE_JDT_CORE_JAVA |
private static java.lang.String |
NATURE_JEM_WORKBENCH_JAVA_EMF |
private static java.lang.String |
NATURE_PDE_PLUGIN |
private static java.lang.String |
NATURE_WST_FACET_CORE_NATURE |
private static java.lang.String |
NATURE_WST_MODULE_CORE_NATURE |
private static java.lang.String |
ORG_CODEHAUS_MOJO |
private boolean |
pde
Is it an PDE project? If yes, the plugin adds the necessary natures and build commands to the .project file.
|
private static java.lang.String |
POM_ELT_ARTIFACT_ID
Constant for 'artifactId' element in POM.xml.
|
private static java.lang.String |
POM_ELT_GROUP_ID
Constant for 'groupId' element in POM.xml.
|
private java.lang.String |
projectNameTemplate
Allows configuring the name of the eclipse projects.
|
private java.util.List |
projectnatures
List of eclipse project natures.
|
protected static java.lang.String |
REQUIRED_PLUGINS_CONTAINER |
private java.util.List |
sourceExcludes
List of exclusions to add to the source directories on the classpath.
|
private java.util.List |
sourceIncludes
List of inclusions to add to the source directories on the classpath.
|
private static java.lang.String |
TEST_ASPECT_DIRECTORY |
protected boolean |
testSourcesLast
Whether to place test resources after main resources.
|
private boolean |
useProjectReferences
When set to false, the plugin will not create sub-projects and instead reference those sub-projects using the
installed package in the local repository
|
private org.apache.maven.artifact.manager.WagonManager |
wagonManager
WagonManager for accessing internet resources.
|
private static java.lang.String |
WEAVE_DEPENDENCIES |
private static java.lang.String |
WEAVE_DEPENDENCY |
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.
|
private WorkspaceConfiguration |
workspaceConfiguration |
static java.lang.String[] |
WTP_SUPPORTED_VERSIONS |
private boolean |
wtpapplicationxml
Must the application files be written for ear projects in a separate directory.
|
private java.lang.String |
wtpContextName
JEE context name of the WTP module.
|
private java.lang.String |
wtpdefaultserver
What WTP defined server to use for deployment informations.
|
private boolean |
wtpmanifest
Must the manifest files be written for java projects so that that the jee classpath for wtp is correct.
|
private java.lang.String |
wtpversion
The version of WTP for which configuration files will be generated.
|
private float |
wtpVersionFloat
Parsed wtp version.
|
artifactCollector, artifactFactory, artifactMetadataSource, artifactResolver, downloadJavadocs, downloadSources, executedProject, forceRecheck, localRepository, logger, packaging, project, reactorProjects, remoteArtifactRepositories| Constructor and Description |
|---|
EclipsePlugin() |
| Modifier and Type | Method and Description |
|---|---|
private void |
assertNotEmpty(java.lang.String string,
java.lang.String elementName) |
private void |
buildAjdtWeaveDeps(IdeDependency[] deps) |
private void |
buildAspectjDeps(IdeDependency[] deps) |
EclipseSourceDir[] |
buildDirectoryList(org.apache.maven.project.MavenProject project,
java.io.File basedir,
java.io.File buildOutputDirectory) |
private void |
checkDeprecations() |
protected void |
checkDeprecationsExtras()
Extension point for subclasses.
|
private void |
collectWarContextRootsFromReactorEarConfiguration(EclipseWriterConfig config)
If this is a war module peek into the reactor an search for an ear module that defines the context root of this
module.
|
protected void |
convertBuildCommandList(java.util.List commands)
Convert any Strings in the
commands List to BuildCommands. |
protected EclipseWriterConfig |
createEclipseWriterConfig(IdeDependency[] deps)
Create the
EclipseWriterConfig for the specified dependencies. |
private boolean |
enableAjdt(org.apache.maven.project.MavenProject project) |
private void |
extractAspectDirs(java.util.Set directories,
org.apache.maven.project.MavenProject project,
java.io.File basedir,
java.io.File projectBaseDir,
java.lang.String testOutput) |
(package private) void |
extractResourceDirs(java.util.Set directories,
java.util.List resources,
java.io.File basedir,
java.io.File workspaceProjectBaseDir,
boolean test,
java.lang.String output) |
private void |
extractSourceDirs(java.util.Set directories,
java.util.List sourceRoots,
java.io.File basedir,
java.io.File projectBaseDir,
boolean test,
java.lang.String output) |
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.
|
private java.lang.Object |
get(java.util.Set set,
java.lang.Object o)
java.util.Set doesn't have a get() method that returns the matching object.
|
java.util.List |
getAdditionalBuildcommands()
Getter for
additionalBuildcommands. |
java.util.List |
getAdditionalProjectnatures()
Getter for
additionalProjectnatures. |
private org.codehaus.plexus.util.xml.Xpp3Dom |
getAspectjConfiguration(org.apache.maven.project.MavenProject project) |
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.util.List |
getLinkedResources() |
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 |
private java.lang.String |
getProjectNameTemplateForMavenProject(org.apache.maven.project.MavenProject mavenProject) |
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 |
isAvailableAsAReactorProject(org.apache.maven.artifact.Artifact artifact)
Utility method that locates a project producing the given artifact
and verifies if it's a valid Eclipse project.
|
private boolean |
isAvailableAsAWorkspaceProject(org.apache.maven.artifact.Artifact artifact)
Utility method that locates a project in the workspace for the given artifact.
|
protected boolean |
isJavaProject() |
protected boolean |
isPdeProject() |
private void |
locateWorkspace()
If workspace is not defined, then attempt to locate it by checking up the directory hierarchy.
|
private void |
parseConfigurationOptions() |
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 |
setLinkedResources(java.util.List linkedResources) |
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
|
private boolean |
validate() |
protected void |
validateExtras()
Extension point for subclasses.
|
private void |
verifyClasspathContainerListIsComplete() |
private void |
writeAdditionalConfig() |
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.
|
doDependencyResolution, enableLogging, execute, getArtifactFactory, getArtifactMetadataSource, getArtifactResolver, getDownloadJavadocs, getDownloadSources, getExecutedProject, getLocalRepository, getProject, getReactorProject, getReactorProjects, getRemoteArtifactRepositories, isMavenVersion, isResolveDependencies, setArtifactFactory, setArtifactMetadataSource, setArtifactResolver, setDownloadJavadocs, setDownloadSources, setExecutedProject, setLocalRepository, setProject, setReactorProjects, setRemoteArtifactRepositories, setResolveDependenciesprivate static final java.lang.String WEAVE_DEPENDENCY
private static final java.lang.String WEAVE_DEPENDENCIES
private static final java.lang.String ASPECT_LIBRARY
private static final java.lang.String ASPECT_LIBRARIES
private static final java.lang.String ASPECT_DIRECTORY
private static final java.lang.String TEST_ASPECT_DIRECTORY
private static final java.lang.String ASPECTJ_MAVEN_PLUGIN
private static final java.lang.String ORG_CODEHAUS_MOJO
private static final java.lang.String DEFAULT_TEST_ASPECT_DIRECTORY
private static final java.lang.String DEFAULT_ASPECT_DIRECTORY
private static final java.lang.String NATURE_WST_FACET_CORE_NATURE
private static final java.lang.String BUILDER_WST_COMPONENT_STRUCTURAL_DEPENDENCY_RESOLVER
protected static final java.lang.String BUILDER_WST_VALIDATION
private static final java.lang.String BUILDER_JDT_CORE_JAVA
private static final java.lang.String BUILDER_WST_COMPONENT_STRUCTURAL
private static final java.lang.String BUILDER_WST_FACET
private static final java.lang.String BUILDER_PDE_MANIFEST
private static final java.lang.String BUILDER_PDE_SCHEMA
private static final java.lang.String BUILDER_AJDT_CORE_JAVA
private static final java.lang.String NATURE_WST_MODULE_CORE_NATURE
private static final java.lang.String NATURE_JDT_CORE_JAVA
private static final java.lang.String NATURE_JEM_WORKBENCH_JAVA_EMF
private static final java.lang.String NATURE_PDE_PLUGIN
private static final java.lang.String NATURE_AJDT_CORE_JAVA
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
public static final java.lang.String ASPECTJ_FILE_PATTERN
public static final java.lang.String JAVA_FILE_PATTERN
private static final java.lang.String POM_ELT_ARTIFACT_ID
private static final java.lang.String POM_ELT_GROUP_ID
private java.util.List projectnatures
org.eclipse.jdt.core.javanature nature plus the
needed WTP natures are added. Natures added using this property replace the default list.
<projectnatures>
<projectnature>org.eclipse.jdt.core.javanature</projectnature>
<projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>
</projectnatures>
private java.util.List excludes
groupId:artifactId, to exclude from the eclipse classpath,
being provided by some eclipse classPathContainer.http://jira.codehaus.org/browse/MECLIPSE-79private java.util.List additionalProjectnatures
<additionalProjectnatures>
<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
</additionalProjectnatures>
private java.util.Map additionalProjectFacets
<additionalProjectFacets>
<jst.jsf>1.1<jst.jsf/>
</additionalProjectFacets>
private java.util.List buildcommands
org.eclipse.jdt.core.javabuilder builder plus the
needed WTP builders are added. If you specify any configuration for this parameter, only those buildcommands
specified will be used; the defaults won't be added. Use the additionalBuildCommands parameter for
that. Configuration example: Old style:
<buildcommands>
<buildcommand>org.eclipse.wst.common.modulecore.ComponentStructuralBuilder</buildcommand>
<buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
<buildcommand>org.eclipse.wst.common.modulecore.ComponentStructuralBuilderDependencyResolver</buildcommand>
</buildcommands>
For new style, see additionalBuildCommands.private java.util.List additionalBuildcommands
<additionalBuildcommands>
<buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
</additionalBuildcommands>
New style:
<additionalBuildcommands>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>auto,full,incremental,</triggers>
<arguments>
<LaunchConfigHandle><project>./externalToolBuilders/MavenBuilder.launch</LaunchConfighandle>
</arguments>
</buildCommand>
</additionalBuildcommands>
Note the difference between buildcommand and
buildCommand. You can mix and match old and new-style configuration entries.private java.util.List classpathContainers
org.eclipse.jdt.launching.JRE_CONTAINER
classpath container is added. Configuration example:
<classpathContainers>
<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
<classpathContainer>org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.5</classpathContainer>
<classpathContainer>org.eclipse.jst.j2ee.internal.web.container/artifact</classpathContainer>
</classpathContainers>
private boolean eclipseDownloadSources
private java.io.File eclipseProjectDir
private boolean useProjectReferences
private java.io.File buildOutputDirectory
private java.lang.String wtpversion
private java.lang.String wtpContextName
private boolean pde
private boolean ajdt
private java.io.File manifest
private EclipseConfigFile[] additionalConfig
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<additionalConfig>
<file>
<name>.checkstyle</name>
<content>
<![CDATA[<fileset-config file-format-version="1.2.0" simple-config="true">
<fileset name="all" enabled="true" check-config-name="acme corporate style" local="false">
<file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
<filter name="NonSrcDirs" enabled="true"/>
</fileset-config>]]>
</content>
</file>
</additionalConfig>
</configuration>
</plugin>
Instead of the content you can also define (from version 2.5) an url to download the file :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<additionalConfig>
<file>
<name>.checkstyle</name>
<url>http://some.place.org/path/to/file</url>
</file>
</additionalConfig>
</configuration>
or a location :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<additionalConfig>
<file>
<name>.checkstyle</name>
<location>/checkstyle-config.xml</location>
</file>
</additionalConfig>
</configuration>
<dependencies>
<!-- The file defined in the location is stored in this dependency -->
<dependency>
<groupId>eclipsetest</groupId>
<artifactId>checkstyle-config</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</plugin>
private boolean addVersionToProjectName
true, the version number of the artifact is appended to the name of the generated Eclipse
project. See projectNameTemplate for other options.private boolean addGroupIdToProjectName
true, the groupId of the artifact is appended to the name of the generated Eclipse
project. See projectNameTemplate for other options.private java.lang.String projectNameTemplate
[groupId], [artifactId] and [version]
variables. eg. [groupId].[artifactId]-[version]private float wtpVersionFloat
private boolean isJavaProject
private boolean wtpmanifest
private boolean wtpapplicationxml
private java.lang.String wtpdefaultserver
private WorkspaceConfiguration workspaceConfiguration
private org.codehaus.plexus.resource.ResourceManager locator
private org.apache.maven.artifact.manager.WagonManager wagonManager
private org.apache.maven.settings.MavenSettingsBuilder mavenSettingsBuilder
protected java.io.File workspace
protected boolean limitProjectReferencesToWorkspace
private java.lang.String ajdtVersion
private java.util.List sourceExcludes
private java.util.List sourceIncludes
Java projects will always include "**/*.java"
Ajdt projects will always include "**/*.aj"
[MECLIPSE-104]
private java.util.List linkedResources
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<linkedResources>
<linkedResource>
<name>src/test/resources/oracle-ds.xml</name>
<type>1</type>
<location>C://jboss/server/default/deploy/oracle-ds.xml</location>
</linkedResource>
</linkedResources>
</configuration>
</plugin>
will produce in the .project :
<linkedResources>
<link>
<name>src/test/resources/oracle-ds.xml</name>
<type>1</type>
<location>C://jboss/server/default/deploy/oracle-ds.xml</location>
</link>
</linkedResources>
protected boolean classpathContainersLast
protected boolean testSourcesLast
protected java.lang.String jeeversion
jeeversion options the version will be locked.
| jeeversion | EJB version | Servlet version | JSP version |
|---|---|---|---|
| 6.0 | 3.1 | 3.0 | 2.2 |
| 5.0 | 3.0 | 2.5 | 2.1 |
| 1.4 | 2.1 | 2.4 | 2.0 |
| 1.3 | 2.0 | 2.3 | 1.2 |
| 1.2 | 1.1 | 2.2 | 1.1 |
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 AbstractIdeSupportMojopublic 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()
projectNameTemplatepublic final void setProjectNameTemplate(java.lang.String projectNameTemplate)
projectNameTemplate.projectNameTemplate - projectNameTemplatepublic java.util.List getLinkedResources()
public void setLinkedResources(java.util.List linkedResources)
linkedResources - the linkedResources to setpublic final boolean setup()
throws org.apache.maven.plugin.MojoExecutionException
AbstractIdeSupportMojosetup in class AbstractIdeSupportMojotrue 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 BuildCommands. The conversion happens in
situ.commands - a list of commands to convert into BuildCommandprivate void parseConfigurationOptions()
protected void setupExtras()
throws org.apache.maven.plugin.MojoExecutionException
Called during setup.
org.apache.maven.plugin.MojoExecutionException - mojo failures.private void verifyClasspathContainerListIsComplete()
private boolean validate()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected 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.private void checkDeprecations()
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
AbstractIdeSupportMojowriteConfiguration in class AbstractIdeSupportMojodeps - list of IdeDependency objects, with artifacts, sources and javadocs already resolvedorg.apache.maven.plugin.MojoExecutionException - generic mojo exceptionprivate void writeAdditionalConfig()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected final EclipseWriterConfig createEclipseWriterConfig(IdeDependency[] deps) throws org.apache.maven.plugin.MojoExecutionException
EclipseWriterConfig for the specified dependencies.deps - the project dependenciesEclipseWriterConfigorg.apache.maven.plugin.MojoExecutionException - mojo failures.private void collectWarContextRootsFromReactorEarConfiguration(EclipseWriterConfig config)
config - config to save the context root.protected void writeConfigurationExtras(EclipseWriterConfig config) throws org.apache.maven.plugin.MojoExecutionException
config - org.apache.maven.plugin.MojoExecutionExceptionprivate void assertNotEmpty(java.lang.String string,
java.lang.String elementName)
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected 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.MojoExecutionExceptionprivate void extractSourceDirs(java.util.Set directories,
java.util.List sourceRoots,
java.io.File basedir,
java.io.File projectBaseDir,
boolean test,
java.lang.String output)
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionfinal void extractResourceDirs(java.util.Set directories,
java.util.List resources,
java.io.File basedir,
java.io.File workspaceProjectBaseDir,
boolean test,
java.lang.String output)
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprivate java.lang.Object get(java.util.Set set,
java.lang.Object o)
set - the set to iterate over looking for the specified objecto - the object to locate in the setprivate void extractAspectDirs(java.util.Set directories,
org.apache.maven.project.MavenProject project,
java.io.File basedir,
java.io.File projectBaseDir,
java.lang.String testOutput)
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprivate boolean enableAjdt(org.apache.maven.project.MavenProject project)
private org.codehaus.plexus.util.xml.Xpp3Dom getAspectjConfiguration(org.apache.maven.project.MavenProject project)
private void buildAspectjDeps(IdeDependency[] deps) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprivate void buildAjdtWeaveDeps(IdeDependency[] deps) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic java.lang.String getProjectNameForArifact(org.apache.maven.artifact.Artifact artifact)
getProjectNameForArifact in class AbstractIdeSupportMojoartifact - The artifact to find the eclipse name for.private java.lang.String getProjectNameTemplateForMavenProject(org.apache.maven.project.MavenProject mavenProject)
mavenProject - the project to get the projectNameTemplate configuration fromprotected final IdeDependency[] getWorkspaceArtefacts()
getWorkspaceArtefacts in class AbstractIdeSupportMojopublic final WorkspaceConfiguration getWorkspaceConfiguration()
private void locateWorkspace()
public final java.util.List getExcludes()
getExcludes in class AbstractIdeSupportMojoprotected boolean isAvailableAsAReactorProject(org.apache.maven.artifact.Artifact artifact)
isAvailableAsAReactorProject in class AbstractIdeSupportMojoartifact - the artifact a project should produce.true if the artifact is produced by a reactor projectart.private boolean isAvailableAsAWorkspaceProject(org.apache.maven.artifact.Artifact artifact)
artifact - the artifact a project should produce.true if the artifact is produced by a reactor projectart.protected final boolean hasToResolveJar(org.apache.maven.artifact.Artifact art)
hasToResolveJar in class AbstractIdeSupportMojoart - the artifact to checkprotected final boolean useProjectReference(org.apache.maven.artifact.Artifact art)
useProjectReference in class AbstractIdeSupportMojoart - the artifact to check