實際項目中pom.xml依賴寫法: Maven 安裝 JAR 包的命令是: 例如我的這個spring-context-support-3.1.0.RELEASE.jar 文件放在了"D:\mvn\"中 則命令為(在cmd中執行): mvn install:install-file -Dfile=D: ...
實際項目中pom.xml依賴寫法:
<dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version>3.1.0.RELEASE</version> </dependency>
Maven 安裝 JAR 包的命令是:
mvn install:install-file -Dfile=jar包的位置 -DgroupId=上面的groupId -DartifactId=上面的artifactId -Dversion=上面的version -Dpackaging=jar
例如我的這個spring-context-support-3.1.0.RELEASE.jar 文件放在了"D:\mvn\"中
則命令為(在cmd中執行):
mvn install:install-file -Dfile=D:\mvn\spring-context-support-3.1.0.RELEASE.jar
-DgroupId=org.springframework -DartifactId=spring-context-support -Dversion=3.1.0.RELEASE -Dpackaging=jar
註意:路徑和名稱中不要有空格和中文,命令為一行,不要換行