org.apache.maven.plugin.eclipse
Class RadPlugin

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
              extended by org.apache.maven.plugin.eclipse.RadPlugin
All Implemented Interfaces:
ContextEnabled, Mojo, org.codehaus.plexus.logging.LogEnabled

@Mojo(name="rad")
@Execute(phase=GENERATE_RESOURCES)
public class RadPlugin
extends EclipsePlugin

Generates the rad-6 configuration files.

Author:
Richard van Nieuwenhoven (patch submission), jdcasey

Field Summary
 
Fields inherited from class org.apache.maven.plugin.eclipse.EclipsePlugin
ASPECTJ_FILE_PATTERN, ASPECTJ_RT_CONTAINER, BUILDER_WST_VALIDATION, classpathContainersLast, COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER, JAVA_FILE_PATTERN, jeeversion, limitProjectReferencesToWorkspace, testSourcesLast, workspace, 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
RadPlugin()
           
 
Method Summary
protected  void fillDefaultBuilders(String packaging)
          overwite the default builders with the builders required by RAD6.
protected  void fillDefaultNatures(String packaging)
          overwite the default natures with the natures required by RAD6.
 String getProjectNameForArifact(Artifact artifact)
          Find the name of the project as used in eclipse.
 String getWarContextRoot()
           
protected  boolean isAvailableAsAReactorProject(Artifact artifact)
          Utility method that locates a project producing the given artifact.
protected  void setupExtras()
          WARNING: The manifest resources added here will not have the benefit of the dependencies of the project, since that's not provided in the setup() apis...
 void setWarContextRoot(String warContextRoot)
           
protected  void writeConfigurationExtras(EclipseWriterConfig config)
          write all rad6 configuration files.
 
Methods inherited from class org.apache.maven.plugin.eclipse.EclipsePlugin
buildDirectoryList, checkDeprecationsExtras, convertBuildCommandList, createEclipseWriterConfig, fillDefaultClasspathContainers, getAdditionalBuildcommands, getAdditionalProjectnatures, getBuildcommands, getBuildOutputDirectory, getClasspathContainers, getEclipseProjectDir, getExcludes, getLinkedResources, getProjectNameTemplate, getProjectnatures, getUseProjectReferences, getWorkspaceArtefacts, getWorkspaceConfiguration, getWtpversion, hasToResolveJar, isAddGroupIdToProjectName, isAddVersionToProjectName, isJavaProject, setAddGroupIdToProjectName, setAdditionalBuildcommands, setAdditionalProjectnatures, setAddVersionToProjectName, setBuildcommands, setBuildOutputDirectory, setClasspathContainers, setEclipseProjectDir, setLinkedResources, setProjectNameTemplate, setProjectnatures, setup, setUseProjectReferences, setWtpversion, useProjectReference, validateExtras, writeConfiguration
 
Methods inherited from class org.apache.maven.plugin.ide.AbstractIdeSupportMojo
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, setResolveDependencies
 
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
 

Constructor Detail

RadPlugin

public RadPlugin()
Method Detail

getWarContextRoot

public String getWarContextRoot()
Returns:
Returns the warContextRoot.

setWarContextRoot

public void setWarContextRoot(String warContextRoot)
Parameters:
warContextRoot - The warContextRoot to set.

writeConfigurationExtras

protected void writeConfigurationExtras(EclipseWriterConfig config)
                                 throws MojoExecutionException
write all rad6 configuration files.
NOTE: This could change the config!

Overrides:
writeConfigurationExtras in class EclipsePlugin
Parameters:
deps - resolved dependencies to handle
Throws:
MojoExecutionException - if the config files could not be written.
See Also:
EclipsePlugin#writeConfiguration()

fillDefaultBuilders

protected void fillDefaultBuilders(String packaging)
overwite the default builders with the builders required by RAD6.

Overrides:
fillDefaultBuilders in class EclipsePlugin
Parameters:
packaging - packaging-type (jar,war,ejb,ear)

fillDefaultNatures

protected void fillDefaultNatures(String packaging)
overwite the default natures with the natures required by RAD6.

Overrides:
fillDefaultNatures in class EclipsePlugin
Parameters:
packaging - packaging-type (jar,war,ejb,ear)

isAvailableAsAReactorProject

protected boolean isAvailableAsAReactorProject(Artifact artifact)
Utility method that locates a project producing the given artifact.

Overrides:
isAvailableAsAReactorProject in class EclipsePlugin
Parameters:
artifact - the artifact a project should produce.
Returns:
true if the artifact is produced by a reactor projectart.

setupExtras

protected void setupExtras()
                    throws MojoExecutionException
WARNING: The manifest resources added here will not have the benefit of the dependencies of the project, since that's not provided in the setup() apis...

Overrides:
setupExtras in class EclipsePlugin
Throws:
MojoExecutionException - mojo failures.

getProjectNameForArifact

public String getProjectNameForArifact(Artifact artifact)
Find the name of the project as used in eclipse.

Overrides:
getProjectNameForArifact in class EclipsePlugin
Parameters:
artifact - The artifact to find the eclipse name for.
Returns:
The name os the eclipse project.


Copyright © 2002–2015 The Apache Software Foundation. All rights reserved.