maven发布源代码到私服

1、pom.xml中配置plugin

<build>
	<plugins>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-source-plugin</artifactId>
			<configuration>
				<attach>true</attach>
			</configuration>
			<executions>
				<execution>
					<phase>compile</phase>
					<goals>
						<goal>jar</goal>
					</goals>
				</execution>
			</executions>
		</plugin>
	</plugins>
</build>

2、执行命令

mvn install  源代码会发布到本地

mvn deploy  源代码会发布到远程仓库

猜你喜欢

转载自blog.csdn.net/xixingzhe2/article/details/83012506