Find pom in subdirectories and execute mvn clean
Something like this should probably work:
find . -name "pom.xml" -exec mvn clean -f '{}' ;
in general, you would want to issue mvn clean
on the parent pom, which would clean all children defined as modules, too.
If you don't have and don't want such a parent you'll need to use brute force for this, meaning something like
for dir in yourdirectory;
do
cd $dir
if [ -f pom.xml ];
then
mvn clean
fi
done