Sisyphus repository
Last update: 30 november 2022 | SRPMs: 17938 | Visits: 25425707
en ru br
ALT Linux repos
5.0: 5.6-alt2_1jpp5

Group :: Development/Java
RPM: testng

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Epoch: 0
Group: Development/Java
AutoReq: yes,noosgi
BuildRequires: rpm-build-java-osgi
BuildRequires: /proc rpm-build-java
BuildRequires: jpackage-default
# fedora bcond_with macro
%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
# redefine altlinux specific with and without
%define with()         %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
%define without()      %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
# see
%define _localstatedir %{_var}
%bcond_with bootstrap

Name:           testng
Version:        7.4.0
Release:        alt1_3jpp11
Summary:        Java-based testing framework
License:        ASL 2.0

# ./

Source0:        %{name}-%{version}.tar.gz

# Allows building with maven instead of gradle

Source1:        pom.xml

# Remove bundled binaries to make sure we don't ship anything forbidden


Patch0:         0001-Avoid-accidental-javascript-in-javadoc.patch
Patch1:         0002-Replace-bundled-jquery-with-CDN-link.patch

BuildArch:      noarch

BuildRequires:  maven-local
%if %{with bootstrap}
BuildRequires:  javapackages-bootstrap
BuildRequires:  mvn(com.beust:jcommander)
BuildRequires:  mvn(
BuildRequires:  mvn(
BuildRequires:  mvn(junit:junit)
BuildRequires:  mvn(org.apache.ant:ant)
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)

TestNG is a testing framework inspired from JUnit and NUnit but introducing
some new functionality, including flexible test configuration, and
distributed test running.  It is designed to cover unit tests as well as
functional, end-to-end, integration, etc.

%package javadoc
Group: Development/Java
Summary:        API documentation for %{name}
BuildArch: noarch

%description javadoc
This package contains the API documentation for %{name}.

%setup -q -n %{name}-%(echo %{version} | tr '~' '-')

%patch0 -p1
%patch1 -p1

sed 's/ at VERSION at /%{version}/' %{SOURCE1} > pom.xml

# remove any bundled libs, but not test resources

find ! -path "*/test/*" -name *.jar -print -delete
find -name *.class -delete

# these are unnecessary

%pom_remove_plugin :maven-gpg-plugin
%pom_remove_plugin :maven-source-plugin
%pom_remove_plugin :maven-javadoc-plugin

%pom_remove_dep org.yaml:snakeyaml
rm src/main/java/org/testng/internal/Yaml*.java
rm src/main/java/org/testng/

%pom_remove_dep :bsh

%pom_xpath_inject "pom:dependency[pom:artifactId='guice']" "<classifier>no_aop</classifier>"

sed -i -e 's/DEV-SNAPSHOT/%{version}/' src/main/java/org/testng/internal/

cp -p ./src/main/java/*.dtd.html ./src/main/resources/.

%mvn_file : %{name}
# jdk15 classifier is used by some other packages
%mvn_alias : :::jdk15:

%mvn_build -f -- -Dmaven.compiler.source=1.8 -Dmaven.javadoc.source=1.8 -Dmaven.compiler.release=8


%files -f .mfiles
%doc CHANGES.txt
%doc --no-dereference LICENSE.txt

%files javadoc -f .mfiles-javadoc
%doc --no-dereference LICENSE.txt


Full changelog you can see here

design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin