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- ...
随机推荐
- 【11.5校内测试】【倒计时5天】【DP】【二分+贪心check】【推式子化简+线段树】
Solution 非常巧妙的建立DP方程. 据dalao们说题目明显暗示根号复杂度??(反正我是没看出来 因为每次分的块大小一定不超过$\sqrt n$,要不然直接每个位置开一个块答案都才为$n$. ...
- Shell中的>/dev/null 2>&1 与 2>&1 >/dev/null 与&>/dev/null 的区别
默认情况下,总是有三个文件处于打开状态,标准输入(键盘输入).标准输出(输出到屏幕).标准错误(也是输出到屏幕),它们分别对应的文件描述符是0,1,2 .那么我们来看看下面的几种重定向方法的区别: & ...
- C#的?和??
1.?? 为了实现Nullable数据类型转换成non-Nullable类型数据,才有的一个操作符: 意义:一变量取值,取符号左边的值,若左边为null,那么取赋值??右边的: 栗子:int a=3 ...
- J-Link GDB Server Command
J-Link GDB Server - SEGGER Hilden, Germany – September 15th, 2011 – SEGGER Microcontroller today ann ...
- PHP内置的预定义常量大全
URL:http://www.php.net/manual/en/reserved.constants.php 预定义常量:核心预定义常量,标准预定义常量----------------------- ...
- 独热编码和dummy编码的作用
参考这篇文章: https://www.cnblogs.com/lianyingteng/p/7792693.html 总结:我们使用one-hot编码时,通常我们的模型不加bias项 或者 加上bi ...
- C#中流的读写器BinaryReader、BinaryWriter,StreamReader、StreamWriter详解【转】
https://blog.csdn.net/ymnl_gsh/article/details/80723050 C#的FileStream类提供了最原始的字节级上的文件读写功能,但我们习惯于对字符串操 ...
- .NET 开源开发项目【翻译】
原文地址 本文列出了 .NET 开源开发项目(open source developer projects).意在包括对开发过程的所有方面有所帮组的项目.对于消费项目(consumer project ...
- 2013-2015 Aaronyang的又一总结,牧童遥指纳尼村
我没有时间去唠叨自己的事,可是你们是我喜欢的人,ay很愿意写给你们分享:去年的万人阅读的总结链接:<没学历的IT人生没那么悲催,献给程序员们> 提前声明:本文不良反应:请自备垃圾桶,准备装 ...
- ubuntu安装odbc及(mysql驱动)
一.安装odbc apt-get install unixodbc 如果需要用到编译的头文件之类的 apt-get install unixodbc-dev 二.安装mysql驱动 apt-get i ...