nexus 使用Raw Repositories 進行maven site 發布


實際項目中我們可能需要進行maven 項目的site 文檔發布,一般的處理是生成之后,然后在進行發布到一個靜態
服務器進行頁面訪問,nexus3 提供了一個Raw Repositories 很方便可以直接幫我們搞定問題

創建Raw Repositories

我選擇了s3 minio 做為存儲,實際上直接使用minio 進行存儲也是不錯的


項目使用(pom.xml)

注意使用的協議是 dav

<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>nexus-proxy</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>25.1-jre</version>
</dependency>
</dependencies>
<distributionManagement>
<site>
<id>nexus-app</id>
<url>dav:http://nexushost:8081/repository/myinfo/</url>
</site>
</distributionManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.4</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-webdav-jackrabbit</artifactId>
<version>2.8</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>

構建發布

mvn site-deploy

效果



參考資料

https://help.sonatype.com/repomanager3/raw-repositories-and-maven-sites
https://github.com/rongfengliang/mino-thumbor-openresty


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM