# # spec file for package java-scriptengine # # Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: java-scriptengine Version: 2.0.0 Release: 0 Summary: Script engine to compile and execute scripts written in Java at runtime License: MIT Group: Development/Libraries/Java URL: https://github.com/eobermuhlner/%{name} Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: fdupes BuildRequires: maven-local BuildArch: noarch %description The java-scriptengine (not to be confused with a javascript script engine) compiles and executes Java files at runtime. The script source is a standard Java class that out of the box must follow these rules: • public class • constructor with no arguments (default constructor) • Callable entry point. One of the following: ◦ class implements Supplier: the get() method is called ◦ class implements Runnable: the run() method is called ◦ class has exactly one public method with no arguments: call it Note: The class may have any number private methods and public methods with arguments. The script class can be arbitrarily named and may be in a named package or the default package. The java-scriptengine needs Java 8 or later to run. %package javadoc Summary: API documentation for %{name} Group: Documentation/HTML %description javadoc API documentation for %{name}. %prep %setup -q mv pom.xml ch.obermuhlner.scriptengine.java %{mvn_file} : %{name} %build pushd ch.obermuhlner.scriptengine.java %{mvn_build} -f -- -Dmaven.compiler.{source,target}=8 popd %install pushd ch.obermuhlner.scriptengine.java %mvn_install %fdupes %{buildroot}%{_javadocdir}/%{name} popd %files -f ch.obermuhlner.scriptengine.java/.mfiles %license LICENSE.txt %doc README.md docs/releases/v*.md %files javadoc -f ch.obermuhlner.scriptengine.java/.mfiles-javadoc %license LICENSE.txt %changelog