%global namedreltag .Final %global namedversion %{version}%{?namedreltag} # Unavailable test dep: io.undertow:undertow-core:test-jar: %bcond_with tests Name: undertow-js Version: 1.0.2 Release: 1%{?dist} Summary: JavaScript based handlers for Undertow License: ASL 2.0 URL: https://github.com/undertow-io/undertow.js Source0: https://github.com/undertow-io/undertow.js/archive/%{namedversion}.tar.gz # https://issues.jboss.org/browse/UTJS-3 # https://issues.jboss.org/browse/UTJS-4 Source1: http://www.apache.org/licenses/LICENSE-2.0.txt BuildRequires: maven-local BuildRequires: mvn(com.github.spullara.mustache.java:compiler) BuildRequires: mvn(io.undertow:undertow-core) BuildRequires: mvn(io.undertow:undertow-servlet) BuildRequires: mvn(io.undertow:undertow-websockets-jsr) BuildRequires: mvn(javax.enterprise:cdi-api) BuildRequires: mvn(org.freemarker:freemarker) >= 2.3.23 BuildRequires: mvn(org.jboss:jboss-parent:pom:) BuildRequires: mvn(org.jboss.logging:jboss-logging-processor) %if %{with tests} BuildRequires: mvn(com.h2database:h2) BuildRequires: mvn(io.undertow:undertow-core:test-jar:) BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.apache.httpcomponents:httpclient) BuildRequires: mvn(org.jboss.logmanager:jboss-logmanager) BuildRequires: mvn(org.jboss.spec.javax.websocket:jboss-websocket-api_1.1_spec) BuildRequires: mvn(org.jboss.xnio:xnio-nio) %endif BuildArch: noarch %description Undertow.js is an integration library that provides and easy way to integrate server side JavaScript code with Java EE components. This project allows you to register Undertow handlers using javascript, which can inject and use EE components such as CDI beans. It supports hot deployment, so it is possible to modify your scripts without any compile + redeploy cycle (especially when combined with the upcoming external resource support in Wildfly). %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n undertow.js-%{namedversion} cp -p %{SOURCE1} LICENSE sed -i 's/\r//' LICENSE %if %{without tests} %pom_xpath_remove "pom:dependency[pom:type = 'test-jar']" %pom_xpath_remove "pom:dependency[pom:scope = 'test']" %endif %mvn_file io.undertow.js:%{name} %{name} %build %if %{without tests} opts="-f" %endif # Test disabled: unavailable test dep %mvn_build $opts %install %mvn_install %files -f .mfiles %doc README.md %license LICENSE %files javadoc -f .mfiles-javadoc %license LICENSE %changelog * Mon Jun 06 2016 gil cattaneo 1.0.2-1 - initial rpm