Name: jbehave Version: 3.9.5 Release: 1%{?dist} Summary: Behavior-Driven Development framework for Java and Groovy License: BSD URL: http://jbehave.org/ Source0: https://github.com/jbehave/jbehave-core/archive/%{name}-%{version}.tar.gz # Use gherkin <= 2.11.2, add some missing gherkin 2.12 method Patch0: %{name}-3.9.5-gherkin-2.12.patch BuildRequires: maven-local BuildRequires: mvn(asm:asm-all) BuildRequires: mvn(cglib:cglib) BuildRequires: mvn(com.google.code.gson:gson) BuildRequires: mvn(com.google.guava:guava) BuildRequires: mvn(com.google.inject:guice) BuildRequires: mvn(com.google.inject.extensions:guice-multibindings) BuildRequires: mvn(com.sun.jersey:jersey-client) BuildRequires: mvn(com.thoughtworks.paranamer:paranamer) BuildRequires: mvn(com.thoughtworks.xstream:xstream) BuildRequires: mvn(commons-collections:commons-collections) BuildRequires: mvn(commons-io:commons-io) BuildRequires: mvn(commons-lang:commons-lang) # https://bugzilla.redhat.com/show_bug.cgi?id=1203380 BuildRequires: mvn(info.cukes:gherkin) BuildRequires: mvn(javax.enterprise:cdi-api) BuildRequires: mvn(javax.inject:javax.inject) BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.apache.ant:ant) BuildRequires: mvn(org.apache.maven:maven-artifact) BuildRequires: mvn(org.apache.maven:maven-core) BuildRequires: mvn(org.apache.maven:maven-plugin-api) BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) #BuildRequires: mvn(org.apache.maven.skins:maven-default-skin) BuildRequires: mvn(org.aspectj:aspectjweaver) %if %{?fedora} > 20 BuildRequires: mvn(org.codehaus.groovy:groovy-all) BuildRequires: mvn(org.codehaus.groovy:groovy:1.8.9) %else BuildRequires: mvn(org.codehaus.groovy:groovy) %endif BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) BuildRequires: mvn(org.codehaus.plexus:plexus-archiver) BuildRequires: mvn(org.codehaus.plexus:plexus-utils) BuildRequires: mvn(org.freemarker:freemarker) BuildRequires: mvn(org.hamcrest:hamcrest-core) BuildRequires: mvn(org.hamcrest:hamcrest-integration) BuildRequires: mvn(org.hamcrest:hamcrest-library) BuildRequires: mvn(org.jboss.weld.se:weld-se) BuildRequires: mvn(org.jsoup:jsoup) BuildRequires: mvn(org.mockito:mockito-all) BuildRequires: mvn(org.picocontainer:picocontainer) BuildRequires: mvn(org.reflections:reflections) BuildRequires: mvn(org.scala-lang:scala-library) BuildRequires: mvn(org.scala-lang:scala-compiler) BuildRequires: mvn(org.springframework:spring-aop) BuildRequires: mvn(org.springframework:spring-context) BuildRequires: mvn(org.springframework:spring-test) BuildRequires: mvn(xmlunit:xmlunit) BuildArch: noarch %description JBehave is a framework for Behavior-Driven Development (BDD). BDD is an evolution of test-driven development (TDD) and acceptance-test driven design, and is intended to make these practices more accessible and intuitive to newcomers and experts alike. It shifts the vocabulary from being test-based to behavior-based, and positions itself as a design philosophy. %package ant Summary: JBehave Ant %description ant JBehave Ant Tasks. %package core Summary: JBehave Core %description core JBehave Core contains all the core functionality for running BDD stories. %package gherkin Summary: JBehave Gherkin %description gherkin Extension of JBehave Core that supports Gherkin story parsing. %package groovy Summary: JBehave Groovy %description groovy Extension of JBehave Core that supports Groovy for writing steps classes. %package guice Summary: JBehave Guice %description guice Extension of JBehave Core that supports Guice dependency injection. %package maven-plugin Summary: JBehave Maven Plugin %description maven-plugin JBehave Maven Plugin. %package pico Summary: JBehave PicoContainer %description pico Extension of JBehave Core that supports PicoContainer dependency injection. %if %{?fedora} > 20 %package rest Summary: JBehave REST %description rest Extension of JBehave Core that supports REST APIs to access stories resources. %endif %package scala Summary: JBehave Scala %description scala Extension of JBehave Core that supports Scala for writing steps classes. %package spring Summary: JBehave Spring %description spring Extension of JBehave Core that supports Spring dependency injection. %package weld Summary: JBehave Spring %description weld Extension of JBehave Core that supports Weld context and dependency injection framework. %package javadoc Summary: Javadoc for %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n %{name}-core-%{name}-%{version} # Cleanup find -name '*.class' -delete find -name 'maven-ant-tasks*.jar' -print -delete find -name '*.js' -print -delete %patch0 -p0 # This is not bundled software. This # is test resource in its preferable form for # editing, so it qualifies as source code. # jbehave-core/src/test/resources/stories.jar %pom_remove_plugin :maven-javadoc-plugin %pom_remove_plugin :maven-source-plugin %pom_remove_plugin :gmaven-plugin %pom_remove_plugin :xsite-maven-plugin %pom_remove_dep org.apache.maven.skins:maven-default-skin # Unwanted # Usupported in Fedora %pom_disable_module archetypes # Bundled of various javascript libraries %pom_disable_module jbehave-navigator # No available build deps # Use: com.google.gdata:gdata-java-client:1.40.0.atlassian-2 %pom_disable_module jbehave-google # Use: org.jenkins-ci.plugins:xunit:1.62 # org.jvnet.hudson.main:hudson-core:2.2.1 # org.jvnet.hudson.main:hudson-war:war:2.2.1 # org.jvnet.hudson.main:hudson-test-framework:2.2.1 # org.jvnet.hudson.tools:maven-hpi-plugin:3.0.1 %pom_disable_module jbehave-hudson-plugin # Use: org.jenkins-ci.plugins:xunit:1.62 # org.jvnet.hudson.main:hudson-core:2.2.1 # org.jvnet.hudson.main:hudson-war:war:2.2.1 # org.jvnet.hudson.main:hudson-test-harness:1.395 # org.jvnet.hudson.tools:maven-hpi-plugin:3.0.1 %pom_disable_module jbehave-jenkins-plugin # Use: org.needle4j:needle4j:2.3 %pom_disable_module jbehave-needle # Use: org.apache.odftoolkit:simple-odf:0.7-incubating %pom_disable_module jbehave-odf # If is available a dep and if it is used, then is no more optional %pom_xpath_remove "pom:dependencies/pom:dependency/pom:optional" jbehave-core %if %{?fedora} <= 20 # Use xstream >= 1.4 %pom_disable_module jbehave-rest # Use groovy 2.1.1 %pom_xpath_set "pom:dependencies/pom:dependency[pom:groupId = 'org.codehaus.groovy']/pom:artifactId" groovy jbehave-core # Use groovy 1.8.6 # Fix for groovy18 compat package sed -i "s|groovyjarjarasm.asm|org.objectweb.asm|" \ jbehave-groovy/src/main/java/org/jbehave/core/configuration/groovy/BytecodeGroovyClassLoader.java %else sed -i "s|groovyjarjarasm.asm|org.objectweb.distroshaded.asm|" \ jbehave-groovy/src/main/java/org/jbehave/core/configuration/groovy/BytecodeGroovyClassLoader.java %endif # Fix for groovy18 compat package %pom_xpath_set "pom:dependencies/pom:dependency[pom:groupId = 'org.codehaus.groovy']/pom:artifactId" groovy jbehave-groovy %pom_xpath_set "pom:dependencies/pom:dependency[pom:groupId = 'org.codehaus.groovy']/pom:version" 1.8.9 jbehave-groovy %pom_add_dep asm:asm-all:3.3.1 jbehave-groovy # Use maven 3 apis only %pom_remove_dep org.apache.maven:maven-project jbehave-maven-plugin %pom_add_dep org.apache.maven:maven-core jbehave-maven-plugin # Compile test suite %pom_remove_plugin org.scala-tools:maven-scala-plugin jbehave-scala %pom_add_plugin org.apache.maven.plugins:maven-antrun-plugin:1.7 jbehave-scala ' scala-test-compile process-test-resources run org.scala-lang scala-compiler 2.9.1 ' # Remove duplicate entry %pom_remove_dep :aspectjrt jbehave-spring # NoClassDefFoundError: org/xmlpull/v1/XmlPullParserFactory %pom_add_dep xpp3:xpp3::test jbehave-rest # ComparisonFailure rm -r jbehave-core/src/test/java/org/jbehave/core/reporters/CrossReferenceBehaviour.java \ jbehave-core/src/test/java/org/jbehave/core/steps/StepsBehaviour.java # Fail on ARM builder rm -r jbehave-core/src/test/java/org/jbehave/core/embedder/MetaFilterBehaviour.java \ jbehave-core/src/test/java/org/jbehave/core/reporters/TemplateableOutputBehaviour.java \ jbehave-core/src/test/java/org/jbehave/core/reporters/StackTraceFormatterBehaviour.java # Fix perms chmod 644 LICENSE.txt README.md %build %mvn_build -s %install %mvn_install # TODO jbehave-core/target/jbehave-core-resources.zip is used at runtime by jbehave-maven-plugin %files -f .mfiles-%{name} %if %{?fedora} <= 20 %dir %{_javadir}/%{name} %endif %doc README.md %license LICENSE.txt %files ant -f .mfiles-%{name}-ant %license LICENSE.txt %files core -f .mfiles-%{name}-core %license LICENSE.txt %files gherkin -f .mfiles-%{name}-gherkin %license LICENSE.txt %files groovy -f .mfiles-%{name}-groovy %license LICENSE.txt %files guice -f .mfiles-%{name}-guice %license LICENSE.txt %files maven-plugin -f .mfiles-%{name}-maven-plugin %license LICENSE.txt %files pico -f .mfiles-%{name}-pico %license LICENSE.txt %if %{?fedora} > 20 %files rest -f .mfiles-%{name}-rest %license LICENSE.txt %endif %files scala -f .mfiles-%{name}-scala %license LICENSE.txt %files spring -f .mfiles-%{name}-spring %license LICENSE.txt %files weld -f .mfiles-%{name}-weld %license LICENSE.txt %files javadoc -f .mfiles-javadoc %license LICENSE.txt %changelog * Sun Mar 15 2015 gil cattaneo 3.9.5-1 - initial rpm