当前位置: 首页 > news >正文

本地jar安装到maven仓库 和 ivy仓库方法

为什么80%的码农都做不了架构师?>>>   hot3.png

一:已java_memcached-release_2.6.6.jar 本地jar举例

二:操作

1:把 java_memcached-release_2.6.6.jar 放入D盘

2:cmd命令执行

mvn install:install-file -Dfile=d:/java_memcached-release_2.6.6.jar -DgroupId=com.danga -DartifactId=memcached -Dversion=2.6.6 -Dpackaging=jar -DgeneratePom=true

3:pom.xml 文件引入

  <dependency>
            <groupId>com.danga</groupId>
            <artifactId>memcached</artifactId>
            <version>2.6.6</version>
        </dependency>

 

三:注意事项!

开发工具的maven引入一定是要引入的是你自己的安装的maven

四:如果是ivy导入本地仓库

已导入 

<dependency org="com.shfft" name="fft-shield" rev="1.0" conf="zip->default" />

为例子

 

手动在 本地ivy仓库下,新建图中标记的目录

其中jars中放入

其中ivy-1.0.xml内容

 

<?xml version="1.0" encoding="UTF-8"?> <ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven"> <info organisation="com.shfft" module="fft-shield" revision="1.0" status="release" publication="20140603162722329" > <description homepage=""> POM was created by Sonatype Nexus </description> </info> <configurations> <conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf" extends="runtime,master"/> <conf name="master" visibility="public" description="contains only the artifact published by this module itself, with no transitive dependencies"/> <conf name="compile" visibility="public" description="this is the default scope, used if none is specified. Compile dependencies are available in all classpaths."/> <conf name="provided" visibility="public" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/> <conf name="runtime" visibility="public" description="this scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath." extends="compile"/> <conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases." extends="runtime"/> <conf name="system" visibility="public" description="this scope is similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository."/> <conf name="sources" visibility="public" description="this configuration contains the source artifact of this module, if any."/> <conf name="javadoc" visibility="public" description="this configuration contains the javadoc artifact of this module, if any."/> <conf name="optional" visibility="public" description="contains all optional dependencies"/> </configurations> <publications> <artifact name="fft-shield" type="jar" ext="jar" conf="master"/> </publications> </ivy-module> 

 

 

ivy-1.0.xml.original文件内容

 

<?xml version="1.0" encoding="UTF-8"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <groupId>com.shfft</groupId> <artifactId>fft-shield</artifactId> <version>1.0</version> <description>POM was created by Sonatype Nexus</description> </project> 

 

 

 

自己根据jar包的信息修改

 

最后重新引入一下ivy仓库

!注意其中xml文件名称中 1.0要和jar版本号对应

 

后续有很多开发填坑的文章发布,如果对你有帮助,请支持和加关注一下

http://e22a.com/h.05ApkG?cv=AAKHZXVo&sm=339944

https://shop119727980.taobao.com/?spm=0.0.0.0 

 

转载于:https://my.oschina.net/baishi/blog/656468

相关文章:

  • XUL 用户界面语言介绍
  • Reddit引入Envoy支持架构改造,性能显著提升
  • 弄懂Favicon
  • 基于django的视频点播网站开发-step15-项目部署
  • php任务队列
  • OpsRamp推出以服务为中心的AIOps和云监控功能
  • C# 如何在Excel 动态生成PivotTable
  • 08.Android之View事件问题
  • .naturalWidth 和naturalHeight属性,
  • 数据模型
  • 深度解析利用ES6进行Promise封装总结
  • 上传本地项目到git.oschina
  • ES6系统学习----从Apollo Client看解构赋值
  • 前端临床手札——文件上传
  • IDEA Git版本回滚提交方式
  • 《网管员必读——网络组建》(第2版)电子课件下载
  • 【前端学习】-粗谈选择器
  • 4. 路由到控制器 - Laravel从零开始教程
  • Docker下部署自己的LNMP工作环境
  • Dubbo 整合 Pinpoint 做分布式服务请求跟踪
  • in typeof instanceof ===这些运算符有什么作用
  • Laravel深入学习6 - 应用体系结构:解耦事件处理器
  • mysql innodb 索引使用指南
  • mysql中InnoDB引擎中页的概念
  • Netty 框架总结「ChannelHandler 及 EventLoop」
  • Redis 中的布隆过滤器
  • Sequelize 中文文档 v4 - Getting started - 入门
  • ⭐ Unity 开发bug —— 打包后shader失效或者bug (我这里用Shader做两张图片的合并发现了问题)
  • 回顾 Swift 多平台移植进度 #2
  • 极限编程 (Extreme Programming) - 发布计划 (Release Planning)
  • 利用jquery编写加法运算验证码
  • (SpringBoot)第二章:Spring创建和使用
  • (附源码)springboot家庭装修管理系统 毕业设计 613205
  • (附源码)springboot学生选课系统 毕业设计 612555
  • (附源码)计算机毕业设计SSM疫情下的学生出入管理系统
  • (南京观海微电子)——COF介绍
  • (数位dp) 算法竞赛入门到进阶 书本题集
  • (转)程序员技术练级攻略
  • **PHP二维数组遍历时同时赋值
  • .Net Redis的秒杀Dome和异步执行
  • .netcore如何运行环境安装到Linux服务器
  • .NET大文件上传知识整理
  • .NET值类型变量“活”在哪?
  • @SuppressWarnings(unchecked)代码的作用
  • [20170705]lsnrctl status LISTENER_SCAN1
  • [BJDCTF2020]The mystery of ip
  • [C/C++]数据结构 堆的详解
  • [Flex] PopUpButton系列 —— 控制弹出菜单的透明度、可用、可选择状态
  • [HackMyVM]靶场Crossbow
  • [HDU]2161Primes
  • [IE编程] 如何获得IE版本号
  • [Latex] Riemann 问题中的激波,接触间断,膨胀波的 Tikz 绘图
  • [leetcode 数位计算]2520. 统计能整除数字的位数
  • [loj#115] 无源汇有上下界可行流 网络流
  • [NOIP2011DAY1P1]铺地毯