File spark-core.spec of Package spark-core

#
# spec file for package spark-core
#
# Copyright (c) 2022 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/
#

## disable autogeneration of "requires"
%undefine __maven_requires
%undefine __maven_requires_opts


%global modname  spark

Name:           spark-core
Version:        2.9.3
Release:        0
License:        Apache-2.0
Summary:        A Sinatra inspired java web framework
URL:            http://www.sparkjava.com
Group:          Development/Libraries/Java
Source0:        %{modname}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  fdupes
BuildRequires:  maven-local
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires:  mvn(org.eclipse.jetty.websocket:websocket-server)
BuildRequires:  mvn(org.eclipse.jetty.websocket:websocket-servlet)
BuildRequires:  mvn(org.eclipse.jetty:jetty-server)
BuildRequires:  mvn(org.eclipse.jetty:jetty-webapp)
BuildRequires:  mvn(org.slf4j:slf4j-api)
BuildRequires:  mvn(org.sonatype.oss:oss-parent:pom:)
BuildArch:      noarch
Provides:       spark == %{version}
Obsoletes:      spark < %{version}
Requires:       java >= 1.8
Requires:       java-headless >= 1.8
Requires:       javapackages-filesystem
Requires:       mvn(org.slf4j:slf4j-api)
## prevent to install jetty dependency on SUMA where it is not needed
Recommends:     mvn(org.eclipse.jetty.websocket:websocket-server)
Recommends:     mvn(org.eclipse.jetty.websocket:websocket-servlet)
Recommends:     mvn(org.eclipse.jetty:jetty-server)
Recommends:     mvn(org.eclipse.jetty:jetty-webapp)

%description
A Sinatra inspired framework for creating web applications in Java with minimal effort

%package javadoc
Summary:        Javadoc for %{name}

%description javadoc
This package contains javadoc for %{name}

%prep
%setup -q -n %{modname}-%{version}
%pom_remove_plugin org.apache.maven.plugins:maven-enforcer-plugin

%build
%{mvn_build} -f -- -Dsource=8

%install
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}

%files -f .mfiles
%license LICENSE

%files javadoc -f .mfiles-javadoc
%license LICENSE

%changelog
openSUSE Build Service is sponsored by