一:已java_memcached-release_2.6.6.jar 本地jar举例java
二:操做apache
1:把 java_memcached-release_2.6.6.jar 放入D盘app
2:cmd命令执行maven
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=trueide
3:pom.xml 文件引入memcached
<dependency>
<groupId>com.danga</groupId>
<artifactId>memcached</artifactId>
<version>2.6.6</version>
</dependency>
工具
三:注意事项!开发工具
开发工具的maven引入必定是要引入的是你本身的安装的mavenui
四:若是是ivy导入本地仓库this
已导入
<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版本号对应
后续有不少开发填坑的文章发布,若是对你有帮助,请支持和加关注一下