简介
Maven
Glassfish
一、过程
在官网分别下载Maven 和 Glassfish
Maven安装成功标志:
Glassfish安装成功标志:
二、mvn常用命令
mvn -v
显示maven安装版本信息
mvn clean
清理项目打包文件,即项目下的target目录
mvn compile
编译项目下的src/main/Java目录源代码
mvn package
项目打包,在项目target目录下生成编译后的jar或war等文件
mvn install
项目打包并发布到本地仓库
mvn deploy
项目打包并发布到远程仓库
mvn test
单元测试命令,执行src/test/java/下的junit的单元测试用例
三、遇到的问题
主要在maven遇到问题,compile、package、test都没有问题,但是在install的时候发现如下错误
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.4:redeploy (deploy) on project hello1: 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://glassfish5/glassfish/domains" does not exist. Please configure the container before attempting to perform any local deployment. Read more on: http://cargo.codehaus.org/Local+Configuration -> [Help 1]
目前还没有解决。