49 lines
1.4 KiB
Ruby
49 lines
1.4 KiB
Ruby
class OpenlibertyJakartaee8 < Formula
|
|
desc "Lightweight open framework for Java (Jakarta EE 8)"
|
|
homepage "https://openliberty.io"
|
|
url "https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/release/22.0.0.13/openliberty-javaee8-22.0.0.13.zip"
|
|
sha256 "a2b22f087a924ae005db523069670590db268a7e1bff0410f6fb3aded37571a7"
|
|
license "EPL-1.0"
|
|
|
|
livecheck do
|
|
url "https://openliberty.io/api/builds/data"
|
|
regex(/openliberty[._-]v?(\d+(?:\.\d+)+)\.zip/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, all: "46dfe84e481efb9004def303a6b9dacb0c75d834efc8e59f1e7b58f6a7da520d"
|
|
end
|
|
|
|
depends_on "openjdk"
|
|
|
|
def install
|
|
rm_rf Dir["bin/**/*.bat"]
|
|
|
|
prefix.install_metafiles
|
|
libexec.install Dir["*"]
|
|
(bin/"openliberty-jakartaee8").write_env_script "#{libexec}/bin/server",
|
|
Language::Java.overridable_java_home_env
|
|
end
|
|
|
|
def caveats
|
|
<<~EOS
|
|
The home of Open Liberty Jakarta EE 8 is:
|
|
#{opt_libexec}
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
ENV["WLP_USER_DIR"] = testpath
|
|
|
|
begin
|
|
system bin/"openliberty-jakartaee8", "start"
|
|
assert_predicate testpath/"servers/.pid/defaultServer.pid", :exist?
|
|
ensure
|
|
system bin/"openliberty-jakartaee8", "stop"
|
|
end
|
|
|
|
refute_predicate testpath/"servers/.pid/defaultServer.pid", :exist?
|
|
assert_match "<feature>javaee-8.0</feature>", (testpath/"servers/defaultServer/server.xml").read
|
|
end
|
|
end
|