How to catch exception in a beanshell?
问题 I can use the evaluateBeanshell rule to enforce some convention: no colon's in directories below src. <plugin> <artifactId>maven-enforcer-plugin</artifactId> <version>1.4.1</version> <executions> <execution> <id>enforce-beanshell</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <evaluateBeanshell> <condition>org.codehaus.plexus.util.FileUtils.getDirectoryNames(new File("src"), "**/*:*", null, false).isEmpty()</condition> </evaluateBeanshell> </rules> </configuration> <