Coverage Report - org.apache.maven.plugin.eclipse.HelpMojo
 
Classes in this File Line Coverage Branch Coverage Complexity
HelpMojo
0%
0/595
0%
0/146
13.167
 
 1  
 package org.apache.maven.plugin.eclipse;
 2  
 
 3  
 import java.util.ArrayList;
 4  
 import java.util.Iterator;
 5  
 import java.util.List;
 6  
 
 7  
 import org.apache.maven.plugin.AbstractMojo;
 8  
 import org.apache.maven.plugin.MojoExecutionException;
 9  
 
 10  
 /**
 11  
  * Display help information on maven-eclipse-plugin.<br/> Call <pre>  mvn eclipse:help -Ddetail=true -Dgoal=&lt;goal-name&gt;</pre> to display parameter details.
 12  
  *
 13  
  * @version generated on Fri Jan 13 09:33:03 CST 2012
 14  
  * @author org.apache.maven.tools.plugin.generator.PluginHelpGenerator (version 2.4.3)
 15  
  * @goal help
 16  
  * @requiresProject false
 17  
  */
 18  0
 public class HelpMojo
 19  
     extends AbstractMojo
 20  
 {
 21  
     /**
 22  
      * If <code>true</code>, display all settable properties for each goal.
 23  
      * 
 24  
      * @parameter expression="${detail}" default-value="false"
 25  
      */
 26  
     private boolean detail;
 27  
 
 28  
     /**
 29  
      * The name of the goal for which to show help. If unspecified, all goals will be displayed.
 30  
      * 
 31  
      * @parameter expression="${goal}"
 32  
      */
 33  
     private java.lang.String goal;
 34  
 
 35  
     /**
 36  
      * The maximum length of a display line, should be positive.
 37  
      * 
 38  
      * @parameter expression="${lineLength}" default-value="80"
 39  
      */
 40  
     private int lineLength;
 41  
 
 42  
     /**
 43  
      * The number of spaces per indentation level, should be positive.
 44  
      * 
 45  
      * @parameter expression="${indentSize}" default-value="2"
 46  
      */
 47  
     private int indentSize;
 48  
 
 49  
 
 50  
     /** {@inheritDoc} */
 51  
     public void execute()
 52  
         throws MojoExecutionException
 53  
     {
 54  0
         if ( lineLength <= 0 )
 55  
         {
 56  0
             getLog().warn( "The parameter 'lineLength' should be positive, using '80' as default." );
 57  0
             lineLength = 80;
 58  
         }
 59  0
         if ( indentSize <= 0 )
 60  
         {
 61  0
             getLog().warn( "The parameter 'indentSize' should be positive, using '2' as default." );
 62  0
             indentSize = 2;
 63  
         }
 64  
 
 65  0
         StringBuffer sb = new StringBuffer();
 66  
 
 67  0
         append( sb, "org.apache.maven.plugins:maven-eclipse-plugin:2.9", 0 );
 68  0
         append( sb, "", 0 );
 69  
 
 70  0
         append( sb, "Maven Eclipse Plugin 2.9", 0 );
 71  0
         append( sb, "The Eclipse Plugin is used to generate Eclipse IDE files (.project, .classpath and the .settings folder) from a POM.", 1 );
 72  0
         append( sb, "", 0 );
 73  
 
 74  0
         if ( goal == null || goal.length() <= 0 )
 75  
         {
 76  0
             append( sb, "This plugin has 13 goals:", 0 );
 77  0
             append( sb, "", 0 );
 78  
         }
 79  
 
 80  0
         if ( goal == null || goal.length() <= 0 || "add-maven-repo".equals( goal ) )
 81  
         {
 82  0
             append( sb, "eclipse:add-maven-repo", 0 );
 83  0
             append( sb, "Deprecated. Use configure-workspace goal instead.", 1 );
 84  0
             if ( detail )
 85  
             {
 86  0
                 append( sb, "", 0 );
 87  0
                 append( sb, "Adds the classpath variable M2_REPO to Eclipse. DEPRECATED. Replaced by eclipse:configure-workspace.", 1 );
 88  
             }
 89  0
             append( sb, "", 0 );
 90  0
             if ( detail )
 91  
             {
 92  0
                 append( sb, "Available parameters:", 1 );
 93  0
                 append( sb, "", 0 );
 94  
 
 95  0
                 append( sb, "workspace", 2 );
 96  0
                 append( sb, "Directory location of the Eclipse workspace.", 3 );
 97  0
                 append( sb, "", 0 );
 98  
             }
 99  
         }
 100  
 
 101  0
         if ( goal == null || goal.length() <= 0 || "clean".equals( goal ) )
 102  
         {
 103  0
             append( sb, "eclipse:clean", 0 );
 104  0
             append( sb, "Deletes the .project, .classpath, .wtpmodules files and .settings folder used by Eclipse.", 1 );
 105  0
             append( sb, "", 0 );
 106  0
             if ( detail )
 107  
             {
 108  0
                 append( sb, "Available parameters:", 1 );
 109  0
                 append( sb, "", 0 );
 110  
 
 111  0
                 append( sb, "additionalConfig", 2 );
 112  0
                 append( sb, "additional generic configuration files for eclipse", 3 );
 113  0
                 append( sb, "", 0 );
 114  
 
 115  0
                 append( sb, "basedir", 2 );
 116  0
                 append( sb, "The root directory of the project", 3 );
 117  0
                 append( sb, "", 0 );
 118  
 
 119  0
                 append( sb, "packaging", 2 );
 120  0
                 append( sb, "Packaging for the current project.", 3 );
 121  0
                 append( sb, "", 0 );
 122  
 
 123  0
                 append( sb, "skip (Default: false)", 2 );
 124  0
                 append( sb, "Skip the operation when true.", 3 );
 125  0
                 append( sb, "", 0 );
 126  
             }
 127  
         }
 128  
 
 129  0
         if ( goal == null || goal.length() <= 0 || "configure-workspace".equals( goal ) )
 130  
         {
 131  0
             append( sb, "eclipse:configure-workspace", 0 );
 132  0
             append( sb, "Configures The following Eclipse Workspace features:\n-\tAdds the classpath variable MAVEN_REPO to Eclipse.\n-\tOptionally load Eclipse code style file via a URL.\n", 1 );
 133  0
             append( sb, "", 0 );
 134  0
             if ( detail )
 135  
             {
 136  0
                 append( sb, "Available parameters:", 1 );
 137  0
                 append( sb, "", 0 );
 138  
 
 139  0
                 append( sb, "workspace", 2 );
 140  0
                 append( sb, "Directory location of the Eclipse workspace.", 3 );
 141  0
                 append( sb, "", 0 );
 142  
 
 143  0
                 append( sb, "workspaceActiveCodeStyleProfileName", 2 );
 144  0
                 append( sb, "Name of a profile in workspaceCodeStylesURL to activate. Default is the first profile name in the code style file in workspaceCodeStylesURL", 3 );
 145  0
                 append( sb, "", 0 );
 146  
 
 147  0
                 append( sb, "workspaceCodeStylesURL", 2 );
 148  0
                 append( sb, "Point to a URL containing code styles content.", 3 );
 149  0
                 append( sb, "", 0 );
 150  
             }
 151  
         }
 152  
 
 153  0
         if ( goal == null || goal.length() <= 0 || "eclipse".equals( goal ) )
 154  
         {
 155  0
             append( sb, "eclipse:eclipse", 0 );
 156  0
             append( sb, "Generates the following eclipse configuration files:\n-\t.project and .classpath files\n-\t.setting/org.eclipse.jdt.core.prefs with project specific compiler settings\n-\tvarious configuration files for WTP (Web Tools Project), if the parameter wtpversion is set to a valid version (WTP configuration is not generated by default)\nIf this goal is run on a multiproject root, dependencies between modules will be configured as direct project dependencies in Eclipse (unless useProjectReferences is set to false).", 1 );
 157  0
             append( sb, "", 0 );
 158  0
             if ( detail )
 159  
             {
 160  0
                 append( sb, "Available parameters:", 1 );
 161  0
                 append( sb, "", 0 );
 162  
 
 163  0
                 append( sb, "addGroupIdToProjectName (Default: false)", 2 );
 164  0
                 append( sb, "If set to true, the groupId of the artifact is appended to the name of the generated Eclipse project. See projectNameTemplate for other options.", 3 );
 165  0
                 append( sb, "", 0 );
 166  
 
 167  0
                 append( sb, "addVersionToProjectName (Default: false)", 2 );
 168  0
                 append( sb, "If set to true, the version number of the artifact is appended to the name of the generated Eclipse project. See projectNameTemplate for other options.", 3 );
 169  0
                 append( sb, "", 0 );
 170  
 
 171  0
                 append( sb, "additionalBuildcommands", 2 );
 172  0
                 append( sb, "List of eclipse build commands to be added to the default ones. Old style:\n<additionalBuildcommands>\n<buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>\n</additionalBuildcommands>\nNew style:\n<additionalBuildcommands>\n<buildCommand>\n<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>\n<triggers>auto,full,incremental,</triggers>\n<arguments>\n<LaunchConfigHandle>&lt;project&gt;./externalToolBuilders/MavenBuilder.launch</LaunchConfighandle>\n</arguments>\n</buildCommand>\n</additionalBuildcommands>\nNote the difference between buildcommand and buildCommand. You can mix and match old and new-style configuration entries.", 3 );
 173  0
                 append( sb, "", 0 );
 174  
 
 175  0
                 append( sb, "additionalConfig", 2 );
 176  0
                 append( sb, "Allow to configure additional generic configuration files for eclipse that will be written out to disk when running eclipse:eclipse. FOr each file you can specify the name and the text content.\n<plugin>\n<groupId>org.apache.maven.plugins</groupId>\n<artifactId>maven-eclipse-plugin</artifactId>\n<configuration>\n<additionalConfig>\n<file>\n<name>.checkstyle</name>\n<content>\n<![CDATA[<fileset-config\u00a0file-format-version=\'1.2.0\'\u00a0simple-config=\'true\'>\n<fileset\u00a0name=\'all\'\u00a0enabled=\'true\'\u00a0check-config-name=\'acme\u00a0corporate\u00a0style\'\u00a0local=\'false\'>\n<file-match-pattern\u00a0match-pattern=\'.\'\u00a0include-pattern=\'true\'/>\n</fileset>\n<filter\u00a0name=\'NonSrcDirs\'\u00a0enabled=\'true\'/>\n</fileset-config>]]>\n</content>\n</file>\n</additionalConfig>\n</configuration>\n</plugin>\nInstead of the content you can also define (from version 2.5) an url to download the file :\n<plugin>\n<groupId>org.apache.maven.plugins</groupId>\n<artifactId>maven-eclipse-plugin</artifactId>\n<configuration>\n<additionalConfig>\n<file>\n<name>.checkstyle</name>\n<url>http://some.place.org/path/to/file</url>\n</file>\n</additionalConfig>\n</configuration>\nor a location :\n<plugin>\n<groupId>org.apache.maven.plugins</groupId>\n<artifactId>maven-eclipse-plugin</artifactId>\n<configuration>\n<additionalConfig>\n<file>\n<name>.checkstyle</name>\n<location>/checkstyle-config.xml</location>\n</file>\n</additionalConfig>\n</configuration>\n<dependencies>\n<!--\u00a0The\u00a0file\u00a0defined\u00a0in\u00a0the\u00a0location\u00a0is\u00a0stored\u00a0in\u00a0this\u00a0dependency\u00a0-->\n<dependency>\n<groupId>eclipsetest</groupId>\n<artifactId>checkstyle-config</artifactId>\n<version>1.0</version>\n</dependency>\n</dependencies>\n</plugin>\n", 3 );
 177  0
                 append( sb, "", 0 );
 178  
 
 179  0
                 append( sb, "additionalProjectFacets", 2 );
 180  0
                 append( sb, "List of eclipse project facets to be added to the default ones.\n<additionalProjectFacets>\n<jst.jsf>1.1<jst.jsf/>\n</additionalProjectFacets>\n", 3 );
 181  0
                 append( sb, "", 0 );
 182  
 
 183  0
                 append( sb, "additionalProjectnatures", 2 );
 184  0
                 append( sb, "List of eclipse project natures to be added to the default ones.\n<additionalProjectnatures>\n<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>\n</additionalProjectnatures>\n", 3 );
 185  0
                 append( sb, "", 0 );
 186  
 
 187  0
                 append( sb, "ajdtVersion (Default: none)", 2 );
 188  0
                 append( sb, "The version of AJDT for which configuration files will be generated. The default value is \'1.5\', supported versions are \'none\' (AJDT support disabled), \'1.4\', and \'1.5\'.", 3 );
 189  0
                 append( sb, "", 0 );
 190  
 
 191  0
                 append( sb, "buildOutputDirectory (Default: ${project.build.outputDirectory})", 2 );
 192  0
                 append( sb, "The default output directory", 3 );
 193  0
                 append( sb, "", 0 );
 194  
 
 195  0
                 append( sb, "buildcommands", 2 );
 196  0
                 append( sb, "List of eclipse build commands. By default the 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:\n<buildcommands>\n<buildcommand>org.eclipse.wst.common.modulecore.ComponentStructuralBuilder</buildcommand>\n<buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>\n<buildcommand>org.eclipse.wst.common.modulecore.ComponentStructuralBuilderDependencyResolver</buildcommand>\n</buildcommands>\nFor new style, see additionalBuildCommands.", 3 );
 197  0
                 append( sb, "", 0 );
 198  
 
 199  0
                 append( sb, "classpathContainers", 2 );
 200  0
                 append( sb, "List of container classpath entries. By default the org.eclipse.jdt.launching.JRE_CONTAINER classpath container is added. Configuration example:\n<classpathContainers>\n<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>\n<classpathContainer>org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache\u00a0Tomcat\u00a0v5.5</classpathContainer>\n<classpathContainer>org.eclipse.jst.j2ee.internal.web.container/artifact</classpathContainer>\n</classpathContainers>\n", 3 );
 201  0
                 append( sb, "", 0 );
 202  
 
 203  0
                 append( sb, "classpathContainersLast (Default: false)", 2 );
 204  0
                 append( sb, "Put classpath container entries last in eclipse classpath configuration. Note that this behaviour, although useful in situations were you want to override resources found in classpath containers, will made JRE classes loaded after 3rd party jars, so enabling it is not suggested.", 3 );
 205  0
                 append( sb, "", 0 );
 206  
 
 207  0
                 append( sb, "downloadJavadocs", 2 );
 208  0
                 append( sb, "Enables/disables the downloading of javadoc attachments. Defaults to false. When this flag is true remote repositories are checked for javadocs: in order to avoid repeated check for unavailable javadoc archives, a status cache is mantained. With versions 2.6+ of the plugin to reset this cache run mvn eclipse:remove-cache, or use the forceRecheck option with versions. With older versions delete the file mvn-eclipse-cache.properties in the target directory.", 3 );
 209  0
                 append( sb, "", 0 );
 210  
 
 211  0
                 append( sb, "downloadSources", 2 );
 212  0
                 append( sb, "Enables/disables the downloading of source attachments. Defaults to false. When this flag is true remote repositories are checked for sources: in order to avoid repeated check for unavailable source archives, a status cache is mantained. With versions 2.6+ of the plugin to reset this cache run mvn eclipse:remove-cache, or use the forceRecheck option with versions. With older versions delete the file mvn-eclipse-cache.properties in the target directory.", 3 );
 213  0
                 append( sb, "", 0 );
 214  
 
 215  0
                 append( sb, "eclipseDownloadSources", 2 );
 216  0
                 append( sb, "Deprecated. use downloadSources", 3 );
 217  0
                 append( sb, "", 0 );
 218  0
                 append( sb, "Enables/disables the downloading of source attachments. Defaults to false. DEPRECATED - use downloadSources", 3 );
 219  0
                 append( sb, "", 0 );
 220  
 
 221  0
                 append( sb, "eclipseProjectDir", 2 );
 222  0
                 append( sb, "Eclipse workspace directory.", 3 );
 223  0
                 append( sb, "", 0 );
 224  
 
 225  0
                 append( sb, "excludes", 2 );
 226  0
                 append( sb, "List of artifacts, represented as groupId:artifactId, to exclude from the eclipse classpath, being provided by some eclipse classPathContainer.", 3 );
 227  0
                 append( sb, "", 0 );
 228  
 
 229  0
                 append( sb, "forceRecheck", 2 );
 230  0
                 append( sb, "Enables/disables the rechecking of the remote repository for downloading source/javadoc attachments. Defaults to false. When this flag is true and the source or javadoc attachment has a status cache to indicate that it is not available, then the remote repository will be rechecked for a source or javadoc attachment and the status cache updated to reflect the new state.", 3 );
 231  0
                 append( sb, "", 0 );
 232  
 
 233  0
                 append( sb, "jeeversion", 2 );
 234  0
                 append( sb, "The plugin is often capable in predicting the required jee version based on the dependencies of the project. By setting this parameter to one of the jeeversion options the version will be locked. \njeeversion\nEJB version\nServlet version\nJSP version\n6.0\n3.1\n3.0\n2.2\n5.0\n3.0\n2.5\n2.1\n1.4\n2.1\n2.4\n2.0\n1.3\n2.0\n2.3\n1.2\n1.2\n1.1\n2.2\n1.1", 3 );
 235  0
                 append( sb, "", 0 );
 236  
 
 237  0
                 append( sb, "limitProjectReferencesToWorkspace (Default: false)", 2 );
 238  0
                 append( sb, "Limit the use of project references to the current workspace. No project references will be created to projects in the reactor when they are not available in the workspace.", 3 );
 239  0
                 append( sb, "", 0 );
 240  
 
 241  0
                 append( sb, "linkedResources", 2 );
 242  0
                 append( sb, "A list of links to local files in the system. A configuration like this one in the pom :\n<plugin>\n<groupId>org.apache.maven.plugins</groupId>\n<artifactId>maven-eclipse-plugin</artifactId>\n<configuration>\n<linkedResources>\n<linkedResource>\n<name>src/test/resources/oracle-ds.xml</name>\n<type>1</type>\n<location>C://jboss/server/default/deploy/oracle-ds.xml</location>\n</linkedResource>\n</linkedResources>\n</configuration>\n</plugin>\nwill produce in the .project :\n<linkedResources>\n<link>\n<name>src/test/resources/oracle-ds.xml</name>\n<type>1</type>\n<location>C://jboss/server/default/deploy/oracle-ds.xml</location>\n</link>\n</linkedResources>\n", 3 );
 243  0
                 append( sb, "", 0 );
 244  
 
 245  0
                 append( sb, "manifest (Default: ${basedir}/META-INF/MANIFEST.MF)", 2 );
 246  0
                 append( sb, "The relative path of the manifest file", 3 );
 247  0
                 append( sb, "", 0 );
 248  
 
 249  0
                 append( sb, "packaging", 2 );
 250  0
                 append( sb, "The project packaging.", 3 );
 251  0
                 append( sb, "", 0 );
 252  
 
 253  0
                 append( sb, "pde (Default: false)", 2 );
 254  0
                 append( sb, "Is it an PDE project? If yes, the plugin adds the necessary natures and build commands to the .project file. Additionally it copies all libraries to a project local directory and references them instead of referencing the files in the local Maven repository. It also ensured that the \'Bundle-Classpath\' in META-INF/MANIFEST.MF is synchronized.", 3 );
 255  0
                 append( sb, "", 0 );
 256  
 
 257  0
                 append( sb, "projectNameTemplate", 2 );
 258  0
                 append( sb, "Allows configuring the name of the eclipse projects. This property if set wins over addVersionToProjectName and addGroupIdToProjectName You can use [groupId], [artifactId] and [version] variables. eg. [groupId].[artifactId]-[version]", 3 );
 259  0
                 append( sb, "", 0 );
 260  
 
 261  0
                 append( sb, "projectnatures", 2 );
 262  0
                 append( sb, "List of eclipse project natures. By default the org.eclipse.jdt.core.javanature nature plus the needed WTP natures are added. Natures added using this property replace the default list.\n<projectnatures>\n<projectnature>org.eclipse.jdt.core.javanature</projectnature>\n<projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>\n</projectnatures>\n", 3 );
 263  0
                 append( sb, "", 0 );
 264  
 
 265  0
                 append( sb, "skip (Default: false)", 2 );
 266  0
                 append( sb, "Skip the operation when true.", 3 );
 267  0
                 append( sb, "", 0 );
 268  
 
 269  0
                 append( sb, "sourceExcludes", 2 );
 270  0
                 append( sb, "List of exclusions to add to the source directories on the classpath. Adds excluding=\'\' to the classpathentry of the eclipse .classpath file. [MECLIPSE-104]", 3 );
 271  0
                 append( sb, "", 0 );
 272  
 
 273  0
                 append( sb, "sourceIncludes", 2 );
 274  0
                 append( sb, "List of inclusions to add to the source directories on the classpath. Adds including=\'\' to the classpathentry of the eclipse .classpath file.\nJava projects will always include \'**/*.java\'\n\nAjdt projects will always include \'**/*.aj\'\n\n[MECLIPSE-104]\n", 3 );
 275  0
                 append( sb, "", 0 );
 276  
 
 277  0
                 append( sb, "testSourcesLast (Default: false)", 2 );
 278  0
                 append( sb, "Whether to place test resources after main resources. Note that the default behavior of Maven version 2.0.8 or later is to have test dirs before main dirs in classpath so this is discouraged if you need to reproduce the maven behavior during tests. The default behavior is also changed in eclipse plugin version 2.6 in order to better match the maven one. Switching to \'test source last\' can anyway be useful if you need to run your application in eclipse, since there is no concept in eclipse of \'phases\' with different set of source dirs and dependencies like we have in maven.", 3 );
 279  0
                 append( sb, "", 0 );
 280  
 
 281  0
                 append( sb, "useProjectReferences (Default: true)", 2 );
 282  0
                 append( sb, "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", 3 );
 283  0
                 append( sb, "", 0 );
 284  
 
 285  0
                 append( sb, "workspace", 2 );
 286  0
                 append( sb, "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. Requirement is that it was created with the similar wtp settings as the reactor projects, but the project name template my differ. The pom\'s in the workspace projects may not contain variables in the artefactId, groupId and version tags. If workspace is not defined, then an attempt to locate it by checking up the directory hierarchy will be made.", 3 );
 287  0
                 append( sb, "", 0 );
 288  
 
 289  0
                 append( sb, "wtpContextName", 2 );
 290  0
                 append( sb, "JEE context name of the WTP module. ( ex. WEB context name ). You can use \'ROOT\' if you want to map the webapp to the root context.", 3 );
 291  0
                 append( sb, "", 0 );
 292  
 
 293  0
                 append( sb, "wtpapplicationxml (Default: false)", 2 );
 294  0
                 append( sb, "Must the application files be written for ear projects in a separate directory.", 3 );
 295  0
                 append( sb, "", 0 );
 296  
 
 297  0
                 append( sb, "wtpdefaultserver", 2 );
 298  0
                 append( sb, "What WTP defined server to use for deployment informations.", 3 );
 299  0
                 append( sb, "", 0 );
 300  
 
 301  0
                 append( sb, "wtpmanifest (Default: false)", 2 );
 302  0
                 append( sb, "Must the manifest files be written for java projects so that that the jee classpath for wtp is correct.", 3 );
 303  0
                 append( sb, "", 0 );
 304  
 
 305  0
                 append( sb, "wtpversion (Default: none)", 2 );
 306  0
                 append( sb, "The version of WTP for which configuration files will be generated. The default value is \'none\' (don\'t generate WTP configuration), supported versions are \'R7\', \'1.0\', \'1.5\' and \'2.0\'", 3 );
 307  0
                 append( sb, "", 0 );
 308  
             }
 309  
         }
 310  
 
 311  0
         if ( goal == null || goal.length() <= 0 || "help".equals( goal ) )
 312  
         {
 313  0
             append( sb, "eclipse:help", 0 );
 314  0
             append( sb, "Display help information on maven-eclipse-plugin.\nCall\n\u00a0\u00a0mvn\u00a0eclipse:help\u00a0-Ddetail=true\u00a0-Dgoal=<goal-name>\nto display parameter details.", 1 );
 315  0
             append( sb, "", 0 );
 316  0
             if ( detail )
 317  
             {
 318  0
                 append( sb, "Available parameters:", 1 );
 319  0
                 append( sb, "", 0 );
 320  
 
 321  0
                 append( sb, "detail (Default: false)", 2 );
 322  0
                 append( sb, "If true, display all settable properties for each goal.", 3 );
 323  0
                 append( sb, "", 0 );
 324  
 
 325  0
                 append( sb, "goal", 2 );
 326  0
                 append( sb, "The name of the goal for which to show help. If unspecified, all goals will be displayed.", 3 );
 327  0
                 append( sb, "", 0 );
 328  
 
 329  0
                 append( sb, "lineLength (Default: 80)", 2 );
 330  0
                 append( sb, "The maximum length of a display line, should be positive.", 3 );
 331  0
                 append( sb, "", 0 );
 332  
 
 333  0
                 append( sb, "indentSize (Default: 2)", 2 );
 334  0
                 append( sb, "The number of spaces per indentation level, should be positive.", 3 );
 335  0
                 append( sb, "", 0 );
 336  
             }
 337  
         }
 338  
 
 339  0
         if ( goal == null || goal.length() <= 0 || "install-plugins".equals( goal ) )
 340  
         {
 341  0
             append( sb, "eclipse:install-plugins", 0 );
 342  0
             append( sb, "Install plugins resolved from the Maven repository system into an Eclipse instance.", 1 );
 343  0
             append( sb, "", 0 );
 344  0
             if ( detail )
 345  
             {
 346  0
                 append( sb, "Available parameters:", 1 );
 347  0
                 append( sb, "", 0 );
 348  
 
 349  0
                 append( sb, "eclipseDir", 2 );
 350  0
                 append( sb, "This is the installed base directory of the Eclipse instance you want to modify.", 3 );
 351  0
                 append( sb, "", 0 );
 352  
 
 353  0
                 append( sb, "overwrite (Default: false)", 2 );
 354  0
                 append( sb, "Determines whether this mojo leaves existing installed plugins as-is, or overwrites them.", 3 );
 355  0
                 append( sb, "", 0 );
 356  
 
 357  0
                 append( sb, "pluginDependencyTypes (Default: jar)", 2 );
 358  0
                 append( sb, "Comma-delimited list of dependency <type/> values which will be installed in the eclipse instance\'s plugins directory.", 3 );
 359  0
                 append( sb, "", 0 );
 360  
             }
 361  
         }
 362  
 
 363  0
         if ( goal == null || goal.length() <= 0 || "make-artifacts".equals( goal ) )
 364  
         {
 365  0
             append( sb, "eclipse:make-artifacts", 0 );
 366  0
             append( sb, "Deprecated. use EclipseToMavenMojo for the latest naming conventions", 1 );
 367  0
             if ( detail )
 368  
             {
 369  0
                 append( sb, "", 0 );
 370  0
                 append( sb, "Add eclipse artifacts from an eclipse installation to the local repo. This mojo automatically analize the eclipse directory, copy plugins jars to the local maven repo, and generates appropriate poms. Use eclipse:to-maven for the latest naming conventions in place, groupId. artifactId.", 1 );
 371  
             }
 372  0
             append( sb, "", 0 );
 373  0
             if ( detail )
 374  
             {
 375  0
                 append( sb, "Available parameters:", 1 );
 376  0
                 append( sb, "", 0 );
 377  
 
 378  0
                 append( sb, "deployTo", 2 );
 379  0
                 append( sb, "Specifies a remote repository to which generated artifacts should be deployed to. If this property is specified, artifacts are also deployed to the remote repo. The format for this parameter is id::layout::url", 3 );
 380  0
                 append( sb, "", 0 );
 381  
 
 382  0
                 append( sb, "eclipseDir", 2 );
 383  0
                 append( sb, "Eclipse installation dir. If not set, a value for this parameter will be asked on the command line.", 3 );
 384  0
                 append( sb, "", 0 );
 385  
 
 386  0
                 append( sb, "forcedQualifier", 2 );
 387  0
                 append( sb, "Default token to use as a qualifier. Tipically qualifiers for plugins in the same eclipse build are different. This parameter can be used to \'align\' qualifiers so that all the plugins coming from the same eclipse build can be easily identified. For example, setting this to \'M3\' will force the pluging versions to be \'*.*.*.M3\'", 3 );
 388  0
                 append( sb, "", 0 );
 389  
 
 390  0
                 append( sb, "resolveVersionRanges (Default: false)", 2 );
 391  0
                 append( sb, "Resolve version ranges in generated pom dependencies to versions of the other plugins being converted", 3 );
 392  0
                 append( sb, "", 0 );
 393  
 
 394  0
                 append( sb, "stripQualifier (Default: true)", 2 );
 395  0
                 append( sb, "Strip qualifier (fourth token) from the plugin version. Qualifiers are for eclipse plugin the equivalent of timestamped snapshot versions for Maven, but the date is maintained also for released version (e.g. a jar for the release 3.2 can be named org.eclipse.core.filesystem_1.0.0.v20060603.jar. It\'s usually handy to not to include this qualifier when generating maven artifacts for major releases, while it\'s needed when working with eclipse integration/nightly builds.", 3 );
 396  0
                 append( sb, "", 0 );
 397  
             }
 398  
         }
 399  
 
 400  0
         if ( goal == null || goal.length() <= 0 || "myeclipse".equals( goal ) )
 401  
         {
 402  0
             append( sb, "eclipse:myeclipse", 0 );
 403  0
             append( sb, "Generates MyEclipse configuration files", 1 );
 404  0
             append( sb, "", 0 );
 405  0
             if ( detail )
 406  
             {
 407  0
                 append( sb, "Available parameters:", 1 );
 408  0
                 append( sb, "", 0 );
 409  
 
 410  0
                 append( sb, "addGroupIdToProjectName (Default: false)", 2 );
 411  0
                 append( sb, "If set to true, the groupId of the artifact is appended to the name of the generated Eclipse project. See projectNameTemplate for other options.", 3 );
 412  0
                 append( sb, "", 0 );
 413  
 
 414  0
                 append( sb, "addVersionToProjectName (Default: false)", 2 );
 415  0
                 append( sb, "If set to true, the version number of the artifact is appended to the name of the generated Eclipse project. See projectNameTemplate for other options.", 3 );
 416  0
                 append( sb, "", 0 );
 417  
 
 418  0
                 append( sb, "additionalBuildcommands", 2 );
 419  0
                 append( sb, "List of eclipse build commands to be added to the default ones. Old style:\n<additionalBuildcommands>\n<buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>\n</additionalBuildcommands>\nNew style:\n<additionalBuildcommands>\n<buildCommand>\n<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>\n<triggers>auto,full,incremental,</triggers>\n<arguments>\n<LaunchConfigHandle>&lt;project&gt;./externalToolBuilders/MavenBuilder.launch</LaunchConfighandle>\n</arguments>\n</buildCommand>\n</additionalBuildcommands>\nNote the difference between buildcommand and buildCommand. You can mix and match old and new-style configuration entries.", 3 );
 420  0
                 append( sb, "", 0 );
 421  
 
 422  0
                 append( sb, "additionalConfig", 2 );
 423  0
                 append( sb, "Allow to configure additional generic configuration files for eclipse that will be written out to disk when running eclipse:eclipse. FOr each file you can specify the name and the text content.\n<plugin>\n<groupId>org.apache.maven.plugins</groupId>\n<artifactId>maven-eclipse-plugin</artifactId>\n<configuration>\n<additionalConfig>\n<file>\n<name>.checkstyle</name>\n<content>\n<![CDATA[<fileset-config\u00a0file-format-version=\'1.2.0\'\u00a0simple-config=\'true\'>\n<fileset\u00a0name=\'all\'\u00a0enabled=\'true\'\u00a0check-config-name=\'acme\u00a0corporate\u00a0style\'\u00a0local=\'false\'>\n<file-match-pattern\u00a0match-pattern=\'.\'\u00a0include-pattern=\'true\'/>\n</fileset>\n<filter\u00a0name=\'NonSrcDirs\'\u00a0enabled=\'true\'/>\n</fileset-config>]]>\n</content>\n</file>\n</additionalConfig>\n</configuration>\n</plugin>\nInstead of the content you can also define (from version 2.5) an url to download the file :\n<plugin>\n<groupId>org.apache.maven.plugins</groupId>\n<artifactId>maven-eclipse-plugin</artifactId>\n<configuration>\n<additionalConfig>\n<file>\n<name>.checkstyle</name>\n<url>http://some.place.org/path/to/file</url>\n</file>\n</additionalConfig>\n</configuration>\nor a location :\n<plugin>\n<groupId>org.apache.maven.plugins</groupId>\n<artifactId>maven-eclipse-plugin</artifactId>\n<configuration>\n<additionalConfig>\n<file>\n<name>.checkstyle</name>\n<location>/checkstyle-config.xml</location>\n</file>\n</additionalConfig>\n</configuration>\n<dependencies>\n<!--\u00a0The\u00a0file\u00a0defined\u00a0in\u00a0the\u00a0location\u00a0is\u00a0stored\u00a0in\u00a0this\u00a0dependency\u00a0-->\n<dependency>\n<groupId>eclipsetest</groupId>\n<artifactId>checkstyle-config</artifactId>\n<version>1.0</version>\n</dependency>\n</dependencies>\n</plugin>\n", 3 );
 424  0
                 append( sb, "", 0 );
 425  
 
 426  0
                 append( sb, "additionalProjectFacets", 2 );
 427  0
                 append( sb, "List of eclipse project facets to be added to the default ones.\n<additionalProjectFacets>\n<jst.jsf>1.1<jst.jsf/>\n</additionalProjectFacets>\n", 3 );
 428  0
                 append( sb, "", 0 );
 429  
 
 430  0
                 append( sb, "additionalProjectnatures", 2 );
 431  0
                 append( sb, "List of eclipse project natures to be added to the default ones.\n<additionalProjectnatures>\n<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>\n</additionalProjectnatures>\n", 3 );
 432  0
                 append( sb, "", 0 );
 433  
 
 434  0
                 append( sb, "ajdtVersion (Default: none)", 2 );
 435  0
                 append( sb, "The version of AJDT for which configuration files will be generated. The default value is \'1.5\', supported versions are \'none\' (AJDT support disabled), \'1.4\', and \'1.5\'.", 3 );
 436  0
                 append( sb, "", 0 );
 437  
 
 438  0
                 append( sb, "buildOutputDirectory (Default: ${project.build.outputDirectory})", 2 );
 439  0
                 append( sb, "The default output directory", 3 );
 440  0
                 append( sb, "", 0 );
 441  
 
 442  0
                 append( sb, "buildcommands", 2 );
 443  0
                 append( sb, "List of eclipse build commands. By default the 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:\n<buildcommands>\n<buildcommand>org.eclipse.wst.common.modulecore.ComponentStructuralBuilder</buildcommand>\n<buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>\n<buildcommand>org.eclipse.wst.common.modulecore.ComponentStructuralBuilderDependencyResolver</buildcommand>\n</buildcommands>\nFor new style, see additionalBuildCommands.", 3 );
 444  0
                 append( sb, "", 0 );
 445  
 
 446  0
                 append( sb, "classpathContainers", 2 );
 447  0
                 append( sb, "List of container classpath entries. By default the org.eclipse.jdt.launching.JRE_CONTAINER classpath container is added. Configuration example:\n<classpathContainers>\n<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>\n<classpathContainer>org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache\u00a0Tomcat\u00a0v5.5</classpathContainer>\n<classpathContainer>org.eclipse.jst.j2ee.internal.web.container/artifact</classpathContainer>\n</classpathContainers>\n", 3 );
 448  0
                 append( sb, "", 0 );
 449  
 
 450  0
                 append( sb, "classpathContainersLast (Default: false)", 2 );
 451  0
                 append( sb, "Put classpath container entries last in eclipse classpath configuration. Note that this behaviour, although useful in situations were you want to override resources found in classpath containers, will made JRE classes loaded after 3rd party jars, so enabling it is not suggested.", 3 );
 452  0
                 append( sb, "", 0 );
 453  
 
 454  0
                 append( sb, "downloadJavadocs", 2 );
 455  0
                 append( sb, "Enables/disables the downloading of javadoc attachments. Defaults to false. When this flag is true remote repositories are checked for javadocs: in order to avoid repeated check for unavailable javadoc archives, a status cache is mantained. With versions 2.6+ of the plugin to reset this cache run mvn eclipse:remove-cache, or use the forceRecheck option with versions. With older versions delete the file mvn-eclipse-cache.properties in the target directory.", 3 );
 456  0
                 append( sb, "", 0 );
 457  
 
 458  0
                 append( sb, "downloadSources", 2 );
 459  0
                 append( sb, "Enables/disables the downloading of source attachments. Defaults to false. When this flag is true remote repositories are checked for sources: in order to avoid repeated check for unavailable source archives, a status cache is mantained. With versions 2.6+ of the plugin to reset this cache run mvn eclipse:remove-cache, or use the forceRecheck option with versions. With older versions delete the file mvn-eclipse-cache.properties in the target directory.", 3 );
 460  0
                 append( sb, "", 0 );
 461  
 
 462  0
                 append( sb, "eclipseDownloadSources", 2 );
 463  0
                 append( sb, "Deprecated. use downloadSources", 3 );
 464  0
                 append( sb, "", 0 );
 465  0
                 append( sb, "Enables/disables the downloading of source attachments. Defaults to false. DEPRECATED - use downloadSources", 3 );
 466  0
                 append( sb, "", 0 );
 467  
 
 468  0
                 append( sb, "eclipseProjectDir", 2 );
 469  0
                 append( sb, "Eclipse workspace directory.", 3 );
 470  0
                 append( sb, "", 0 );
 471  
 
 472  0
                 append( sb, "excludes", 2 );
 473  0
                 append( sb, "List of artifacts, represented as groupId:artifactId, to exclude from the eclipse classpath, being provided by some eclipse classPathContainer.", 3 );
 474  0
                 append( sb, "", 0 );
 475  
 
 476  0
                 append( sb, "forceRecheck", 2 );
 477  0
                 append( sb, "Enables/disables the rechecking of the remote repository for downloading source/javadoc attachments. Defaults to false. When this flag is true and the source or javadoc attachment has a status cache to indicate that it is not available, then the remote repository will be rechecked for a source or javadoc attachment and the status cache updated to reflect the new state.", 3 );
 478  0
                 append( sb, "", 0 );
 479  
 
 480  0
                 append( sb, "hibernate", 2 );
 481  0
                 append( sb, "Hibernate configuration placeholder\n\n<hibernate>\n<config-file>src/main/resources/applicationContext-persistence.xml</config-file>\n<session-factory-id>mySessionFactory</session-factory-id>\n</hibernate>\n", 3 );
 482  0
                 append( sb, "", 0 );
 483  
 
 484  0
                 append( sb, "jeeversion", 2 );
 485  0
                 append( sb, "The plugin is often capable in predicting the required jee version based on the dependencies of the project. By setting this parameter to one of the jeeversion options the version will be locked. \njeeversion\nEJB version\nServlet version\nJSP version\n6.0\n3.1\n3.0\n2.2\n5.0\n3.0\n2.5\n2.1\n1.4\n2.1\n2.4\n2.0\n1.3\n2.0\n2.3\n1.2\n1.2\n1.1\n2.2\n1.1", 3 );
 486  0
                 append( sb, "", 0 );
 487  
 
 488  0
                 append( sb, "limitProjectReferencesToWorkspace (Default: false)", 2 );
 489  0
                 append( sb, "Limit the use of project references to the current workspace. No project references will be created to projects in the reactor when they are not available in the workspace.", 3 );
 490  0
                 append( sb, "", 0 );
 491  
 
 492  0
                 append( sb, "linkedResources", 2 );
 493  0
                 append( sb, "A list of links to local files in the system. A configuration like this one in the pom :\n<plugin>\n<groupId>org.apache.maven.plugins</groupId>\n<artifactId>maven-eclipse-plugin</artifactId>\n<configuration>\n<linkedResources>\n<linkedResource>\n<name>src/test/resources/oracle-ds.xml</name>\n<type>1</type>\n<location>C://jboss/server/default/deploy/oracle-ds.xml</location>\n</linkedResource>\n</linkedResources>\n</configuration>\n</plugin>\nwill produce in the .project :\n<linkedResources>\n<link>\n<name>src/test/resources/oracle-ds.xml</name>\n<type>1</type>\n<location>C://jboss/server/default/deploy/oracle-ds.xml</location>\n</link>\n</linkedResources>\n", 3 );
 494  0
                 append( sb, "", 0 );
 495  
 
 496  0
                 append( sb, "manifest (Default: ${basedir}/META-INF/MANIFEST.MF)", 2 );
 497  0
                 append( sb, "The relative path of the manifest file", 3 );
 498  0
                 append( sb, "", 0 );
 499  
 
 500  0
                 append( sb, "packaging", 2 );
 501  0
                 append( sb, "The project packaging.", 3 );
 502  0
                 append( sb, "", 0 );
 503  
 
 504  0
                 append( sb, "pde (Default: false)", 2 );
 505  0
                 append( sb, "Is it an PDE project? If yes, the plugin adds the necessary natures and build commands to the .project file. Additionally it copies all libraries to a project local directory and references them instead of referencing the files in the local Maven repository. It also ensured that the \'Bundle-Classpath\' in META-INF/MANIFEST.MF is synchronized.", 3 );
 506  0
                 append( sb, "", 0 );
 507  
 
 508  0
                 append( sb, "projectNameTemplate", 2 );
 509  0
                 append( sb, "Allows configuring the name of the eclipse projects. This property if set wins over addVersionToProjectName and addGroupIdToProjectName You can use [groupId], [artifactId] and [version] variables. eg. [groupId].[artifactId]-[version]", 3 );
 510  0
                 append( sb, "", 0 );
 511  
 
 512  0
                 append( sb, "projectnatures", 2 );
 513  0
                 append( sb, "List of eclipse project natures. By default the org.eclipse.jdt.core.javanature nature plus the needed WTP natures are added. Natures added using this property replace the default list.\n<projectnatures>\n<projectnature>org.eclipse.jdt.core.javanature</projectnature>\n<projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>\n</projectnatures>\n", 3 );
 514  0
                 append( sb, "", 0 );
 515  
 
 516  0
                 append( sb, "skip (Default: false)", 2 );
 517  0
                 append( sb, "Skip the operation when true.", 3 );
 518  0
                 append( sb, "", 0 );
 519  
 
 520  0
                 append( sb, "sourceExcludes", 2 );
 521  0
                 append( sb, "List of exclusions to add to the source directories on the classpath. Adds excluding=\'\' to the classpathentry of the eclipse .classpath file. [MECLIPSE-104]", 3 );
 522  0
                 append( sb, "", 0 );
 523  
 
 524  0
                 append( sb, "sourceIncludes", 2 );
 525  0
                 append( sb, "List of inclusions to add to the source directories on the classpath. Adds including=\'\' to the classpathentry of the eclipse .classpath file.\nJava projects will always include \'**/*.java\'\n\nAjdt projects will always include \'**/*.aj\'\n\n[MECLIPSE-104]\n", 3 );
 526  0
                 append( sb, "", 0 );
 527  
 
 528  0
                 append( sb, "spring", 2 );
 529  0
                 append( sb, "Spring configuration placeholder\n\n<spring>\n<version>1.0/2.0</version>\n<file-pattern>applicationContext-*.xml</file-pattern>\n<basedir>src/main/resources</basedir>\n</spring>\n", 3 );
 530  0
                 append( sb, "", 0 );
 531  
 
 532  0
                 append( sb, "struts", 2 );
 533  0
                 append( sb, "Allow declaration of struts properties for MyEclipse\n\n<struts>\n<version>1.2.9</version>\n<servlet-name>action</servlet-name>\n<pattern>*.do</pattern>\n<base-package>1.2.9</base-package>\n</struts>\n", 3 );
 534  0
                 append( sb, "", 0 );
 535  
 
 536  0
                 append( sb, "testSourcesLast (Default: false)", 2 );
 537  0
                 append( sb, "Whether to place test resources after main resources. Note that the default behavior of Maven version 2.0.8 or later is to have test dirs before main dirs in classpath so this is discouraged if you need to reproduce the maven behavior during tests. The default behavior is also changed in eclipse plugin version 2.6 in order to better match the maven one. Switching to \'test source last\' can anyway be useful if you need to run your application in eclipse, since there is no concept in eclipse of \'phases\' with different set of source dirs and dependencies like we have in maven.", 3 );
 538  0
                 append( sb, "", 0 );
 539  
 
 540  0
                 append( sb, "useProjectReferences (Default: true)", 2 );
 541  0
                 append( sb, "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", 3 );
 542  0
                 append( sb, "", 0 );
 543  
 
 544  0
                 append( sb, "workspace", 2 );
 545  0
                 append( sb, "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. Requirement is that it was created with the similar wtp settings as the reactor projects, but the project name template my differ. The pom\'s in the workspace projects may not contain variables in the artefactId, groupId and version tags. If workspace is not defined, then an attempt to locate it by checking up the directory hierarchy will be made.", 3 );
 546  0
                 append( sb, "", 0 );
 547  
 
 548  0
                 append( sb, "wtpContextName", 2 );
 549  0
                 append( sb, "JEE context name of the WTP module. ( ex. WEB context name ). You can use \'ROOT\' if you want to map the webapp to the root context.", 3 );
 550  0
                 append( sb, "", 0 );
 551  
 
 552  0
                 append( sb, "wtpapplicationxml (Default: false)", 2 );
 553  0
                 append( sb, "Must the application files be written for ear projects in a separate directory.", 3 );
 554  0
                 append( sb, "", 0 );
 555  
 
 556  0
                 append( sb, "wtpdefaultserver", 2 );
 557  0
                 append( sb, "What WTP defined server to use for deployment informations.", 3 );
 558  0
                 append( sb, "", 0 );
 559  
 
 560  0
                 append( sb, "wtpmanifest (Default: false)", 2 );
 561  0
                 append( sb, "Must the manifest files be written for java projects so that that the jee classpath for wtp is correct.", 3 );
 562  0
                 append( sb, "", 0 );
 563  
 
 564  0
                 append( sb, "wtpversion (Default: none)", 2 );
 565  0
                 append( sb, "The version of WTP for which configuration files will be generated. The default value is \'none\' (don\'t generate WTP configuration), supported versions are \'R7\', \'1.0\', \'1.5\' and \'2.0\'", 3 );
 566  0
                 append( sb, "", 0 );
 567  
             }
 568  
         }
 569  
 
 570  0
         if ( goal == null || goal.length() <= 0 || "myeclipse-clean".equals( goal ) )
 571  
         {
 572  0
             append( sb, "eclipse:myeclipse-clean", 0 );
 573  0
             append( sb, "Deletes configuration files used by MyEclipse", 1 );
 574  0
             append( sb, "", 0 );
 575  0
             if ( detail )
 576  
             {
 577  0
                 append( sb, "Available parameters:", 1 );
 578  0
                 append( sb, "", 0 );
 579  
 
 580  0
                 append( sb, "additionalConfig", 2 );
 581  0
                 append( sb, "additional generic configuration files for eclipse", 3 );
 582  0
                 append( sb, "", 0 );
 583  
 
 584  0
                 append( sb, "basedir", 2 );
 585  0
                 append( sb, "The root directory of the project", 3 );
 586  0
                 append( sb, "", 0 );
 587  
 
 588  0
                 append( sb, "packaging", 2 );
 589  0
                 append( sb, "Packaging for the current project.", 3 );
 590  0
                 append( sb, "", 0 );
 591  
 
 592  0
                 append( sb, "skip (Default: false)", 2 );
 593  0
                 append( sb, "Skip the operation when true.", 3 );
 594  0
                 append( sb, "", 0 );
 595  
             }
 596  
         }
 597  
 
 598  0
         if ( goal == null || goal.length() <= 0 || "rad".equals( goal ) )
 599  
         {
 600  0
             append( sb, "eclipse:rad", 0 );
 601  0
             append( sb, "Generates the rad-6 configuration files.", 1 );
 602  0
             append( sb, "", 0 );
 603  0
             if ( detail )
 604  
             {
 605  0
                 append( sb, "Available parameters:", 1 );
 606  0
                 append( sb, "", 0 );
 607  
 
 608  0
                 append( sb, "addGroupIdToProjectName (Default: false)", 2 );
 609  0
                 append( sb, "If set to true, the groupId of the artifact is appended to the name of the generated Eclipse project. See projectNameTemplate for other options.", 3 );
 610  0
                 append( sb, "", 0 );
 611  
 
 612  0
                 append( sb, "addVersionToProjectName (Default: false)", 2 );
 613  0
                 append( sb, "If set to true, the version number of the artifact is appended to the name of the generated Eclipse project. See projectNameTemplate for other options.", 3 );
 614  0
                 append( sb, "", 0 );
 615  
 
 616  0
                 append( sb, "additionalBuildcommands", 2 );
 617  0
                 append( sb, "List of eclipse build commands to be added to the default ones. Old style:\n<additionalBuildcommands>\n<buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>\n</additionalBuildcommands>\nNew style:\n<additionalBuildcommands>\n<buildCommand>\n<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>\n<triggers>auto,full,incremental,</triggers>\n<arguments>\n<LaunchConfigHandle>&lt;project&gt;./externalToolBuilders/MavenBuilder.launch</LaunchConfighandle>\n</arguments>\n</buildCommand>\n</additionalBuildcommands>\nNote the difference between buildcommand and buildCommand. You can mix and match old and new-style configuration entries.", 3 );
 618  0
                 append( sb, "", 0 );
 619  
 
 620  0
                 append( sb, "additionalConfig", 2 );
 621  0
                 append( sb, "Allow to configure additional generic configuration files for eclipse that will be written out to disk when running eclipse:eclipse. FOr each file you can specify the name and the text content.\n<plugin>\n<groupId>org.apache.maven.plugins</groupId>\n<artifactId>maven-eclipse-plugin</artifactId>\n<configuration>\n<additionalConfig>\n<file>\n<name>.checkstyle</name>\n<content>\n<![CDATA[<fileset-config\u00a0file-format-version=\'1.2.0\'\u00a0simple-config=\'true\'>\n<fileset\u00a0name=\'all\'\u00a0enabled=\'true\'\u00a0check-config-name=\'acme\u00a0corporate\u00a0style\'\u00a0local=\'false\'>\n<file-match-pattern\u00a0match-pattern=\'.\'\u00a0include-pattern=\'true\'/>\n</fileset>\n<filter\u00a0name=\'NonSrcDirs\'\u00a0enabled=\'true\'/>\n</fileset-config>]]>\n</content>\n</file>\n</additionalConfig>\n</configuration>\n</plugin>\nInstead of the content you can also define (from version 2.5) an url to download the file :\n<plugin>\n<groupId>org.apache.maven.plugins</groupId>\n<artifactId>maven-eclipse-plugin</artifactId>\n<configuration>\n<additionalConfig>\n<file>\n<name>.checkstyle</name>\n<url>http://some.place.org/path/to/file</url>\n</file>\n</additionalConfig>\n</configuration>\nor a location :\n<plugin>\n<groupId>org.apache.maven.plugins</groupId>\n<artifactId>maven-eclipse-plugin</artifactId>\n<configuration>\n<additionalConfig>\n<file>\n<name>.checkstyle</name>\n<location>/checkstyle-config.xml</location>\n</file>\n</additionalConfig>\n</configuration>\n<dependencies>\n<!--\u00a0The\u00a0file\u00a0defined\u00a0in\u00a0the\u00a0location\u00a0is\u00a0stored\u00a0in\u00a0this\u00a0dependency\u00a0-->\n<dependency>\n<groupId>eclipsetest</groupId>\n<artifactId>checkstyle-config</artifactId>\n<version>1.0</version>\n</dependency>\n</dependencies>\n</plugin>\n", 3 );
 622  0
                 append( sb, "", 0 );
 623  
 
 624  0
                 append( sb, "additionalProjectFacets", 2 );
 625  0
                 append( sb, "List of eclipse project facets to be added to the default ones.\n<additionalProjectFacets>\n<jst.jsf>1.1<jst.jsf/>\n</additionalProjectFacets>\n", 3 );
 626  0
                 append( sb, "", 0 );
 627  
 
 628  0
                 append( sb, "additionalProjectnatures", 2 );
 629  0
                 append( sb, "List of eclipse project natures to be added to the default ones.\n<additionalProjectnatures>\n<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>\n</additionalProjectnatures>\n", 3 );
 630  0
                 append( sb, "", 0 );
 631  
 
 632  0
                 append( sb, "ajdtVersion (Default: none)", 2 );
 633  0
                 append( sb, "The version of AJDT for which configuration files will be generated. The default value is \'1.5\', supported versions are \'none\' (AJDT support disabled), \'1.4\', and \'1.5\'.", 3 );
 634  0
                 append( sb, "", 0 );
 635  
 
 636  0
                 append( sb, "buildOutputDirectory (Default: ${project.build.outputDirectory})", 2 );
 637  0
                 append( sb, "The default output directory", 3 );
 638  0
                 append( sb, "", 0 );
 639  
 
 640  0
                 append( sb, "buildcommands", 2 );
 641  0
                 append( sb, "List of eclipse build commands. By default the 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:\n<buildcommands>\n<buildcommand>org.eclipse.wst.common.modulecore.ComponentStructuralBuilder</buildcommand>\n<buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>\n<buildcommand>org.eclipse.wst.common.modulecore.ComponentStructuralBuilderDependencyResolver</buildcommand>\n</buildcommands>\nFor new style, see additionalBuildCommands.", 3 );
 642  0
                 append( sb, "", 0 );
 643  
 
 644  0
                 append( sb, "classpathContainers", 2 );
 645  0
                 append( sb, "List of container classpath entries. By default the org.eclipse.jdt.launching.JRE_CONTAINER classpath container is added. Configuration example:\n<classpathContainers>\n<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>\n<classpathContainer>org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache\u00a0Tomcat\u00a0v5.5</classpathContainer>\n<classpathContainer>org.eclipse.jst.j2ee.internal.web.container/artifact</classpathContainer>\n</classpathContainers>\n", 3 );
 646  0
                 append( sb, "", 0 );
 647  
 
 648  0
                 append( sb, "classpathContainersLast (Default: false)", 2 );
 649  0
                 append( sb, "Put classpath container entries last in eclipse classpath configuration. Note that this behaviour, although useful in situations were you want to override resources found in classpath containers, will made JRE classes loaded after 3rd party jars, so enabling it is not suggested.", 3 );
 650  0
                 append( sb, "", 0 );
 651  
 
 652  0
                 append( sb, "downloadJavadocs", 2 );
 653  0
                 append( sb, "Enables/disables the downloading of javadoc attachments. Defaults to false. When this flag is true remote repositories are checked for javadocs: in order to avoid repeated check for unavailable javadoc archives, a status cache is mantained. With versions 2.6+ of the plugin to reset this cache run mvn eclipse:remove-cache, or use the forceRecheck option with versions. With older versions delete the file mvn-eclipse-cache.properties in the target directory.", 3 );
 654  0
                 append( sb, "", 0 );
 655  
 
 656  0
                 append( sb, "downloadSources", 2 );
 657  0
                 append( sb, "Enables/disables the downloading of source attachments. Defaults to false. When this flag is true remote repositories are checked for sources: in order to avoid repeated check for unavailable source archives, a status cache is mantained. With versions 2.6+ of the plugin to reset this cache run mvn eclipse:remove-cache, or use the forceRecheck option with versions. With older versions delete the file mvn-eclipse-cache.properties in the target directory.", 3 );
 658  0
                 append( sb, "", 0 );
 659  
 
 660  0
                 append( sb, "eclipseDownloadSources", 2 );
 661  0
                 append( sb, "Deprecated. use downloadSources", 3 );
 662  0
                 append( sb, "", 0 );
 663  0
                 append( sb, "Enables/disables the downloading of source attachments. Defaults to false. DEPRECATED - use downloadSources", 3 );
 664  0
                 append( sb, "", 0 );
 665  
 
 666  0
                 append( sb, "eclipseProjectDir", 2 );
 667  0
                 append( sb, "Eclipse workspace directory.", 3 );
 668  0
                 append( sb, "", 0 );
 669  
 
 670  0
                 append( sb, "excludes", 2 );
 671  0
                 append( sb, "List of artifacts, represented as groupId:artifactId, to exclude from the eclipse classpath, being provided by some eclipse classPathContainer.", 3 );
 672  0
                 append( sb, "", 0 );
 673  
 
 674  0
                 append( sb, "forceRecheck", 2 );
 675  0
                 append( sb, "Enables/disables the rechecking of the remote repository for downloading source/javadoc attachments. Defaults to false. When this flag is true and the source or javadoc attachment has a status cache to indicate that it is not available, then the remote repository will be rechecked for a source or javadoc attachment and the status cache updated to reflect the new state.", 3 );
 676  0
                 append( sb, "", 0 );
 677  
 
 678  0
                 append( sb, "generatedResourceDirName (Default: target/generated-resources/rad6)", 2 );
 679  0
                 append( sb, "Use this to specify a different generated resources folder than target/generated-resources/rad6. Set to \'none\' to skip this folder generation.", 3 );
 680  0
                 append( sb, "", 0 );
 681  
 
 682  0
                 append( sb, "jeeversion", 2 );
 683  0
                 append( sb, "The plugin is often capable in predicting the required jee version based on the dependencies of the project. By setting this parameter to one of the jeeversion options the version will be locked. \njeeversion\nEJB version\nServlet version\nJSP version\n6.0\n3.1\n3.0\n2.2\n5.0\n3.0\n2.5\n2.1\n1.4\n2.1\n2.4\n2.0\n1.3\n2.0\n2.3\n1.2\n1.2\n1.1\n2.2\n1.1", 3 );
 684  0
                 append( sb, "", 0 );
 685  
 
 686  0
                 append( sb, "limitProjectReferencesToWorkspace (Default: false)", 2 );
 687  0
                 append( sb, "Limit the use of project references to the current workspace. No project references will be created to projects in the reactor when they are not available in the workspace.", 3 );
 688  0
                 append( sb, "", 0 );
 689  
 
 690  0
                 append( sb, "linkedResources", 2 );
 691  0
                 append( sb, "A list of links to local files in the system. A configuration like this one in the pom :\n<plugin>\n<groupId>org.apache.maven.plugins</groupId>\n<artifactId>maven-eclipse-plugin</artifactId>\n<configuration>\n<linkedResources>\n<linkedResource>\n<name>src/test/resources/oracle-ds.xml</name>\n<type>1</type>\n<location>C://jboss/server/default/deploy/oracle-ds.xml</location>\n</linkedResource>\n</linkedResources>\n</configuration>\n</plugin>\nwill produce in the .project :\n<linkedResources>\n<link>\n<name>src/test/resources/oracle-ds.xml</name>\n<type>1</type>\n<location>C://jboss/server/default/deploy/oracle-ds.xml</location>\n</link>\n</linkedResources>\n", 3 );
 692  0
                 append( sb, "", 0 );
 693  
 
 694  0
                 append( sb, "manifest (Default: ${basedir}/META-INF/MANIFEST.MF)", 2 );
 695  0
                 append( sb, "The relative path of the manifest file", 3 );
 696  0
                 append( sb, "", 0 );
 697  
 
 698  0
                 append( sb, "packaging", 2 );
 699  0
                 append( sb, "The project packaging.", 3 );
 700  0
                 append( sb, "", 0 );
 701  
 
 702  0
                 append( sb, "pde (Default: false)", 2 );
 703  0
                 append( sb, "Is it an PDE project? If yes, the plugin adds the necessary natures and build commands to the .project file. Additionally it copies all libraries to a project local directory and references them instead of referencing the files in the local Maven repository. It also ensured that the \'Bundle-Classpath\' in META-INF/MANIFEST.MF is synchronized.", 3 );
 704  0
                 append( sb, "", 0 );
 705  
 
 706  0
                 append( sb, "projectNameTemplate", 2 );
 707  0
                 append( sb, "Allows configuring the name of the eclipse projects. This property if set wins over addVersionToProjectName and addGroupIdToProjectName You can use [groupId], [artifactId] and [version] variables. eg. [groupId].[artifactId]-[version]", 3 );
 708  0
                 append( sb, "", 0 );
 709  
 
 710  0
                 append( sb, "projectnatures", 2 );
 711  0
                 append( sb, "List of eclipse project natures. By default the org.eclipse.jdt.core.javanature nature plus the needed WTP natures are added. Natures added using this property replace the default list.\n<projectnatures>\n<projectnature>org.eclipse.jdt.core.javanature</projectnature>\n<projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>\n</projectnatures>\n", 3 );
 712  0
                 append( sb, "", 0 );
 713  
 
 714  0
                 append( sb, "skip (Default: false)", 2 );
 715  0
                 append( sb, "Skip the operation when true.", 3 );
 716  0
                 append( sb, "", 0 );
 717  
 
 718  0
                 append( sb, "sourceExcludes", 2 );
 719  0
                 append( sb, "List of exclusions to add to the source directories on the classpath. Adds excluding=\'\' to the classpathentry of the eclipse .classpath file. [MECLIPSE-104]", 3 );
 720  0
                 append( sb, "", 0 );
 721  
 
 722  0
                 append( sb, "sourceIncludes", 2 );
 723  0
                 append( sb, "List of inclusions to add to the source directories on the classpath. Adds including=\'\' to the classpathentry of the eclipse .classpath file.\nJava projects will always include \'**/*.java\'\n\nAjdt projects will always include \'**/*.aj\'\n\n[MECLIPSE-104]\n", 3 );
 724  0
                 append( sb, "", 0 );
 725  
 
 726  0
                 append( sb, "testSourcesLast (Default: false)", 2 );
 727  0
                 append( sb, "Whether to place test resources after main resources. Note that the default behavior of Maven version 2.0.8 or later is to have test dirs before main dirs in classpath so this is discouraged if you need to reproduce the maven behavior during tests. The default behavior is also changed in eclipse plugin version 2.6 in order to better match the maven one. Switching to \'test source last\' can anyway be useful if you need to run your application in eclipse, since there is no concept in eclipse of \'phases\' with different set of source dirs and dependencies like we have in maven.", 3 );
 728  0
                 append( sb, "", 0 );
 729  
 
 730  0
                 append( sb, "useProjectReferences (Default: true)", 2 );
 731  0
                 append( sb, "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", 3 );
 732  0
                 append( sb, "", 0 );
 733  
 
 734  0
                 append( sb, "warContextRoot", 2 );
 735  0
                 append( sb, "The context root of the webapplication. This parameter is only used when the current project is a war project, else it will be ignored.", 3 );
 736  0
                 append( sb, "", 0 );
 737  
 
 738  0
                 append( sb, "workspace", 2 );
 739  0
                 append( sb, "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. Requirement is that it was created with the similar wtp settings as the reactor projects, but the project name template my differ. The pom\'s in the workspace projects may not contain variables in the artefactId, groupId and version tags. If workspace is not defined, then an attempt to locate it by checking up the directory hierarchy will be made.", 3 );
 740  0
                 append( sb, "", 0 );
 741  
 
 742  0
                 append( sb, "wtpContextName", 2 );
 743  0
                 append( sb, "JEE context name of the WTP module. ( ex. WEB context name ). You can use \'ROOT\' if you want to map the webapp to the root context.", 3 );
 744  0
                 append( sb, "", 0 );
 745  
 
 746  0
                 append( sb, "wtpapplicationxml (Default: false)", 2 );
 747  0
                 append( sb, "Must the application files be written for ear projects in a separate directory.", 3 );
 748  0
                 append( sb, "", 0 );
 749  
 
 750  0
                 append( sb, "wtpdefaultserver", 2 );
 751  0
                 append( sb, "What WTP defined server to use for deployment informations.", 3 );
 752  0
                 append( sb, "", 0 );
 753  
 
 754  0
                 append( sb, "wtpmanifest (Default: false)", 2 );
 755  0
                 append( sb, "Must the manifest files be written for java projects so that that the jee classpath for wtp is correct.", 3 );
 756  0
                 append( sb, "", 0 );
 757  
 
 758  0
                 append( sb, "wtpversion (Default: none)", 2 );
 759  0
                 append( sb, "The version of WTP for which configuration files will be generated. The default value is \'none\' (don\'t generate WTP configuration), supported versions are \'R7\', \'1.0\', \'1.5\' and \'2.0\'", 3 );
 760  0
                 append( sb, "", 0 );
 761  
             }
 762  
         }
 763  
 
 764  0
         if ( goal == null || goal.length() <= 0 || "rad-clean".equals( goal ) )
 765  
         {
 766  0
             append( sb, "eclipse:rad-clean", 0 );
 767  0
             append( sb, "Deletes the config files used by Rad-6. the files .j2ee and the file .websettings", 1 );
 768  0
             append( sb, "", 0 );
 769  0
             if ( detail )
 770  
             {
 771  0
                 append( sb, "Available parameters:", 1 );
 772  0
                 append( sb, "", 0 );
 773  
 
 774  0
                 append( sb, "additionalConfig", 2 );
 775  0
                 append( sb, "additional generic configuration files for eclipse", 3 );
 776  0
                 append( sb, "", 0 );
 777  
 
 778  0
                 append( sb, "basedir", 2 );
 779  0
                 append( sb, "The root directory of the project", 3 );
 780  0
                 append( sb, "", 0 );
 781  
 
 782  0
                 append( sb, "packaging", 2 );
 783  0
                 append( sb, "Packaging for the current project.", 3 );
 784  0
                 append( sb, "", 0 );
 785  
 
 786  0
                 append( sb, "skip (Default: false)", 2 );
 787  0
                 append( sb, "Skip the operation when true.", 3 );
 788  0
                 append( sb, "", 0 );
 789  
             }
 790  
         }
 791  
 
 792  0
         if ( goal == null || goal.length() <= 0 || "remove-cache".equals( goal ) )
 793  
         {
 794  0
             append( sb, "eclipse:remove-cache", 0 );
 795  0
             append( sb, "Removes the not-available marker files from the repository.", 1 );
 796  0
             append( sb, "", 0 );
 797  0
             if ( detail )
 798  
             {
 799  0
                 append( sb, "Available parameters:", 1 );
 800  0
                 append( sb, "", 0 );
 801  
             }
 802  
         }
 803  
 
 804  0
         if ( goal == null || goal.length() <= 0 || "to-maven".equals( goal ) )
 805  
         {
 806  0
             append( sb, "eclipse:to-maven", 0 );
 807  0
             append( sb, "Add eclipse artifacts from an eclipse installation to the local repo. This mojo automatically analize the eclipse directory, copy plugins jars to the local maven repo, and generates appropriate poms. This is the official central repository builder for Eclipse plugins, so it has the necessary default values. For customized repositories see MakeArtifactsMojo Typical usage: mvn eclipse:to-maven -DdeployTo=maven.org::default::scpexe://repo1.maven.org/home/maven/repository-staging/to-ibiblio/eclipse-staging -DeclipseDir=.", 1 );
 808  0
             append( sb, "", 0 );
 809  0
             if ( detail )
 810  
             {
 811  0
                 append( sb, "Available parameters:", 1 );
 812  0
                 append( sb, "", 0 );
 813  
 
 814  0
                 append( sb, "deployTo", 2 );
 815  0
                 append( sb, "Specifies a remote repository to which generated artifacts should be deployed to. If this property is specified, artifacts are also deployed to the remote repo. The format for this parameter is id::layout::url", 3 );
 816  0
                 append( sb, "", 0 );
 817  
 
 818  0
                 append( sb, "eclipseDir", 2 );
 819  0
                 append( sb, "Eclipse installation dir. If not set, a value for this parameter will be asked on the command line.", 3 );
 820  0
                 append( sb, "", 0 );
 821  
 
 822  0
                 append( sb, "stripQualifier (Default: false)", 2 );
 823  0
                 append( sb, "Strip qualifier (fourth token) from the plugin version. Qualifiers are for eclipse plugin the equivalent of timestamped snapshot versions for Maven, but the date is maintained also for released version (e.g. a jar for the release 3.2 can be named org.eclipse.core.filesystem_1.0.0.v20060603.jar. It\'s usually handy to not to include this qualifier when generating maven artifacts for major releases, while it\'s needed when working with eclipse integration/nightly builds.", 3 );
 824  0
                 append( sb, "", 0 );
 825  
             }
 826  
         }
 827  
 
 828  0
         if ( getLog().isInfoEnabled() )
 829  
         {
 830  0
             getLog().info( sb.toString() );
 831  
         }
 832  0
     }
 833  
 
 834  
     /**
 835  
      * <p>Repeat a String <code>n</code> times to form a new string.</p>
 836  
      *
 837  
      * @param str String to repeat
 838  
      * @param repeat number of times to repeat str
 839  
      * @return String with repeated String
 840  
      * @throws NegativeArraySizeException if <code>repeat < 0</code>
 841  
      * @throws NullPointerException if str is <code>null</code>
 842  
      */
 843  
     private static String repeat( String str, int repeat )
 844  
     {
 845  0
         StringBuffer buffer = new StringBuffer( repeat * str.length() );
 846  
 
 847  0
         for ( int i = 0; i < repeat; i++ )
 848  
         {
 849  0
             buffer.append( str );
 850  
         }
 851  
 
 852  0
         return buffer.toString();
 853  
     }
 854  
 
 855  
     /** 
 856  
      * Append a description to the buffer by respecting the indentSize and lineLength parameters.
 857  
      * <b>Note</b>: The last character is always a new line.
 858  
      * 
 859  
      * @param sb The buffer to append the description, not <code>null</code>.
 860  
      * @param description The description, not <code>null</code>.
 861  
      * @param indent The base indentation level of each line, must not be negative.
 862  
      */
 863  
     private void append( StringBuffer sb, String description, int indent )
 864  
     {
 865  0
         for ( Iterator it = toLines( description, indent, indentSize, lineLength ).iterator(); it.hasNext(); )
 866  
         {
 867  0
             sb.append( it.next().toString() ).append( '\n' );
 868  
         }
 869  0
     }
 870  
 
 871  
     /** 
 872  
      * Splits the specified text into lines of convenient display length.
 873  
      * 
 874  
      * @param text The text to split into lines, must not be <code>null</code>.
 875  
      * @param indent The base indentation level of each line, must not be negative.
 876  
      * @param indentSize The size of each indentation, must not be negative.
 877  
      * @param lineLength The length of the line, must not be negative.
 878  
      * @return The sequence of display lines, never <code>null</code>.
 879  
      * @throws NegativeArraySizeException if <code>indent < 0</code>
 880  
      */
 881  
     private static List toLines( String text, int indent, int indentSize, int lineLength )
 882  
     {
 883  0
         List lines = new ArrayList();
 884  
 
 885  0
         String ind = repeat( "\t", indent );
 886  0
         String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" );
 887  0
         for ( int i = 0; i < plainLines.length; i++ )
 888  
         {
 889  0
             toLines( lines, ind + plainLines[i], indentSize, lineLength );
 890  
         }
 891  
 
 892  0
         return lines;
 893  
     }
 894  
 
 895  
     /** 
 896  
      * Adds the specified line to the output sequence, performing line wrapping if necessary.
 897  
      * 
 898  
      * @param lines The sequence of display lines, must not be <code>null</code>.
 899  
      * @param line The line to add, must not be <code>null</code>.
 900  
      * @param indentSize The size of each indentation, must not be negative.
 901  
      * @param lineLength The length of the line, must not be negative.
 902  
      */
 903  
     private static void toLines( List lines, String line, int indentSize, int lineLength )
 904  
     {
 905  0
         int lineIndent = getIndentLevel( line );
 906  0
         StringBuffer buf = new StringBuffer( 256 );
 907  0
         String[] tokens = line.split( " +" );
 908  0
         for ( int i = 0; i < tokens.length; i++ )
 909  
         {
 910  0
             String token = tokens[i];
 911  0
             if ( i > 0 )
 912  
             {
 913  0
                 if ( buf.length() + token.length() >= lineLength )
 914  
                 {
 915  0
                     lines.add( buf.toString() );
 916  0
                     buf.setLength( 0 );
 917  0
                     buf.append( repeat( " ", lineIndent * indentSize ) );
 918  
                 }
 919  
                 else
 920  
                 {
 921  0
                     buf.append( ' ' );
 922  
                 }
 923  
             }
 924  0
             for ( int j = 0; j < token.length(); j++ )
 925  
             {
 926  0
                 char c = token.charAt( j );
 927  0
                 if ( c == '\t' )
 928  
                 {
 929  0
                     buf.append( repeat( " ", indentSize - buf.length() % indentSize ) );
 930  
                 }
 931  0
                 else if ( c == '\u00A0' )
 932  
                 {
 933  0
                     buf.append( ' ' );
 934  
                 }
 935  
                 else
 936  
                 {
 937  0
                     buf.append( c );
 938  
                 }
 939  
             }
 940  
         }
 941  0
         lines.add( buf.toString() );
 942  0
     }
 943  
 
 944  
     /** 
 945  
      * Gets the indentation level of the specified line.
 946  
      * 
 947  
      * @param line The line whose indentation level should be retrieved, must not be <code>null</code>.
 948  
      * @return The indentation level of the line.
 949  
      */
 950  
     private static int getIndentLevel( String line )
 951  
     {
 952  0
         int level = 0;
 953  0
         for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ )
 954  
         {
 955  0
             level++;
 956  
         }
 957  0
         for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ )
 958  
         {
 959  0
             if ( line.charAt( i ) == '\t' )
 960  
             {
 961  0
                 level++;
 962  0
                 break;
 963  
             }
 964  
         }
 965  0
         return level;
 966  
     }
 967  
 }