放到远端的pom文件 , 版本由deploy决定
C:\danny\code_base\maven_local_test\anywhere\module_a>mvn deploy:deploy-file -DgroupId=com.software -DartifactId=software-parent -Dversion=1.0.0 -Dpackaging=pom -Dfile=C:\Users\dell\.m2\repository\com
\software-parent-1.1.0-SNAPSHOT.pom -Durl=http://admin:[email protected]:8081/nexus/content/repositories/thirdparty -DrepositoryId=thirdparty -X
放到远端的jar文件 , 版本由deploy决定
C:\danny\code_base\maven_local_test\anywhere\module_a>mvn deploy:deploy-file -DgroupId=com.software -DartifactId=software-model -Dversion=1.0.0 -Dpackaging=jar -Dfile=C:\Users\dell\.m2\repository\com\
software\software-model\1.0.0-SNAPSHOT\software-model-1.0.0-SNAPSHOT.jar -Durl=http://admin:[email protected]:8081/nexus/content/repositories/thirdparty -DrepositoryId=thirdparty -X
然后在自己的文件夹建立一个新的pom.xml文件
引用
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.software</groupId>
<artifactId>software-parent</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
<artifactId>danny_test1</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.sunrun</groupId>
<artifactId>mpos-common</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<finalName>danny_test1</finalName>
</build>
</project>
然后使用 mvn eclipse:eclipse
可以建立出新的eclipse项目
C:\danny\code_base\maven_local_test\Project