Package org.apache.maven.plugin.idea
Class IdeaMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugin.idea.AbstractIdeaMojo
-
- org.apache.maven.plugin.idea.IdeaMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
public class IdeaMojo extends AbstractIdeaMojo
Goal for generating IDEA files from a POM. This plug-in provides the ability to generate project files (.ipr, .iml and .iws files) for IDEA.
-
-
Field Summary
Fields Modifier and Type Field Description private booleandependenciesAsLibrariesCauses the module libraries to use a short name for all dependencies.private java.lang.StringdeploymentDescriptorFileSpecify the location of the deployment descriptor file, if one is provided.private booleandownloadJavadocsEnables/disables the downloading of javadoc attachments.private booleandownloadSourcesEnables/disables the downloading of source attachments.private java.lang.StringexcludeA comma-separated list of directories that should be excluded.private booleanideaPluginTell IntelliJ IDEA that this module is an IntelliJ IDEA Plugin.private java.lang.StringideaVersionSpecify the version of IDEA to target.private java.lang.StringjavadocClassifierSets the classifier string attached to an artifact javadoc archive name.private java.lang.StringjdkLevelSpecify the version of the JDK to use for the project for the purpose of enabled assertions and Java 5.0 language features.private java.lang.StringjdkNameSpecify the name of the registered IDEA JDK to use for the project.private Library[]librariesAn optional set of Library objects that allow you to specify a comma separated list of source dirs, class dirs, or to indicate that the library should be excluded from the module.private booleanlinkModulesWhether to link the reactor projects as dependency modules or as libraries.private java.util.ListreactorProjectsThe reactor projects in a multi-module build.private java.lang.StringsourceClassifierSets the classifier string attached to an artifact source archive name.private booleanuseFullNamesWhether to use full artifact names when referencing libraries.private org.apache.maven.artifact.manager.WagonManagerwagonManagerprivate java.lang.StringwildcardResourcePatternsSpecify the resource pattern in wildcard format, for example "?*.xml;?*.properties".-
Fields inherited from class org.apache.maven.plugin.idea.AbstractIdeaMojo
artifactFactory, artifactMetadataSource, artifactResolver, executedProject, localRepo, log, overwrite
-
-
Constructor Summary
Constructors Constructor Description IdeaMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()private voidrewriteModule(java.util.Set macros)private voidrewriteProject(java.util.Set macros)private voidrewriteWorkspace()voidsetProject(org.apache.maven.project.MavenProject project)-
Methods inherited from class org.apache.maven.plugin.idea.AbstractIdeaMojo
convertDriveLetter, createElement, doDependencyResolution, findComponent, findElement, findElement, getLog, getPluginSetting, initParam, readXmlDocument, removeOldElements, toRelative, writeXmlDocument
-
-
-
-
Field Detail
-
reactorProjects
private java.util.List reactorProjects
The reactor projects in a multi-module build.
-
wagonManager
private org.apache.maven.artifact.manager.WagonManager wagonManager
-
linkModules
private boolean linkModules
Whether to link the reactor projects as dependency modules or as libraries.
-
deploymentDescriptorFile
private java.lang.String deploymentDescriptorFile
Specify the location of the deployment descriptor file, if one is provided.
-
useFullNames
private boolean useFullNames
Whether to use full artifact names when referencing libraries.
-
downloadSources
private boolean downloadSources
Enables/disables the downloading of source attachments.
-
downloadJavadocs
private boolean downloadJavadocs
Enables/disables the downloading of javadoc attachments.
-
sourceClassifier
private java.lang.String sourceClassifier
Sets the classifier string attached to an artifact source archive name.
-
javadocClassifier
private java.lang.String javadocClassifier
Sets the classifier string attached to an artifact javadoc archive name.
-
jdkName
private java.lang.String jdkName
Specify the name of the registered IDEA JDK to use for the project.
-
jdkLevel
private java.lang.String jdkLevel
Specify the version of the JDK to use for the project for the purpose of enabled assertions and Java 5.0 language features. The default value is the specification version of the executing JVM.
-
libraries
private Library[] libraries
An optional set of Library objects that allow you to specify a comma separated list of source dirs, class dirs, or to indicate that the library should be excluded from the module. For example:<libraries> <library> <name>webwork</name> <sources>file://$webwork$/src/java</sources> <!-- <classes>...</classes> <exclude>true</exclude> --> </library> </libraries>
-
exclude
private java.lang.String exclude
A comma-separated list of directories that should be excluded. These directories are in addition to those already excluded, such as target/classes. A common use of this is to exclude the entire target directory.
-
wildcardResourcePatterns
private java.lang.String wildcardResourcePatterns
Specify the resource pattern in wildcard format, for example "?*.xml;?*.properties". Currently supports 4.x and 5.x. Because IDEA doesn't distinguish between source and resources directories, this is needed. The default value corresponds to any file without a java extension. Please note that the default value includes package.html files as it's not possible to exclude those.
-
ideaVersion
private java.lang.String ideaVersion
Specify the version of IDEA to target. This is needed to identify the default formatting of project-jdk-name used by IDEA. Currently supports 4.x and 5.x. This will only be used when parameter jdkName is not set.
-
dependenciesAsLibraries
private boolean dependenciesAsLibraries
Causes the module libraries to use a short name for all dependencies. This is very convenient but has been reported to cause problems with IDEA.
-
ideaPlugin
private boolean ideaPlugin
Tell IntelliJ IDEA that this module is an IntelliJ IDEA Plugin.
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
rewriteModule
private void rewriteModule(java.util.Set macros) throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
rewriteProject
private void rewriteProject(java.util.Set macros) throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
rewriteWorkspace
private void rewriteWorkspace() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
setProject
public void setProject(org.apache.maven.project.MavenProject project)
-
-