创建这个插件是为了支持将 Maven 组件文档转换为 Apache CMS,基于 svnpubsub:请参阅文档。
一旦可以使用插件发布新内容,就需要导入现有内容。
一个小 shell 脚本已用于导入一个组件及其所有版本,独立于任何站点生成阶段或组件的 pom.xml:
# configuration ORIG_PATH=/www/maven.apache.org DEST_SVN_BASE=https://svn.apache.org/repos/infra/websites/production/maven/content ARTIFACT=maven-clean-plugin DIR=plugins/${ARTIFACT} VERSIONS="2.3 2.4 2.4.1 2.5" # initialize ${DIR}-LATEST entry in svn svn -m "prepare ${ARTIFACT} documentation publication" mkdir ${DEST_SVN_BASE}/${DIR}-LATEST # publish existing content for each version in ${VERSIONS} for VERSION in ${VERSIONS} do echo " ========== ${ARTIFACT} ${VERSION} ==========" mvn -e scm-publish:publish-scm \ -Dscmpublish.content=${ORIG_PATH}/${DIR}-${VERSION} \ -Dscmpublish.pubScmUrl=scm:svn:${DEST_SVN_BASE}/${DIR}-LATEST \ -Dscmpublish.checkinComment="published documentation for ${ARTIFACT} version ${VERSION}" \ && \ svn cp ${DEST_SVN_BASE}/${DIR}-LATEST ${DEST_SVN_BASE}/${DIR}-${VERSION} -m "releasing ${ARTIFACT} ${VERSION} documentation" done