创建模板并上传到私服

72人浏览 / 0人评论
  1. 项目目录
     mvn archetype:create-from-project -s  "D:\\apache-maven-3.6.1\\conf\\settings.xml"

     

  2. 切换到目录target/generated-sources/archetype/
     mvn install -s  "D:\\apache-maven-3.6.1\\conf\\settings.xml"

     

  3. 部署到私服:先在pom文件添加
     <distributionManagement>
    		<repository>
    			<id>nexus</id>
    			<name>releases</name>
    			<url>http://192.168.1.8:8081/repository/3rd.party/</url>
    		</repository>
    	</distributionManagement>
     mvn deploy -s "D:\\apache-maven-3.6.1\\conf\\settings.xml"

     

全部评论