20

私はmavenとcamelが初めてです。

キャメルブックの例を実行してみました。次のコマンドを実行すると、このエラーが発生します。

指示:

mvn test -Dtest= SpringTransformMethodTest

エラー:

[ERROR] Unknown lifecycle phase "SpringTransformMethodTest". You must specify a valid lifecycle phase or a goal in the f
ormat <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle ph
ases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, proce
ss-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile,
process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, ver
ify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles.`
4

6 に答える 6

29

との間にスペースがある可能性が-Dtest=ありSpringTransformMethodTestます。これは、1 つではなく 2 つのアイテムとして解釈されます。

于 2013-09-09T12:52:26.293 に答える
13

このエラーは私にも起こりました。mvn install その値のパラメーター間にスペースがないこのコマンドを実行していました。

このコマンドで:

> mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file 
-Dfile=C:\Users\arcones\Desktop\ojdbc7.jar 
-DgroupId=com.oracle 
-DartifactId=ojdbc7 
-Dversion=12.1.0.1 
-Dpackaging=jar 
-DlocalRepositoryPath=lib

このエラーが発生しました:

[エラー] 不明なライフサイクル フェーズ ".oracle"。有効なライフサイクル フェーズまたは目標を : または :[:]: の形式で指定する必要があります。使用可能なライフサイクル フェーズは次のとおりです。 process-test-resources、test-compile、process-test-class es、test、prepare-package、package、pre-integration-test、integration-test、post-integration-test、verify、install、depl oy、pre-クリーン、クリーン、ポストクリーン、プレサイト、サイト、ポストサイト、サイト展開。→【ヘルプ1】

この問題は、各値に二重引用符を追加することで解決されました。

> mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file 
-Dfile="C:\Users\arcones\Desktop\ojdbc7.jar" 
-DgroupId="com.oracle"
-DartifactId="ojdbc7"
-Dversion="12.1.0.1"
-Dpackaging="jar" 
-DlocalRepositoryPath="lib"

[情報] ビルド成功

于 2016-06-03T07:36:46.707 に答える