${project.build.directory}

简介: ${project.build.directory}

1、Maven内置变量说明:


${basedir} 项目根目录

${project.build.directory} 构建目录,缺省为target

${project.build.outputDirectory} 构建过程输出目录,缺省为target/classes

p r o j e c t . b u i l d . f i n a l N a m e 产 出 物 名 称 , 缺 省 为 {project.build.finalName} 产出物名称,缺省为project.build.finalName产出物名称,缺省为{project.artifactId}-${project.version}

${project.packaging} 打包类型,缺省为jar

${project.xxx} 当前pom文件的任意节点的内容

2、一些命令:


生成eclipse工程文件:mvn eclipse:clean eclipse:eclipse -DdownloadSources

如果执行单元测试出错,用该命令可以在console输出失败的单元测试及相关信息:mvn -Dsurefire.useFile=false

有时候,希望在mvn install时,对项目中的单元测试进行调试,使用该命令:mvn install -Dmaven.surefire.debug 。在使用该命令前,在你将要调试的代码中设置好断点,然后运行该命令。该命令执行一会之后,它的build过程会显示信息:Listening for transport dt_socket at address : 5005 。看到这个提示信息之后,在eclipse中,在Debug Configuration窗口,新建Remote Java Application,port设置为5005,然后点击“debug”按钮。之后,刚才的mvn命令将继续往下执行,直到运行到有断点的代码,则停留下来,这时在eclipse中可以调试运行的代码。

3. maven jetty 插件的一些命令:(资料:http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin


启动:mvn jetty:run 默认的端口号是8080。

启动时,设置端口号: mvn -Djetty.port=9999 jetty:run

debug的方式启动:mvnDebug jetty:run 启动之后,会显示具体的debug端口

4.maven修改pom版本号的命令image.png


image.png

相关文章
|
jenkins 持续交付
Jenkins 问题 No such plugin: cloudbees-folder
Jenkins 问题 No such plugin: cloudbees-folder
481 0
|
6月前
|
存储
Build was configured to prefer settings repositories over project repositories but repository
Build was configured to prefer settings repositories over project repositories but repository
300 5
|
6月前
|
Java Maven
The goal you specified requires a project to execute but there is no POM in this directory
The goal you specified requires a project to execute but there is no POM in this directory
234 0
|
6月前
|
存储 算法 安全
TinyKv Project2 PartA RaftKV
TinyKv Project2 PartA RaftKV
87 0
|
存储 API 虚拟化
Project Pacific的第一次接触
谈谈自己与VMware Pacific产品的第一次接触,提供一些配置的参考,感兴趣的朋友们可以一起对照着在自己的环境中进行模拟。
Project Pacific的第一次接触
|
Java Maven
maven install时报错The packaging for this project did not assign a file to the build artifact
maven install时报错The packaging for this project did not assign a file to the build artifact
6507 0
|
Android开发
Migrate Project to Gradle? This project does not use the Gradle build system
Migrate Project to Gradle? This project does not use the Gradle build system
100 0
No plugin found for prefix ‘doclint‘ in the current project
No plugin found for prefix ‘doclint‘ in the current project
125 0
|
Java Android开发
eclipse project修改 output folder
eclipse project修改 output folder
125 0
|
前端开发 JavaScript Java
reuse project的maven build log(下)
reuse project的maven build log(下)