%global tomcatservletversion 3.1 %global srcurl https://github.com/JWebUnit/%{name} # FIXME plugin tests fail in koji with 503 Service unavailable # https://github.com/JWebUnit/jwebunit/issues/5 %bcond_with plugintests Name: jwebunit Version: 3.3 Release: 4%{?dist} Summary: Java framework for testing web applications # general license is LGPLv2, BSD for JWebUnit.jj and WebTestCase.jj # https://java.net/downloads/javacc/contrib/grammars/java-1.7.jj License: LGPLv3+ and BSD URL: https://%{name}.github.io/%{name} Source0: %{srcurl}/archive/%{name}-%{version}.tar.gz # Update to HtmlUnit 2.23, https://github.com/JWebUnit/jwebunit/issues/5 Patch0: %{srcurl}/commit/c46b03879f9a94121018883d60e3a386ac37dda7.patch BuildArch: noarch # core BuildRequires: junit BuildRequires: regexp BuildRequires: jcl-over-slf4j BuildRequires: tomcat-servlet-%{tomcatservletversion}-api # htmlunit plugin BuildRequires: htmlunit BuildRequires: logback # test deps BuildRequires: mockito %if %with plugintests BuildRequires: apache-commons-fileupload BuildRequires: apache-commons-io BuildRequires: hamcrest BuildRequires: jetty-webapp BuildRequires: tempus-fugit %endif BuildRequires: maven-local BuildRequires: javacc-maven-plugin BuildRequires: maven-plugin-exec BuildRequires: maven-site-plugin #BuildRequires: maven-license-plugin %if 0%{?fedora} Suggests: %{name}-htmlunit-plugin = %{version}-%{release} %endif %description JWebUnit is a Java framework that facilitates creation of acceptance tests for web applications. It evolved from a project where we were using HttpUnit and JUnit to create acceptance tests. As the tests were being written, they were continuously ref-actored to remove duplication and other bad smells in the test code. JWebUnit is the result of these refactorings. %package code-generator Summary: JWebUnit Code Generator %description code-generator JavaCC parsers that create WebTestCase and JWebUnit based on WebTester. %package core Summary: JWebUnit Core - API %description core The core API of JWebUnit. Define how tests should be written and interface for testing engines. %package htmlunit-plugin Summary: JWebUnit Core - API %description htmlunit-plugin The core API of JWebUnit. Define how tests should be written and interface for testing engines. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %autosetup -p1 -n%{name}-%{name}-%{version} #pom_remove_plugin :findbugs-maven-plugin %pom_remove_plugin :jdepend-maven-plugin #pom_remove_plugin :taglist-maven-plugin #pom_remove_plugin :maven-toolchains-plugin #pom_remove_plugin :maven-site-plugin: %pom_remove_plugin :maven-changes-plugin: %pom_remove_plugin :maven-scm-publish-plugin: # Some files do not show the expected license header # v3.2 (SourceForge): https://sf.net/p/jwebunit/bugs/137 # v3.3 (GitHub): https://github.com/JWebUnit/jwebunit/issues/3 %pom_remove_plugin :maven-license-plugin: # FIXME unavailable build deps # org.seleniumhq.selenium:selenium-htmlunit-driver:jar:2.40.0 # org.seleniumhq.selenium:selenium-support:jar:2.40.0 # biz.neustar:browsermob-proxy:jar:2.0-beta-7 %pom_disable_module %{name}-webdriver-plugin %if %without plugintests # Unwanted, used only for testing plugin ... really? %pom_disable_module %{name}-commons-tests %pom_remove_dep :%{name}-commons-tests %{name}-htmlunit-plugin rm -r %{name}-htmlunit-plugin/src/test/java/net/sourceforge/%{name}/htmlunit/* %endif %mvn_package :%{name}-commons-tests __noinstall %build %mvn_build -s %install %mvn_install %files -f .mfiles-%{name} %license COPYING COPYING.LESSER LICENSE.txt %doc README.md %files code-generator -f .mfiles-%{name}-code-generator %license COPYING COPYING.LESSER LICENSE.txt %files core -f .mfiles-%{name}-core %license COPYING COPYING.LESSER LICENSE.txt %files htmlunit-plugin -f .mfiles-%{name}-htmlunit-plugin %files javadoc -f .mfiles-javadoc %license COPYING COPYING.LESSER LICENSE.txt %changelog * Fri Nov 11 2016 Raphael Groner - 3.3-4 - drop unneeded explicit Requires - add weak dependency to plugin - simplify build of subpackages - use available tempus-fugit - disable plugin tests * Tue Oct 04 2016 Raphael Groner - 3.3-3 - add BSD license, see upstream issue #3 * Mon Oct 03 2016 Raphael Groner - 3.3-2 - add patch for htmlunit 2.23 * Sat Oct 01 2016 Raphael Groner - 3.3-1 - new release from GitHub - modernize for package review * Sat Jun 01 2013 gil cattaneo 3.0-1 - initial rpm