38 lines
1.2 KiB
Ruby
38 lines
1.2 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.0.3/vertx-stack-manager-4.0.3-full.tar.gz"
|
|
sha256 "c8276370859fb9f768fe259ae11198ec771986d56a76caf5909207a0daa2c1f4"
|
|
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 :unneeded
|
|
|
|
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
|