Package org.apache.maven.plugin.idea
Class IdeaProjectMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugin.idea.AbstractIdeaMojo
-
- org.apache.maven.plugin.idea.IdeaProjectMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
public class IdeaProjectMojo extends AbstractIdeaMojo
Creates the project file (*.ipr) for IntelliJ IDEA.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringideaVersionSpecify the version of IDEA to target.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 java.util.Setmacrosprivate 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 IdeaProjectMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()Create IDEA (.ipr) project files.voidinitParam(org.apache.maven.project.MavenProject project, org.apache.maven.artifact.factory.ArtifactFactory artifactFactory, org.apache.maven.artifact.repository.ArtifactRepository localRepo, org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver, org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource, org.apache.maven.plugin.logging.Log log, boolean overwrite, java.lang.String jdkName, java.lang.String jdkLevel, java.lang.String wildcardResourcePatterns, java.lang.String ideaVersion, java.util.Set macros)voidrewriteProject()private voidsetJdkName(org.dom4j.Element content, java.lang.String jdkName)Sets the name of the JDK to use.private voidsetWildcardResourcePatterns(org.dom4j.Element content, java.lang.String wildcardResourcePatterns)Sets the wilcard resource patterns.-
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
-
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.
-
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.
-
macros
private java.util.Set macros
-
-
Method Detail
-
initParam
public void initParam(org.apache.maven.project.MavenProject project, org.apache.maven.artifact.factory.ArtifactFactory artifactFactory, org.apache.maven.artifact.repository.ArtifactRepository localRepo, org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver, org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource, org.apache.maven.plugin.logging.Log log, boolean overwrite, java.lang.String jdkName, java.lang.String jdkLevel, java.lang.String wildcardResourcePatterns, java.lang.String ideaVersion, java.util.Set macros)
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionExceptionCreate IDEA (.ipr) project files.- Throws:
org.apache.maven.plugin.MojoExecutionException
-
rewriteProject
public void rewriteProject() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
setJdkName
private void setJdkName(org.dom4j.Element content, java.lang.String jdkName)Sets the name of the JDK to use.- Parameters:
content- Xpp3Dom element.jdkName- Name of the JDK to use.
-
setWildcardResourcePatterns
private void setWildcardResourcePatterns(org.dom4j.Element content, java.lang.String wildcardResourcePatterns)Sets the wilcard resource patterns.- Parameters:
content- Xpp3Dom element.wildcardResourcePatterns- The wilcard resource patterns.
-
-