AbstractMavenMojo의 execute 메소드는 MojoExecutionException 및 MojoFailureException이라는 두 가지 예외를 throw합니다. 이 중 하나를 수행하면 빌드가 중지되고 로그에는 거의 각각이라는 동일한 메시지가 표시됩니다.Maven에서 MojoExecutionException과 MojoFailureException을 비교하는 경우
MojoExecutionException에 대한 메시지는 다음과 같습니다
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] [exception text]
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
및 MojoFailureException에 대한 메시지는 다음과 같습니다
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] [exception text]
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
때 어떤 예외 이유를 던져해야합니까?
감사합니다. 정확히 내가 무엇을했는지입니다. –
링크가 끊어졌습니다. 대신 http://www.sonatype.com/books/mvnref-book/reference/writing-plugins-sect-custom-plugin.html#writing-plugins-sect-failure를 사용해보십시오. – matsev
@matsev, 나는 링크를 고쳤다. – Gili