mvn install把代碼安裝到本地倉庫

  1. 在pom.xm文件中增長如下配置shell

<plugin>
			  <groupId>org.apache.maven.plugins</groupId>
			  <artifactId>maven-source-plugin</artifactId>
			  <version>2.1.2</version>
			  <executions>
				<execution>
				  <id>attach-sources</id>
				  <phase>verify</phase>
				  <goals>
					<goal>jar-no-fork</goal>
				  </goals>
				</execution>
			  </executions>
			</plugin>

在項目根目錄下運行如下命令:apache

mvn clean source:jar install -Dmaven.test.skip=true
相關文章
相關標籤/搜索