加maven-source-plugin
插件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| <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>
|
settings.xml
配置验证信息
1 2 3 4 5 6 7 8 9
| <settings> <servers> <server> <id>id</id> <username>username</username> <password>password</password> </server> </servers> </settings>
|
pom.xml
中的id
要和settings.xml
中的一致
1 2 3 4 5 6
| <distributionManagement> <repository> <id>id</id> <url>url</url> </repository> </distributionManagement>
|