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- ...
随机推荐
- LOJ2542 随机游走 Min-Max容斥+树上期望DP
搞了一下午 真的是啥都不会 首先这道题要用到Min-Max容斥 得到的结论是 设 $Max(S)$表示集合里最晚被访问的节点被访问的期望步数 设 $Min(S)$表示集合里最早被访问的节点被访问的期望 ...
- js获取判断苹果手机机型
原先获取不了苹果系列的型号,但转换思路,先判断是否是苹果,再用分辨率获取型号 //获取手机型号函数beginfunction getPhoneType(){ //正则,忽略大小写var pattern ...
- netbeans连接数据库SQLserver2008
数据库设置 第一步:配置SQL,打开SQL server 2008文件下的配置工具里的SQL server配置管理器 设置MSSQLSERVER协议中,开启TCP/IP,端口设置为1433 在SQL ...
- vim less vi 不显示富文本 ESC
如图: 使用 less -r xxx.log 即可显示如下
- HTML:DOM 对象
ylbtech-HTML:DOM 对象 1. Document 对象返回顶部 1-1. Document 对象 每个载入浏览器的 HTML 文档都会成为 Document 对象. Document 对 ...
- C# Round源码
在日常开发中经常遇到四舍五入的情况比如 Math.Round(1.25, 1),首先我们要知道这里的Round 其实是银行家算法,具体可以参考Round() 四舍五入 js银行家算法 那么C#是如何实 ...
- JAVA消息服务JMS规范及原理详解
JAVA消息服务JMS规范及原理详解 一.简介 JMS即Java消息服务(Java Message Service)应用程序接口,是一个Java平台中关于面向消息中间件(MOM)的API,用于在两个应 ...
- android 异常:ScrollView can host only one direct child
android 采用ScrollView布局时出现异常:ScrollView can host only one direct child. 主要是ScrollView内部只能有一个子元素,即不能并列 ...
- ionic 布局
1. row col 设置自动换行 <!--长文本换行 item-text-wrap--> <li class="item item-text-wrap" ng- ...
- sublime text修改package安装路径
删除C:\Users\Administrator\AppData\Roaming\Sublime Text 3下面的packages目录 在\Sublime Text 3安装路径下新建Data文件夹 ...