一:已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版本號對應
後續有不少開發填坑的文章發佈,若是對你有幫助,請支持和加關注一下