49 lines
1.5 KiB
Ruby
49 lines
1.5 KiB
Ruby
class OpenlibertyWebprofile8 < Formula
|
|
desc "Lightweight open framework for Java (Jakarta EE Web Profile 8)"
|
|
homepage "https://openliberty.io"
|
|
url "https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/release/2022-01-03_1900/openliberty-webProfile8-22.0.0.1.zip"
|
|
sha256 "158d2928ad10cbf8feb0549a25b5bfcadc4945e3d199b971e39eb458de3f09da"
|
|
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: "a0f28b761e22222683799b48f18317e5f288eb8ad0bd876aa24eb8ddec6fca7f"
|
|
end
|
|
|
|
depends_on "openjdk"
|
|
|
|
def install
|
|
rm_rf Dir["bin/**/*.bat"]
|
|
|
|
prefix.install_metafiles
|
|
libexec.install Dir["*"]
|
|
(bin/"openliberty-webprofile8").write_env_script "#{libexec}/bin/server",
|
|
Language::Java.overridable_java_home_env
|
|
end
|
|
|
|
def caveats
|
|
<<~EOS
|
|
The home of Open Liberty Jakarta EE Web Profile 8 is:
|
|
#{opt_libexec}
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
ENV["WLP_USER_DIR"] = testpath
|
|
|
|
begin
|
|
system bin/"openliberty-webprofile8", "start"
|
|
assert_predicate testpath/"servers/.pid/defaultServer.pid", :exist?
|
|
ensure
|
|
system bin/"openliberty-webprofile8", "stop"
|
|
end
|
|
|
|
refute_predicate testpath/"servers/.pid/defaultServer.pid", :exist?
|
|
assert_match "<feature>webProfile-8.0</feature>", (testpath/"servers/defaultServer/server.xml").read
|
|
end
|
|
end
|