我在父目录下的不同位置放置了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
谢谢!
发布于 2020-02-18 23:39:26
此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_fileshttps://stackoverflow.com/questions/33339180
复制相似问题