<build> <plugins> <!-- 自定义绑定,创建项目的源码jar --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>2.1.1</version> <executions> <!-- 配置一个执行任务--> <execution> <id>attach-sources</id> <!-- 通过phase绑定到verify的生命周期上 --> <phase>verify</phase> <goals> <!-- 插件目标 --> <goal>jar-no-fork</goal> </goals> </execution> </executions> </plugin> </plugins> </build>
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/6529.html