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
12
13
14
15
16
17
18 public class HelpMojo
19 extends AbstractMojo
20 {
21
22
23
24
25
26 private boolean detail;
27
28
29
30
31
32
33 private java.lang.String goal;
34
35
36
37
38
39
40 private int lineLength;
41
42
43
44
45
46
47 private int indentSize;
48
49
50
51 public void execute()
52 throws MojoExecutionException
53 {
54 if ( lineLength <= 0 )
55 {
56 getLog().warn( "The parameter 'lineLength' should be positive, using '80' as default." );
57 lineLength = 80;
58 }
59 if ( indentSize <= 0 )
60 {
61 getLog().warn( "The parameter 'indentSize' should be positive, using '2' as default." );
62 indentSize = 2;
63 }
64
65 StringBuffer sb = new StringBuffer();
66
67 append( sb, "org.apache.maven.plugins:maven-eclipse-plugin:2.9", 0 );
68 append( sb, "", 0 );
69
70 append( sb, "Maven Eclipse Plugin 2.9", 0 );
71 append( sb, "The Eclipse Plugin is used to generate Eclipse IDE files (.project, .classpath and the .settings folder) from a POM.", 1 );
72 append( sb, "", 0 );
73
74 if ( goal == null || goal.length() <= 0 )
75 {
76 append( sb, "This plugin has 13 goals:", 0 );
77 append( sb, "", 0 );
78 }
79
80 if ( goal == null || goal.length() <= 0 || "add-maven-repo".equals( goal ) )
81 {
82 append( sb, "eclipse:add-maven-repo", 0 );
83 append( sb, "Deprecated. Use configure-workspace goal instead.", 1 );
84 if ( detail )
85 {
86 append( sb, "", 0 );
87 append( sb, "Adds the classpath variable M2_REPO to Eclipse. DEPRECATED. Replaced by eclipse:configure-workspace.", 1 );
88 }
89 append( sb, "", 0 );
90 if ( detail )
91 {
92 append( sb, "Available parameters:", 1 );
93 append( sb, "", 0 );
94
95 append( sb, "workspace", 2 );
96 append( sb, "Directory location of the Eclipse workspace.", 3 );
97 append( sb, "", 0 );
98 }
99 }
100
101 if ( goal == null || goal.length() <= 0 || "clean".equals( goal ) )
102 {
103 append( sb, "eclipse:clean", 0 );
104 append( sb, "Deletes the .project, .classpath, .wtpmodules files and .settings folder used by Eclipse.", 1 );
105 append( sb, "", 0 );
106 if ( detail )
107 {
108 append( sb, "Available parameters:", 1 );
109 append( sb, "", 0 );
110
111 append( sb, "additionalConfig", 2 );
112 append( sb, "additional generic configuration files for eclipse", 3 );
113 append( sb, "", 0 );
114
115 append( sb, "basedir", 2 );
116 append( sb, "The root directory of the project", 3 );
117 append( sb, "", 0 );
118
119 append( sb, "packaging", 2 );
120 append( sb, "Packaging for the current project.", 3 );
121 append( sb, "", 0 );
122
123 append( sb, "skip (Default: false)", 2 );
124 append( sb, "Skip the operation when true.", 3 );
125 append( sb, "", 0 );
126 }
127 }
128
129 if ( goal == null || goal.length() <= 0 || "configure-workspace".equals( goal ) )
130 {
131 append( sb, "eclipse:configure-workspace", 0 );
132 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 append( sb, "", 0 );
134 if ( detail )
135 {
136 append( sb, "Available parameters:", 1 );
137 append( sb, "", 0 );
138
139 append( sb, "workspace", 2 );
140 append( sb, "Directory location of the Eclipse workspace.", 3 );
141 append( sb, "", 0 );
142
143 append( sb, "workspaceActiveCodeStyleProfileName", 2 );
144 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 append( sb, "", 0 );
146
147 append( sb, "workspaceCodeStylesURL", 2 );
148 append( sb, "Point to a URL containing code styles content.", 3 );
149 append( sb, "", 0 );
150 }
151 }
152
153 if ( goal == null || goal.length() <= 0 || "eclipse".equals( goal ) )
154 {
155 append( sb, "eclipse:eclipse", 0 );
156 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 append( sb, "", 0 );
158 if ( detail )
159 {
160 append( sb, "Available parameters:", 1 );
161 append( sb, "", 0 );
162
163 append( sb, "addGroupIdToProjectName (Default: false)", 2 );
164 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 append( sb, "", 0 );
166
167 append( sb, "addVersionToProjectName (Default: false)", 2 );
168 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 append( sb, "", 0 );
170
171 append( sb, "additionalBuildcommands", 2 );
172 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><project>./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 append( sb, "", 0 );
174
175 append( sb, "additionalConfig", 2 );
176 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 append( sb, "", 0 );
178
179 append( sb, "additionalProjectFacets", 2 );
180 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 append( sb, "", 0 );
182
183 append( sb, "additionalProjectnatures", 2 );
184 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 append( sb, "", 0 );
186
187 append( sb, "ajdtVersion (Default: none)", 2 );
188 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 append( sb, "", 0 );
190
191 append( sb, "buildOutputDirectory (Default: ${project.build.outputDirectory})", 2 );
192 append( sb, "The default output directory", 3 );
193 append( sb, "", 0 );
194
195 append( sb, "buildcommands", 2 );
196 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 append( sb, "", 0 );
198
199 append( sb, "classpathContainers", 2 );
200 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 append( sb, "", 0 );
202
203 append( sb, "classpathContainersLast (Default: false)", 2 );
204 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 append( sb, "", 0 );
206
207 append( sb, "downloadJavadocs", 2 );
208 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 append( sb, "", 0 );
210
211 append( sb, "downloadSources", 2 );
212 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 append( sb, "", 0 );
214
215 append( sb, "eclipseDownloadSources", 2 );
216 append( sb, "Deprecated. use downloadSources", 3 );
217 append( sb, "", 0 );
218 append( sb, "Enables/disables the downloading of source attachments. Defaults to false. DEPRECATED - use downloadSources", 3 );
219 append( sb, "", 0 );
220
221 append( sb, "eclipseProjectDir", 2 );
222 append( sb, "Eclipse workspace directory.", 3 );
223 append( sb, "", 0 );
224
225 append( sb, "excludes", 2 );
226 append( sb, "List of artifacts, represented as groupId:artifactId, to exclude from the eclipse classpath, being provided by some eclipse classPathContainer.", 3 );
227 append( sb, "", 0 );
228
229 append( sb, "forceRecheck", 2 );
230 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 append( sb, "", 0 );
232
233 append( sb, "jeeversion", 2 );
234 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 append( sb, "", 0 );
236
237 append( sb, "limitProjectReferencesToWorkspace (Default: false)", 2 );
238 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 append( sb, "", 0 );
240
241 append( sb, "linkedResources", 2 );
242 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 append( sb, "", 0 );
244
245 append( sb, "manifest (Default: ${basedir}/META-INF/MANIFEST.MF)", 2 );
246 append( sb, "The relative path of the manifest file", 3 );
247 append( sb, "", 0 );
248
249 append( sb, "packaging", 2 );
250 append( sb, "The project packaging.", 3 );
251 append( sb, "", 0 );
252
253 append( sb, "pde (Default: false)", 2 );
254 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 append( sb, "", 0 );
256
257 append( sb, "projectNameTemplate", 2 );
258 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 append( sb, "", 0 );
260
261 append( sb, "projectnatures", 2 );
262 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 append( sb, "", 0 );
264
265 append( sb, "skip (Default: false)", 2 );
266 append( sb, "Skip the operation when true.", 3 );
267 append( sb, "", 0 );
268
269 append( sb, "sourceExcludes", 2 );
270 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 append( sb, "", 0 );
272
273 append( sb, "sourceIncludes", 2 );
274 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 append( sb, "", 0 );
276
277 append( sb, "testSourcesLast (Default: false)", 2 );
278 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 append( sb, "", 0 );
280
281 append( sb, "useProjectReferences (Default: true)", 2 );
282 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 append( sb, "", 0 );
284
285 append( sb, "workspace", 2 );
286 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 append( sb, "", 0 );
288
289 append( sb, "wtpContextName", 2 );
290 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 append( sb, "", 0 );
292
293 append( sb, "wtpapplicationxml (Default: false)", 2 );
294 append( sb, "Must the application files be written for ear projects in a separate directory.", 3 );
295 append( sb, "", 0 );
296
297 append( sb, "wtpdefaultserver", 2 );
298 append( sb, "What WTP defined server to use for deployment informations.", 3 );
299 append( sb, "", 0 );
300
301 append( sb, "wtpmanifest (Default: false)", 2 );
302 append( sb, "Must the manifest files be written for java projects so that that the jee classpath for wtp is correct.", 3 );
303 append( sb, "", 0 );
304
305 append( sb, "wtpversion (Default: none)", 2 );
306 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 append( sb, "", 0 );
308 }
309 }
310
311 if ( goal == null || goal.length() <= 0 || "help".equals( goal ) )
312 {
313 append( sb, "eclipse:help", 0 );
314 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 append( sb, "", 0 );
316 if ( detail )
317 {
318 append( sb, "Available parameters:", 1 );
319 append( sb, "", 0 );
320
321 append( sb, "detail (Default: false)", 2 );
322 append( sb, "If true, display all settable properties for each goal.", 3 );
323 append( sb, "", 0 );
324
325 append( sb, "goal", 2 );
326 append( sb, "The name of the goal for which to show help. If unspecified, all goals will be displayed.", 3 );
327 append( sb, "", 0 );
328
329 append( sb, "lineLength (Default: 80)", 2 );
330 append( sb, "The maximum length of a display line, should be positive.", 3 );
331 append( sb, "", 0 );
332
333 append( sb, "indentSize (Default: 2)", 2 );
334 append( sb, "The number of spaces per indentation level, should be positive.", 3 );
335 append( sb, "", 0 );
336 }
337 }
338
339 if ( goal == null || goal.length() <= 0 || "install-plugins".equals( goal ) )
340 {
341 append( sb, "eclipse:install-plugins", 0 );
342 append( sb, "Install plugins resolved from the Maven repository system into an Eclipse instance.", 1 );
343 append( sb, "", 0 );
344 if ( detail )
345 {
346 append( sb, "Available parameters:", 1 );
347 append( sb, "", 0 );
348
349 append( sb, "eclipseDir", 2 );
350 append( sb, "This is the installed base directory of the Eclipse instance you want to modify.", 3 );
351 append( sb, "", 0 );
352
353 append( sb, "overwrite (Default: false)", 2 );
354 append( sb, "Determines whether this mojo leaves existing installed plugins as-is, or overwrites them.", 3 );
355 append( sb, "", 0 );
356
357 append( sb, "pluginDependencyTypes (Default: jar)", 2 );
358 append( sb, "Comma-delimited list of dependency <type/> values which will be installed in the eclipse instance\'s plugins directory.", 3 );
359 append( sb, "", 0 );
360 }
361 }
362
363 if ( goal == null || goal.length() <= 0 || "make-artifacts".equals( goal ) )
364 {
365 append( sb, "eclipse:make-artifacts", 0 );
366 append( sb, "Deprecated. use EclipseToMavenMojo for the latest naming conventions", 1 );
367 if ( detail )
368 {
369 append( sb, "", 0 );
370 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 append( sb, "", 0 );
373 if ( detail )
374 {
375 append( sb, "Available parameters:", 1 );
376 append( sb, "", 0 );
377
378 append( sb, "deployTo", 2 );
379 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 append( sb, "", 0 );
381
382 append( sb, "eclipseDir", 2 );
383 append( sb, "Eclipse installation dir. If not set, a value for this parameter will be asked on the command line.", 3 );
384 append( sb, "", 0 );
385
386 append( sb, "forcedQualifier", 2 );
387 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 append( sb, "", 0 );
389
390 append( sb, "resolveVersionRanges (Default: false)", 2 );
391 append( sb, "Resolve version ranges in generated pom dependencies to versions of the other plugins being converted", 3 );
392 append( sb, "", 0 );
393
394 append( sb, "stripQualifier (Default: true)", 2 );
395 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 append( sb, "", 0 );
397 }
398 }
399
400 if ( goal == null || goal.length() <= 0 || "myeclipse".equals( goal ) )
401 {
402 append( sb, "eclipse:myeclipse", 0 );
403 append( sb, "Generates MyEclipse configuration files", 1 );
404 append( sb, "", 0 );
405 if ( detail )
406 {
407 append( sb, "Available parameters:", 1 );
408 append( sb, "", 0 );
409
410 append( sb, "addGroupIdToProjectName (Default: false)", 2 );
411 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 append( sb, "", 0 );
413
414 append( sb, "addVersionToProjectName (Default: false)", 2 );
415 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 append( sb, "", 0 );
417
418 append( sb, "additionalBuildcommands", 2 );
419 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><project>./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 append( sb, "", 0 );
421
422 append( sb, "additionalConfig", 2 );
423 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 append( sb, "", 0 );
425
426 append( sb, "additionalProjectFacets", 2 );
427 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 append( sb, "", 0 );
429
430 append( sb, "additionalProjectnatures", 2 );
431 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 append( sb, "", 0 );
433
434 append( sb, "ajdtVersion (Default: none)", 2 );
435 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 append( sb, "", 0 );
437
438 append( sb, "buildOutputDirectory (Default: ${project.build.outputDirectory})", 2 );
439 append( sb, "The default output directory", 3 );
440 append( sb, "", 0 );
441
442 append( sb, "buildcommands", 2 );
443 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 append( sb, "", 0 );
445
446 append( sb, "classpathContainers", 2 );
447 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 append( sb, "", 0 );
449
450 append( sb, "classpathContainersLast (Default: false)", 2 );
451 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 append( sb, "", 0 );
453
454 append( sb, "downloadJavadocs", 2 );
455 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 append( sb, "", 0 );
457
458 append( sb, "downloadSources", 2 );
459 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 append( sb, "", 0 );
461
462 append( sb, "eclipseDownloadSources", 2 );
463 append( sb, "Deprecated. use downloadSources", 3 );
464 append( sb, "", 0 );
465 append( sb, "Enables/disables the downloading of source attachments. Defaults to false. DEPRECATED - use downloadSources", 3 );
466 append( sb, "", 0 );
467
468 append( sb, "eclipseProjectDir", 2 );
469 append( sb, "Eclipse workspace directory.", 3 );
470 append( sb, "", 0 );
471
472 append( sb, "excludes", 2 );
473 append( sb, "List of artifacts, represented as groupId:artifactId, to exclude from the eclipse classpath, being provided by some eclipse classPathContainer.", 3 );
474 append( sb, "", 0 );
475
476 append( sb, "forceRecheck", 2 );
477 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 append( sb, "", 0 );
479
480 append( sb, "hibernate", 2 );
481 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 append( sb, "", 0 );
483
484 append( sb, "jeeversion", 2 );
485 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 append( sb, "", 0 );
487
488 append( sb, "limitProjectReferencesToWorkspace (Default: false)", 2 );
489 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 append( sb, "", 0 );
491
492 append( sb, "linkedResources", 2 );
493 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 append( sb, "", 0 );
495
496 append( sb, "manifest (Default: ${basedir}/META-INF/MANIFEST.MF)", 2 );
497 append( sb, "The relative path of the manifest file", 3 );
498 append( sb, "", 0 );
499
500 append( sb, "packaging", 2 );
501 append( sb, "The project packaging.", 3 );
502 append( sb, "", 0 );
503
504 append( sb, "pde (Default: false)", 2 );
505 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 append( sb, "", 0 );
507
508 append( sb, "projectNameTemplate", 2 );
509 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 append( sb, "", 0 );
511
512 append( sb, "projectnatures", 2 );
513 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 append( sb, "", 0 );
515
516 append( sb, "skip (Default: false)", 2 );
517 append( sb, "Skip the operation when true.", 3 );
518 append( sb, "", 0 );
519
520 append( sb, "sourceExcludes", 2 );
521 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 append( sb, "", 0 );
523
524 append( sb, "sourceIncludes", 2 );
525 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 append( sb, "", 0 );
527
528 append( sb, "spring", 2 );
529 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 append( sb, "", 0 );
531
532 append( sb, "struts", 2 );
533 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 append( sb, "", 0 );
535
536 append( sb, "testSourcesLast (Default: false)", 2 );
537 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 append( sb, "", 0 );
539
540 append( sb, "useProjectReferences (Default: true)", 2 );
541 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 append( sb, "", 0 );
543
544 append( sb, "workspace", 2 );
545 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 append( sb, "", 0 );
547
548 append( sb, "wtpContextName", 2 );
549 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 append( sb, "", 0 );
551
552 append( sb, "wtpapplicationxml (Default: false)", 2 );
553 append( sb, "Must the application files be written for ear projects in a separate directory.", 3 );
554 append( sb, "", 0 );
555
556 append( sb, "wtpdefaultserver", 2 );
557 append( sb, "What WTP defined server to use for deployment informations.", 3 );
558 append( sb, "", 0 );
559
560 append( sb, "wtpmanifest (Default: false)", 2 );
561 append( sb, "Must the manifest files be written for java projects so that that the jee classpath for wtp is correct.", 3 );
562 append( sb, "", 0 );
563
564 append( sb, "wtpversion (Default: none)", 2 );
565 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 append( sb, "", 0 );
567 }
568 }
569
570 if ( goal == null || goal.length() <= 0 || "myeclipse-clean".equals( goal ) )
571 {
572 append( sb, "eclipse:myeclipse-clean", 0 );
573 append( sb, "Deletes configuration files used by MyEclipse", 1 );
574 append( sb, "", 0 );
575 if ( detail )
576 {
577 append( sb, "Available parameters:", 1 );
578 append( sb, "", 0 );
579
580 append( sb, "additionalConfig", 2 );
581 append( sb, "additional generic configuration files for eclipse", 3 );
582 append( sb, "", 0 );
583
584 append( sb, "basedir", 2 );
585 append( sb, "The root directory of the project", 3 );
586 append( sb, "", 0 );
587
588 append( sb, "packaging", 2 );
589 append( sb, "Packaging for the current project.", 3 );
590 append( sb, "", 0 );
591
592 append( sb, "skip (Default: false)", 2 );
593 append( sb, "Skip the operation when true.", 3 );
594 append( sb, "", 0 );
595 }
596 }
597
598 if ( goal == null || goal.length() <= 0 || "rad".equals( goal ) )
599 {
600 append( sb, "eclipse:rad", 0 );
601 append( sb, "Generates the rad-6 configuration files.", 1 );
602 append( sb, "", 0 );
603 if ( detail )
604 {
605 append( sb, "Available parameters:", 1 );
606 append( sb, "", 0 );
607
608 append( sb, "addGroupIdToProjectName (Default: false)", 2 );
609 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 append( sb, "", 0 );
611
612 append( sb, "addVersionToProjectName (Default: false)", 2 );
613 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 append( sb, "", 0 );
615
616 append( sb, "additionalBuildcommands", 2 );
617 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><project>./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 append( sb, "", 0 );
619
620 append( sb, "additionalConfig", 2 );
621 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 append( sb, "", 0 );
623
624 append( sb, "additionalProjectFacets", 2 );
625 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 append( sb, "", 0 );
627
628 append( sb, "additionalProjectnatures", 2 );
629 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 append( sb, "", 0 );
631
632 append( sb, "ajdtVersion (Default: none)", 2 );
633 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 append( sb, "", 0 );
635
636 append( sb, "buildOutputDirectory (Default: ${project.build.outputDirectory})", 2 );
637 append( sb, "The default output directory", 3 );
638 append( sb, "", 0 );
639
640 append( sb, "buildcommands", 2 );
641 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 append( sb, "", 0 );
643
644 append( sb, "classpathContainers", 2 );
645 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 append( sb, "", 0 );
647
648 append( sb, "classpathContainersLast (Default: false)", 2 );
649 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 append( sb, "", 0 );
651
652 append( sb, "downloadJavadocs", 2 );
653 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 append( sb, "", 0 );
655
656 append( sb, "downloadSources", 2 );
657 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 append( sb, "", 0 );
659
660 append( sb, "eclipseDownloadSources", 2 );
661 append( sb, "Deprecated. use downloadSources", 3 );
662 append( sb, "", 0 );
663 append( sb, "Enables/disables the downloading of source attachments. Defaults to false. DEPRECATED - use downloadSources", 3 );
664 append( sb, "", 0 );
665
666 append( sb, "eclipseProjectDir", 2 );
667 append( sb, "Eclipse workspace directory.", 3 );
668 append( sb, "", 0 );
669
670 append( sb, "excludes", 2 );
671 append( sb, "List of artifacts, represented as groupId:artifactId, to exclude from the eclipse classpath, being provided by some eclipse classPathContainer.", 3 );
672 append( sb, "", 0 );
673
674 append( sb, "forceRecheck", 2 );
675 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 append( sb, "", 0 );
677
678 append( sb, "generatedResourceDirName (Default: target/generated-resources/rad6)", 2 );
679 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 append( sb, "", 0 );
681
682 append( sb, "jeeversion", 2 );
683 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 append( sb, "", 0 );
685
686 append( sb, "limitProjectReferencesToWorkspace (Default: false)", 2 );
687 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 append( sb, "", 0 );
689
690 append( sb, "linkedResources", 2 );
691 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 append( sb, "", 0 );
693
694 append( sb, "manifest (Default: ${basedir}/META-INF/MANIFEST.MF)", 2 );
695 append( sb, "The relative path of the manifest file", 3 );
696 append( sb, "", 0 );
697
698 append( sb, "packaging", 2 );
699 append( sb, "The project packaging.", 3 );
700 append( sb, "", 0 );
701
702 append( sb, "pde (Default: false)", 2 );
703 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 append( sb, "", 0 );
705
706 append( sb, "projectNameTemplate", 2 );
707 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 append( sb, "", 0 );
709
710 append( sb, "projectnatures", 2 );
711 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 append( sb, "", 0 );
713
714 append( sb, "skip (Default: false)", 2 );
715 append( sb, "Skip the operation when true.", 3 );
716 append( sb, "", 0 );
717
718 append( sb, "sourceExcludes", 2 );
719 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 append( sb, "", 0 );
721
722 append( sb, "sourceIncludes", 2 );
723 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 append( sb, "", 0 );
725
726 append( sb, "testSourcesLast (Default: false)", 2 );
727 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 append( sb, "", 0 );
729
730 append( sb, "useProjectReferences (Default: true)", 2 );
731 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 append( sb, "", 0 );
733
734 append( sb, "warContextRoot", 2 );
735 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 append( sb, "", 0 );
737
738 append( sb, "workspace", 2 );
739 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 append( sb, "", 0 );
741
742 append( sb, "wtpContextName", 2 );
743 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 append( sb, "", 0 );
745
746 append( sb, "wtpapplicationxml (Default: false)", 2 );
747 append( sb, "Must the application files be written for ear projects in a separate directory.", 3 );
748 append( sb, "", 0 );
749
750 append( sb, "wtpdefaultserver", 2 );
751 append( sb, "What WTP defined server to use for deployment informations.", 3 );
752 append( sb, "", 0 );
753
754 append( sb, "wtpmanifest (Default: false)", 2 );
755 append( sb, "Must the manifest files be written for java projects so that that the jee classpath for wtp is correct.", 3 );
756 append( sb, "", 0 );
757
758 append( sb, "wtpversion (Default: none)", 2 );
759 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 append( sb, "", 0 );
761 }
762 }
763
764 if ( goal == null || goal.length() <= 0 || "rad-clean".equals( goal ) )
765 {
766 append( sb, "eclipse:rad-clean", 0 );
767 append( sb, "Deletes the config files used by Rad-6. the files .j2ee and the file .websettings", 1 );
768 append( sb, "", 0 );
769 if ( detail )
770 {
771 append( sb, "Available parameters:", 1 );
772 append( sb, "", 0 );
773
774 append( sb, "additionalConfig", 2 );
775 append( sb, "additional generic configuration files for eclipse", 3 );
776 append( sb, "", 0 );
777
778 append( sb, "basedir", 2 );
779 append( sb, "The root directory of the project", 3 );
780 append( sb, "", 0 );
781
782 append( sb, "packaging", 2 );
783 append( sb, "Packaging for the current project.", 3 );
784 append( sb, "", 0 );
785
786 append( sb, "skip (Default: false)", 2 );
787 append( sb, "Skip the operation when true.", 3 );
788 append( sb, "", 0 );
789 }
790 }
791
792 if ( goal == null || goal.length() <= 0 || "remove-cache".equals( goal ) )
793 {
794 append( sb, "eclipse:remove-cache", 0 );
795 append( sb, "Removes the not-available marker files from the repository.", 1 );
796 append( sb, "", 0 );
797 if ( detail )
798 {
799 append( sb, "Available parameters:", 1 );
800 append( sb, "", 0 );
801 }
802 }
803
804 if ( goal == null || goal.length() <= 0 || "to-maven".equals( goal ) )
805 {
806 append( sb, "eclipse:to-maven", 0 );
807 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 append( sb, "", 0 );
809 if ( detail )
810 {
811 append( sb, "Available parameters:", 1 );
812 append( sb, "", 0 );
813
814 append( sb, "deployTo", 2 );
815 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 append( sb, "", 0 );
817
818 append( sb, "eclipseDir", 2 );
819 append( sb, "Eclipse installation dir. If not set, a value for this parameter will be asked on the command line.", 3 );
820 append( sb, "", 0 );
821
822 append( sb, "stripQualifier (Default: false)", 2 );
823 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 append( sb, "", 0 );
825 }
826 }
827
828 if ( getLog().isInfoEnabled() )
829 {
830 getLog().info( sb.toString() );
831 }
832 }
833
834
835
836
837
838
839
840
841
842
843 private static String repeat( String str, int repeat )
844 {
845 StringBuffer buffer = new StringBuffer( repeat * str.length() );
846
847 for ( int i = 0; i < repeat; i++ )
848 {
849 buffer.append( str );
850 }
851
852 return buffer.toString();
853 }
854
855
856
857
858
859
860
861
862
863 private void append( StringBuffer sb, String description, int indent )
864 {
865 for ( Iterator it = toLines( description, indent, indentSize, lineLength ).iterator(); it.hasNext(); )
866 {
867 sb.append( it.next().toString() ).append( '\n' );
868 }
869 }
870
871
872
873
874
875
876
877
878
879
880
881 private static List toLines( String text, int indent, int indentSize, int lineLength )
882 {
883 List lines = new ArrayList();
884
885 String ind = repeat( "\t", indent );
886 String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" );
887 for ( int i = 0; i < plainLines.length; i++ )
888 {
889 toLines( lines, ind + plainLines[i], indentSize, lineLength );
890 }
891
892 return lines;
893 }
894
895
896
897
898
899
900
901
902
903 private static void toLines( List lines, String line, int indentSize, int lineLength )
904 {
905 int lineIndent = getIndentLevel( line );
906 StringBuffer buf = new StringBuffer( 256 );
907 String[] tokens = line.split( " +" );
908 for ( int i = 0; i < tokens.length; i++ )
909 {
910 String token = tokens[i];
911 if ( i > 0 )
912 {
913 if ( buf.length() + token.length() >= lineLength )
914 {
915 lines.add( buf.toString() );
916 buf.setLength( 0 );
917 buf.append( repeat( " ", lineIndent * indentSize ) );
918 }
919 else
920 {
921 buf.append( ' ' );
922 }
923 }
924 for ( int j = 0; j < token.length(); j++ )
925 {
926 char c = token.charAt( j );
927 if ( c == '\t' )
928 {
929 buf.append( repeat( " ", indentSize - buf.length() % indentSize ) );
930 }
931 else if ( c == '\u00A0' )
932 {
933 buf.append( ' ' );
934 }
935 else
936 {
937 buf.append( c );
938 }
939 }
940 }
941 lines.add( buf.toString() );
942 }
943
944
945
946
947
948
949
950 private static int getIndentLevel( String line )
951 {
952 int level = 0;
953 for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ )
954 {
955 level++;
956 }
957 for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ )
958 {
959 if ( line.charAt( i ) == '\t' )
960 {
961 level++;
962 break;
963 }
964 }
965 return level;
966 }
967 }