InvocationTargetException: The container configuration directory does not exist.
描述:在NetBeans IDE 8.1中build工程Java EE7 dukes-forest時報如下所示錯誤
Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.4:redeploy (deploy) on project dukes-payment: Execution deploy of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.4:redeploy failed: Failed to create deployer with implementation class org.codehaus.cargo.container.glassfish.GlassFish4xInstalledLocalDeployer for the parameters (container [id = [glassfish4x]], deployer type [installed]). InvocationTargetException: The container configuration directory “c://glassfish4/glassfish/domains” does not exist. Please configure the container before attempting to perform any local deployment.
注:例子中使用的是Java ee7中的example
解決方法:將glassfish4/docs/javaee-tutorial/examples下pom.xml檔案的<glassfish.home.prefix>
和<glassfish.home>
兩個屬性值更改成自己的glassfish的安裝目錄,再重新build就好