Class TomcatDownloader

java.lang.Object
io.github.rajendarreddyj.tomcat.download.TomcatDownloader

public class TomcatDownloader extends Object
Downloads and extracts Apache Tomcat distributions.
Since:
1.0.0
Author:
rajendarreddyj
  • Constructor Details

    • TomcatDownloader

      public TomcatDownloader()
      Creates a new TomcatDownloader instance.
  • Method Details

    • download

      public Path download(String version, Path cacheDir, Log log) throws IOException
      Downloads Tomcat if not cached, then extracts and returns the installation path.
      Parameters:
      version - Full Tomcat version (e.g., "10.1.52")
      cacheDir - Directory to cache downloads (e.g., ~/.m2/tomcat-cache)
      log - Maven logger
      Returns:
      Path to the extracted Tomcat installation
      Throws:
      IOException - if download or extraction fails