1

I have groovy scripts in different locations under a parent directory. Directory structure is kinda like this:

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

I want to generate the groovy doc and include every groovy script under the parent directory.

I tried running the command on the parent directory and it only gets those in it and apparently, those in sub folder are not included :

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

If there is a better way other than the command line? I also tried this plugin but no luck https://github.com/rvowles/groovydoc-maven-plugin

Thanks!

Raji Zen
  • 11
  • 3

1 Answers1

0

This bash script works for me

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