maven install的时候把源码一起放到仓库

在pom.xml中加入插件

   <build>
    <plugins>
        <!-- Source attach plugin -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
                <execution>
                    <id>attach-sources</id>
                    <goals>
                        <goal>jar</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

原文:https://blog.csdn.net/ZJ__ZFH/article/details/80089949  

原文地址:https://www.cnblogs.com/jiftle/p/10881026.html