我是Maven的新手。你知道我做错了吗(见下文)?
mvn -e clean:help. + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'clean'. [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Required goal not found: clean:help in org.apache.maven.plugins:maven-clean-plugin:2.2 [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.BuildFailureException: Required goal not found: clean:help in org.apache.maven.plugins:maven-clean-plugin:2.2 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1867) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:462) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:175) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
答案 0 :(得分:4)
您在命令行(2.2)上使用的插件版本没有clean:help
目标(自2.3起)。试试这个:
mvn org.apache.maven.plugins:maven-clean-plugin:2.4:help
答案 1 :(得分:3)
我想你想要:
mvn help:describe -Dcmd=clean
给出:
[INFO] [help:describe {execution: default-cli}]
[INFO] 'clean' is a lifecycle with the following phases:
* pre-clean: Not defined
* clean: org.apache.maven.plugins:maven-clean-plugin:clean
* post-clean: Not defined
有关详细信息和示例,请参阅here。这同样适用于compile
。
mvn help:describe -Dcmd=compile