|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.maven.plugin.ant.AntBuildWriterUtil
public class AntBuildWriterUtil
Utility class for the AntBuildWriter class.
| Constructor Summary | |
|---|---|
AntBuildWriterUtil()
|
|
| Method Summary | |
|---|---|
static void |
addWrapAttribute(org.codehaus.plexus.util.xml.XMLWriter writer,
java.lang.String tag,
java.lang.String name,
java.lang.String value,
int indent)
Convenience method to wrap long element tags for a given attribute. |
static java.lang.String |
getMavenCompilerPluginBasicOption(org.apache.maven.project.MavenProject project,
java.lang.String optionName,
java.lang.String defaultValue)
Return the optionName value defined in a project for the "maven-compiler-plugin" plugin. |
static java.util.Map |
getMavenCompilerPluginOption(org.apache.maven.project.MavenProject project,
java.lang.String optionName,
java.lang.String defaultValue)
Return the map of optionName value defined in a project for the "maven-compiler-plugin" plugin. |
static java.util.Map[] |
getMavenCompilerPluginOptions(org.apache.maven.project.MavenProject project,
java.lang.String optionName,
java.lang.String defaultValue)
Return an array of map of optionName value defined in a project for the "maven-compiler-plugin" plugin. |
static java.lang.String |
getMavenEarPluginBasicOption(org.apache.maven.project.MavenProject project,
java.lang.String optionName,
java.lang.String defaultValue)
Return the optionName value defined in a project for the "maven-ear-plugin" plugin. |
static java.lang.String |
getMavenJarPluginBasicOption(org.apache.maven.project.MavenProject project,
java.lang.String optionName,
java.lang.String defaultValue)
Return the optionName value defined in a project for the "maven-jar-plugin" plugin. |
static java.lang.String |
getMavenJavadocPluginBasicOption(org.apache.maven.project.MavenProject project,
java.lang.String optionName,
java.lang.String defaultValue)
Return the optionName value defined in a project for the "maven-javadoc-plugin" plugin. |
static java.util.Map |
getMavenJavadocPluginOption(org.apache.maven.project.MavenProject project,
java.lang.String optionName,
java.lang.String defaultValue)
Return a map of optionName value defined in a project for the "maven-javadoc-plugin" plugin. |
static java.util.Map[] |
getMavenJavadocPluginOptions(org.apache.maven.project.MavenProject project,
java.lang.String optionName,
java.lang.String defaultValue)
Return an array of map of optionName value defined in a project for the "maven-javadoc-plugin" plugin. |
static java.lang.String |
getMavenWarPluginBasicOption(org.apache.maven.project.MavenProject project,
java.lang.String optionName,
java.lang.String defaultValue)
Return the optionName value defined in a project for the "maven-war-plugin" plugin. |
static boolean |
isEarPackaging(org.apache.maven.project.MavenProject mavenProject)
|
static boolean |
isJarPackaging(org.apache.maven.project.MavenProject mavenProject)
|
static boolean |
isPomPackaging(org.apache.maven.project.MavenProject mavenProject)
|
static boolean |
isWarPackaging(org.apache.maven.project.MavenProject mavenProject)
|
static java.util.List |
removeEmptyCompileSourceRoots(java.util.List compileSourceRoots)
|
static void |
writeAntTask(org.codehaus.plexus.util.xml.XMLWriter writer,
org.apache.maven.project.MavenProject project,
java.lang.String moduleSubPath,
java.lang.String tasks)
Convenience method to write XML ant task |
static void |
writeAntVersionHeader(org.codehaus.plexus.util.xml.XMLWriter writer)
Write comment for the Ant supported version |
static void |
writeComment(org.codehaus.plexus.util.xml.XMLWriter writer,
java.lang.String comment)
Convenience method to write XML comment line. |
static void |
writeCommentLineBreak(org.codehaus.plexus.util.xml.XMLWriter writer)
Convenience method to write XML comment line break. |
static void |
writeCommentText(org.codehaus.plexus.util.xml.XMLWriter writer,
java.lang.String comment,
int indent)
Convenience method to write XML comment between two comment line break. |
static void |
writeEarTask(org.codehaus.plexus.util.xml.XMLWriter writer,
org.apache.maven.project.MavenProject project)
Convenience method to write XML Ant ear task |
static void |
writeHeader(org.codehaus.plexus.util.xml.XMLWriter writer)
Write comments in the Ant build file header |
static void |
writeIncludesExcludes(org.codehaus.plexus.util.xml.XMLWriter writer,
java.util.List includes,
java.util.List excludes)
Convenience method to write <include/> and <exclude/> |
static void |
writeJarTask(org.codehaus.plexus.util.xml.XMLWriter writer,
org.apache.maven.project.MavenProject project)
Convenience method to write XML Ant jar task |
static void |
writeJavadocTask(org.codehaus.plexus.util.xml.XMLWriter writer,
org.apache.maven.project.MavenProject project,
ArtifactResolverWrapper wrapper)
Convenience method to write XML Ant javadoc task |
static void |
writeLineBreak(org.codehaus.plexus.util.xml.XMLWriter writer)
Convenience method to write one CRLF |
static void |
writeLineBreak(org.codehaus.plexus.util.xml.XMLWriter writer,
int repeat)
Convenience method to repeat CRLF |
static void |
writeLineBreak(org.codehaus.plexus.util.xml.XMLWriter writer,
int repeat,
int indent)
Convenience method to repeat CRLF and to indent the writer |
static void |
writeWarTask(org.codehaus.plexus.util.xml.XMLWriter writer,
org.apache.maven.project.MavenProject project,
java.io.File localRepository)
Convenience method to write XML Ant war task |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AntBuildWriterUtil()
| Method Detail |
|---|
public static java.util.List removeEmptyCompileSourceRoots(java.util.List compileSourceRoots)
compileSourceRoots -
public static void writeIncludesExcludes(org.codehaus.plexus.util.xml.XMLWriter writer,
java.util.List includes,
java.util.List excludes)
<include/> and <exclude/>
writer - not nullincludes - excludes - public static void writeHeader(org.codehaus.plexus.util.xml.XMLWriter writer)
writer - public static void writeAntVersionHeader(org.codehaus.plexus.util.xml.XMLWriter writer)
writer - public static void writeLineBreak(org.codehaus.plexus.util.xml.XMLWriter writer)
CRLF
writer - not null writer
public static void writeLineBreak(org.codehaus.plexus.util.xml.XMLWriter writer,
int repeat)
CRLF
writer - not nullrepeat -
public static void writeLineBreak(org.codehaus.plexus.util.xml.XMLWriter writer,
int repeat,
int indent)
CRLF and to indent the writer
writer - not nullrepeat - indent - postive numberpublic static void writeCommentLineBreak(org.codehaus.plexus.util.xml.XMLWriter writer)
writer - not null
public static void writeComment(org.codehaus.plexus.util.xml.XMLWriter writer,
java.lang.String comment)
comment is splitted to have a size of 80.
writer - not nullcomment -
public static void writeCommentText(org.codehaus.plexus.util.xml.XMLWriter writer,
java.lang.String comment,
int indent)
writer - not nullcomment - indent -
public static void writeAntTask(org.codehaus.plexus.util.xml.XMLWriter writer,
org.apache.maven.project.MavenProject project,
java.lang.String moduleSubPath,
java.lang.String tasks)
writer - not nullproject - not nullmoduleSubPath - not nulltasks - not null
public static void writeJavadocTask(org.codehaus.plexus.util.xml.XMLWriter writer,
org.apache.maven.project.MavenProject project,
ArtifactResolverWrapper wrapper)
throws java.io.IOException
writer - not nullproject - not nullwrapper - not null
java.io.IOException - if any
public static void writeJarTask(org.codehaus.plexus.util.xml.XMLWriter writer,
org.apache.maven.project.MavenProject project)
throws java.io.IOException
writer - not nullproject - not null
java.io.IOException - if any
public static void writeEarTask(org.codehaus.plexus.util.xml.XMLWriter writer,
org.apache.maven.project.MavenProject project)
throws java.io.IOException
writer - not nullproject - not null
java.io.IOException - if any
public static void writeWarTask(org.codehaus.plexus.util.xml.XMLWriter writer,
org.apache.maven.project.MavenProject project,
java.io.File localRepository)
throws java.io.IOException
writer - not nullproject - not nulllocalRepository - not null
java.io.IOException - if any
public static void addWrapAttribute(org.codehaus.plexus.util.xml.XMLWriter writer,
java.lang.String tag,
java.lang.String name,
java.lang.String value,
int indent)
writer - not nulltag - not nullname - not nullvalue - not nullindent - positive valuepublic static boolean isPomPackaging(org.apache.maven.project.MavenProject mavenProject)
mavenProject - not null
pompublic static boolean isJarPackaging(org.apache.maven.project.MavenProject mavenProject)
mavenProject - not null
jar or maven-pluginpublic static boolean isEarPackaging(org.apache.maven.project.MavenProject mavenProject)
mavenProject -
earpublic static boolean isWarPackaging(org.apache.maven.project.MavenProject mavenProject)
mavenProject - not null
war
public static java.lang.String getMavenCompilerPluginBasicOption(org.apache.maven.project.MavenProject project,
java.lang.String optionName,
java.lang.String defaultValue)
throws java.io.IOException
optionName value defined in a project for the "maven-compiler-plugin" plugin.
project - not nulloptionName - the option name wanteddefaultValue - a default value
java.io.IOException - if any
public static java.util.Map getMavenCompilerPluginOption(org.apache.maven.project.MavenProject project,
java.lang.String optionName,
java.lang.String defaultValue)
throws java.io.IOException
optionName value defined in a project for the "maven-compiler-plugin" plugin.
project - not nulloptionName - the option name wanteddefaultValue - a default value
java.io.IOException - if any
public static java.util.Map[] getMavenCompilerPluginOptions(org.apache.maven.project.MavenProject project,
java.lang.String optionName,
java.lang.String defaultValue)
throws java.io.IOException
optionName value defined in a project for the "maven-compiler-plugin" plugin.
project - not nulloptionName - the option name wanteddefaultValue - a default value
java.io.IOException - if any
public static java.lang.String getMavenJavadocPluginBasicOption(org.apache.maven.project.MavenProject project,
java.lang.String optionName,
java.lang.String defaultValue)
throws java.io.IOException
optionName value defined in a project for the "maven-javadoc-plugin" plugin.
project - not nulloptionName - the option name wanteddefaultValue - a default value
java.io.IOException - if any
public static java.util.Map getMavenJavadocPluginOption(org.apache.maven.project.MavenProject project,
java.lang.String optionName,
java.lang.String defaultValue)
throws java.io.IOException
optionName value defined in a project for the "maven-javadoc-plugin" plugin.
project - not nulloptionName - the option name wanteddefaultValue - a default value
java.io.IOException - if any
public static java.util.Map[] getMavenJavadocPluginOptions(org.apache.maven.project.MavenProject project,
java.lang.String optionName,
java.lang.String defaultValue)
throws java.io.IOException
optionName value defined in a project for the "maven-javadoc-plugin" plugin.
project - not nulloptionName - the option name wanteddefaultValue - a default value
java.io.IOException - if any
public static java.lang.String getMavenJarPluginBasicOption(org.apache.maven.project.MavenProject project,
java.lang.String optionName,
java.lang.String defaultValue)
throws java.io.IOException
optionName value defined in a project for the "maven-jar-plugin" plugin.
project - not nulloptionName - the option name wanteddefaultValue - a default value
java.io.IOException - if any
public static java.lang.String getMavenEarPluginBasicOption(org.apache.maven.project.MavenProject project,
java.lang.String optionName,
java.lang.String defaultValue)
throws java.io.IOException
optionName value defined in a project for the "maven-ear-plugin" plugin.
project - not nulloptionName - the option name wanteddefaultValue - a default value
java.io.IOException - if any
public static java.lang.String getMavenWarPluginBasicOption(org.apache.maven.project.MavenProject project,
java.lang.String optionName,
java.lang.String defaultValue)
throws java.io.IOException
optionName value defined in a project for the "maven-war-plugin" plugin.
project - not nulloptionName - the option name wanteddefaultValue - a default value
java.io.IOException - if any
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||