我将一个项目导入Netbeans并打开其中一个示例。当我第一次运行它时,程序运行得很好。但是,第二次运行它时出现以下错误:
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project webcam-capture-example-qrcode: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
如果这不正常,则可能是我导入项目的方式。
答案 0 :(得分:0)
问题出在您的pom.xml
文件或您正在运行的课程中。
如果它第一次运行,那么可能是你无意中运行了另一个主服务器,或者你改变了一些配置。
您报告的日志说该命令退出并显示错误,可能程序正在按预期运行,并且有内部错误,例如它无法访问所需的资源(网络摄像头?)而且可以使用你第一次跑吧。
始终运行clean and build
以确保周围没有虚假文件并查看堆栈跟踪以获得真正的错误。