Multi-module example of using mvn site-deploy with github pages

拥有回忆 提交于 2019-12-24 18:23:08

问题


I am looking for an example pom.xml and settings.xml setup that shows how to deploy to github pages that uses the standard maven site deployment target site-deploy and is also multi-module.

Specifically I am looking for one that works in both Windows as well as UNIX.

Searching around, I haven't found an example that works. Some of the ones I have looked at are:

  • wagon-gitsite http://khuxtable.github.io/wagon-gitsite/usage.html
  • @kohsuke github-api https://github.com/kohsuke/github-api/blob/master/pom.xml
  • Maven SCM Publish plugin https://jira.codehaus.org/browse/MSCMPUB-4 (though this does not count since it does not work with site-deploy, it has it's own target scm-publish:publish-scm)

None of them work as well as the wagon-ftp.


回答1:


Have you looked at GitHub's site-maven-plugin? It seems to be exactly what you want.




回答2:


I released a plugin that will handle the multi-module project scenario with github pages. It is a matter of setting the following dependency on maven-site-plugin

<plugin>
    <artifactId>maven-site-plugin</artifactId>
    <version>3.3</version>
    <dependencies>
        <dependency>
            <groupId>net.trajano.wagon</groupId>
            <artifactId>wagon-git</artifactId>
            <version>1.0.0</version>
        </dependency>
    <dependencies>
</plugin>

The following is the multi-module example https://github.com/trajano/app/tree/wagon-git-example which can be seen at http://site.trajano.net/app/




回答3:


see the example

  • https://github.com/BITPlan/com.bitplan.multimodule

and detailed analysis

  • http://wiki.bitplan.com/index.php/Multi-Module_Maven_with_github_pages

suggesting to simply use maven-site-plugin and a bash-script function.



来源:https://stackoverflow.com/questions/21520904/multi-module-example-of-using-mvn-site-deploy-with-github-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!