読者です 読者をやめる 読者になる 読者になる

Maven2でプラグインの使い方を調べる

dev

こちらを参照
http://maven.apache.org/plugins/maven-help-plugin/describe-mojo.html
例えば、

  • groupId=com.example
  • artifactId=maven-hello-plugin
  • version=1.0
  • goal=hello
  • 詳細表示

の場合は、

mvn help:describe -Dplugin=com.example:maven-hello-plugin:1.0 -Dmojo=hello -Dfull=true

とすれば、こんな感じでプラグインの仕様が確認できる。

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO] ----------------------------------------------------------------------------
[INFO] Building app
[INFO]    task-segment: [help:describe] (aggregator-style)
[INFO] ----------------------------------------------------------------------------
[INFO] [help:describe]
[INFO] Mojo: 'hello:hello'
===============================================
Goal: 'hello'
Description:

Goal which touches a timestamp file.

Implementation: com.example.HelloMojo
Language: java

Parameters:
                                                                                            • -
[0] Name: name Type: java.lang.String Required: true Directly editable: true Description: Unknown
                                                                                            • -
This mojo doesn't have any component requirements. =============================================== [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 second [INFO] Finished at: Tue Apr 03 00:43:54 JST 2007 [INFO] Final Memory: 3M/5M [INFO] ------------------------------------------------------------------------