maven學習-專案打成原始碼jar包上傳私庫
阿新 • • 發佈:2019-02-13
前言:打原始碼包,讓別人更容易看懂你寫的程式碼
1.在pom.xml中加入這句話
<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.用cmd命令到你的專案資料夾(打包第一種辦法)
執行:mvn clean deploy
2.在eclipse中輸入該語句(打包第二種辦法)
.
完成了,快去私庫看下你成功了沒