maven构建把源代码也打jar包

在pom.xml中build节点里面添加一个源代码打包的插件

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

猜你喜欢

转载自blog.csdn.net/qq_37372909/article/details/80399902