homebrew-core/Formula/vert.x.rb

40 lines
1.3 KiB
Ruby

class VertX < Formula
desc "Toolkit for building reactive applications on the JVM"
homepage "https://vertx.io/"
url "https://search.maven.org/remotecontent?filepath=io/vertx/vertx-stack-manager/4.1.3/vertx-stack-manager-4.1.3-full.tar.gz"
sha256 "d64cc4f65a4fea0e91f4095481c37b608251b75520b66a03872cfecc53d5ba23"
license any_of: ["EPL-2.0", "Apache-2.0"]
livecheck do
url "https://search.maven.org/remotecontent?filepath=io/vertx/vertx-stack-manager/"
regex(%r{href=["']?v?(\d+(?:\.\d+)+)/?["' >]}i)
end
bottle do
sha256 cellar: :any_skip_relocation, all: "b796f03d73c930fefda251c6725b25de39114f10834307605d3d46effce6ce14"
end
depends_on "openjdk"
def install
rm_f Dir["bin/*.bat"]
libexec.install %w[bin conf lib]
(bin/"vertx").write_env_script "#{libexec}/bin/vertx", Language::Java.overridable_java_home_env
end
test do
(testpath/"HelloWorld.java").write <<~EOS
import io.vertx.core.AbstractVerticle;
public class HelloWorld extends AbstractVerticle {
public void start() {
System.out.println("Hello World!");
vertx.close();
System.exit(0);
}
}
EOS
output = shell_output("#{bin}/vertx run HelloWorld.java")
assert_equal "Hello World!\n", output
end
end