spring boot と maven を使用して単純な Java Rest サービスをセットアップしようとしています。maven をダウンロードし、pom.xml を src と同じフォルダーに配置しているので、src & pom.xml -> main -> java ->こんにちは
hello フォルダー内で maven clean package を実行して jar ファイルをビルドしようとすると、コマンド maven not found と表示されます。
私はまだJava Web開発に比較的慣れていないので、すべてが正しく構成されていることを確認するのは難しいです。Maven をダウンロードしましたが、プロジェクトに実際の Maven ファイルが必要ですか?
どんな助けでも本当に感謝しています。
-アダム
アップデート:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.124s
[INFO] Finished at: Fri Oct 04 11:47:08 PDT 2013
[INFO] Final Memory: 4M/89M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/Users/adam419/Desktop/Programming/Java/dd-servlet/src). Please verify you invoked Maven from the correct directory. -> [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:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
編集:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/adam419/Desktop/Programming/Java/dd-servlet/src/main/java/hello/GreetingController.java:[3,7] error: class Greeting is public, should be declared in a file named Greeting.java
[ERROR] /Users/adam419/Desktop/Programming/Java/dd- servlet/src/main/java/hello/Greeting.java:[3,7] error: duplicate class: hello.Greeting
[INFO] 2 errors