classifier in maven
http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploying-with-classifiers.html
Beside the main artifact there can be additional files which are attached to the Maven project. Such attached filed can be recognized and accessed by their classifier.
For example: from the following artifact names, the classifier is be located between the version and extension name of the artifact.
- artifact-name-1.0.jar the main jar which contains classes compiled without debugging information (such as linenumbers)
- artifact-name-1.0-debug.jar the classified jar which contains classes compiled with debugging information, so will be smaller
- artifact-name-1.0-site.pdf a pdf which contains an export of the site documentation.
You can deploy the main artifact and the classified artifacts in a single run. Let's assume the original filename for the documentation is site.pdf:
mvn org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file -Durl=http://localhost:8081/repomanager/ \
-DrepositoryId=some.id \
-Dfile=path/to/artifact-name-1.0.jar \
-DpomFile=path-to-your-pom.xml \
-Dfiles=path/to/artifact-name-1.0-debug.jar,path/to/site.pdf \
-Dclassifiers=debug,site \
-Dtypes=jar,pdf
If you only want to deploy the debug-jar and want to keep the classifier, you can execute the deploy-file like
mvn org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file -Durl=http://localhost:8081/repomanager/ \
-DrepositoryId=some.id \
-Dfile=path-to-your-artifact-jar \
-DpomFile=path-to-your-pom.xml \
-Dclassifier=bin
Note: By using the fully qualified path of a goal, you're ensured to be using the preferred version of the maven-deploy-plugin. When using mvn deploy:deploy-file its version depends on its specification in the pom or the version of Apache Maven.
classifier in maven的更多相关文章
- Maven之——坐标和依赖(上)
Maven之--坐标和依赖(上) 1. Maven坐标概念 Maven通过构件的坐标来在Maven仓库中定位到详细的构件.Maven的坐标元素包含groupId.artifactId.versi ...
- 读书笔记-《Maven实战》-2018/4/17
第五章 坐标和依赖 1.如同笛卡尔坐标系一样,Maven也通过坐标三元素定位一个资源. <groupId>com.dengchengchao.test</groupId> &l ...
- Java学习篇之---json-lib(Maven)
json-lib(Maven) java中用于解释json的主流工具有org.json.json-lib与gson.本篇文章介绍json-lib. 项目中要用到json-lib.在pom.xml文件里 ...
- Maven 相关知识点解释
在PC端上面关于Maven的安装等情况我这里就不再复述了,不懂的请自行百度谷歌. 今天聊一下Maven 里面的结构,及相关依赖解释. groupId,artfactId,version,type,cl ...
- 搭建简单SBT工程实践
在本机jdk(主要配置环境变量).scala(主要配置环境变量).sbt(主要配置①私服repositories ②sbtconfig.txt)都已经安装且配置好的情况下. repositories ...
- Maven 的classifier的作用
直接看一个例子,maven中要引入json包,于是使用了 <dependency> <groupId>net.sf.json-lib</groupId> <a ...
- Maven坐标 groupId artifactId version packaging classifier name
groupId定义项目属于哪个组,这个组往往和项目所在的组织或公司存在关联.譬如在googlecode上建立一个名为myapp的项目,那么groupId就应该是com.googlecode.myapp ...
- maven 标签classifier 研究一下
研究一下maven的标签: <dependency> <groupId>io.netty</groupId> <artifactId>netty-tcn ...
- Maven classifier 元素妙用
首先来看这么一个依赖 <dependency> <groupId>net.sf.json-lib</groupId> <artifactId>json- ...
随机推荐
- mysql的密码忘记了怎么办
我们的大脑不是电脑,有些东西难免会忘,但是会了这个再也不担心宝宝忘记密码了 (1)点击开始/控制面板/服务/mysql-->右击mysql看属性,里面有mysql的安装地址,然后找到安装地址进行 ...
- zabbix-agentd 安装
[root@node2 ~]# rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.ce ...
- Structured Streaming教程(3) —— 与Kafka的集成
Structured Streaming最主要的生产环境应用场景就是配合kafka做实时处理,不过在Strucured Streaming中kafka的版本要求相对搞一些,只支持0.10及以上的版本. ...
- 斗鱼宣布获C轮15亿融资 直播行业进入资本时代
今天,斗鱼直播宣布完成C轮15亿人民币融资,本轮融资由凤凰投资与腾讯领投,深创投.国家中小企业基金.红土成长等跟投.2016年3月,斗鱼曾获得1亿美元(约合6.7亿元人民币)B轮融资,腾讯出资4亿人民 ...
- apache 通过ajp访问tomcat多个站点
copy mod_jk.so to modules下 httpd的配置项中添加如下内容 LoadModule proxy_module modules/mod_proxy.so LoadModule ...
- Log4j详细介绍(五)----输出地Appender
Appender表示日志输出到什么地方,常用的输出地有控制台,文件,数据库,远程服务器等.Log4j中内置了常用的输出地,一般情况下配置一下即可使用.所有的Appender都实现自org.apache ...
- 你真的会用Gson吗?Gson使用指南(2)
注:此系列基于Gson 2.4. 上一篇文章 你真的会用Gson吗?Gson使用指南(1) 我们了解了Gson的基础用法,这次我们继续深入了解Gson的使用方法. 本次的主要内容: Gson的流式反序 ...
- Spark2.2+ES6.4.2(三十一):Spark下生成测试数据,并在Spark环境下使用BulkProcessor将测试数据入库到ES
Spark下生成2000w测试数据(每条记录150列) 使用spark生成大量数据过程中遇到问题,如果sc.parallelize(fukeData, 64);的记录数特别大比如500w,1000w时 ...
- [Canvas]双方战机展示
源码点此下载,用chrome浏览器打开index.html观看. 图例: 代码: <!DOCTYPE html> <html lang="utf-8"> & ...
- WIN10平板如何录制视频,为什么录制屏幕无法播放
你的平板分辨率太高(系统推荐2736X1824),实际上一半就够了(1368X912),因为大部分传统显示器分辨率只有1280X720这种.把分辨率调低还有很多的好处,因为很多软件在分辨率太高的情况下 ...