【问题标题】:Generate groovydoc and include sub directories生成 groovydoc 并包含子目录
【发布时间】:2015-10-26 05:46:28
【问题描述】:

我在父目录下的不同位置有 groovy 脚本。目录结构是这样的:

magento
└── magento.groovy
└── models
    ├── cart.groovy
    ├── catalog.groovy
    ├── customer.groovy
    ├── directory.groovy
    ├── filter.groovy
    ├── inventory.groovy
    ├── products.groovy
    └── salesorder.groovy

我想生成 groovy 文档并将每个 groovy 脚本包含在父目录下。

我尝试在父目录上运行命令,它只获取其中的内容,显然,子文件夹中的内容不包括在内:

groovydoc \
-classpath /opt/groovy-2.4.4/lib/ \
-d /opt/groovy-test/test/magento \
-windowtitle "Magento Groovydoc Example" \
-header "Test Groovy doc for Magento" \
-doctitle "Magento Test Groovydoc"  *.groovy

除了命令行还有其他更好的方法吗?我也试过这个插件,但没有运气https://github.com/rvowles/groovydoc-maven-plugin

谢谢!

【问题讨论】:

    标签: maven groovy groovydoc


    【解决方案1】:

    这个 bash 脚本适合我

    source_files=`find {path-to-your-dir}/magento/ -type f \( \
        \( \
        -name "*.java" \
        -or -name "*.groovy" \
        \) \
        ! \
        \( \
         -name "PastingSomeFileNamesHereYouCanExludeSomething.java" \
         -or -name "SomeAdditionalFile.groovy" \
        \) \
        \)`
    
    groovydoc -verbose --debug -public\
     -d {path-to-your-magento-dir-docs}\
     -doctitle "Title"\
     -header "Header"\
     -footer "Footer"\
     -windowtitle "WindowTitle"\
     $source_files
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多