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
相关文章
相关标签/搜索