Advertisement
JetSerge

Untitled

Feb 6th, 2014
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. protected void checkValidServerHome(String home, String version) throws Exception {
  2. if (StringUtil.isEmptyOrSpaces(home)) {
  3. throw new Exception(TomcatBundle.message("error.message.tomcat.home.path.should.not.be.empty"));
  4. }
  5.  
  6. checkDir(new File(home, "bin"));
  7. checkDir(new File(home, TomcatConstants.CATALINA_BIN_DIRECTORY_NAME));
  8. if (new Version(version).getMajor() >= 6) {
  9. checkDir(new File(home, TomcatConstants.CATALINA_LIB_DIRECTORY_NAME));
  10. }
  11. else {
  12. File common = new File(home, TomcatConstants.CATALINA_COMMON_DIRECTORY_NAME);
  13. checkDir(common);
  14. checkDir(new File(common, TomcatConstants.CATALINA_LIB_DIRECTORY_NAME));
  15. }
  16.  
  17. if (isTomEE(home)) {
  18. if (!findLibByPattern(home, OPENEJB_CLIENT_JAR_PATTERN)
  19. || !findLibByPattern(home, OPENEJB_CORE_JAR_PATTERN)) {
  20. throw new FileNotFoundException("TomEE deployer jar(s) not found");
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement