%global namedreltag .RELEASE %global namedversion %{version}%{?namedreltag} Name: springframework-webflow # Latest release use Spring Framework >= 4.0.0.RELEASE Version: 2.3.1 Release: 1%{?dist} Summary: Spring Web Flow License: ASL 2.0 URL: http://projects.spring.io/spring-webflow/ Source0: https://github.com/spring-projects/spring-webflow/archive/v%{namedversion}.tar.gz # Replace ognl:ognl:2.6.9 Patch0: springframework-webflow-2.3.1-commons-ognl.patch BuildRequires: maven-local BuildRequires: mvn(commons-collections:commons-collections) BuildRequires: mvn(commons-logging:commons-logging) BuildRequires: mvn(javax.el:el-api) BuildRequires: mvn(javax.persistence:persistence-api) BuildRequires: mvn(javax.portlet:portlet-api) BuildRequires: mvn(javax.servlet:jstl) BuildRequires: mvn(javax.servlet:javax.servlet-api) BuildRequires: mvn(javax.transaction:jta) BuildRequires: mvn(joda-time:joda-time) BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.apache.commons:commons-ognl) BuildRequires: mvn(org.apache.openjpa:openjpa-lib) BuildRequires: mvn(org.apache.openjpa:openjpa-persistence) BuildRequires: mvn(org.apache.openjpa:openjpa-persistence-jdbc) BuildRequires: mvn(org.apache.tiles:tiles-api) BuildRequires: mvn(org.apache.tiles:tiles-core) BuildRequires: mvn(org.apache.tiles:tiles-jsp) BuildRequires: mvn(org.apache.tiles:tiles-servlet) BuildRequires: mvn(org.easymock:easymock) BuildRequires: mvn(org.hibernate:hibernate-core:3) BuildRequires: mvn(org.hsqldb:hsqldb) BuildRequires: mvn(org.springframework:spring-beans) BuildRequires: mvn(org.springframework:spring-context) BuildRequires: mvn(org.springframework:spring-core) BuildRequires: mvn(org.springframework:spring-expression) BuildRequires: mvn(org.springframework:spring-orm) BuildRequires: mvn(org.springframework:spring-test) BuildRequires: mvn(org.springframework:spring-tx) BuildRequires: mvn(org.springframework:spring-web) BuildRequires: mvn(org.springframework:spring-webmvc) BuildRequires: mvn(org.springframework:spring-webmvc-portlet) BuildRequires: mvn(org.springframework.security:spring-security-core) BuildArch: noarch %description Spring Web Flow builds on Spring MVC and allows implementing the "flows" of a web application. A flow encapsulates a sequence of steps that guide a user through the execution of some business task. It spans multiple HTTP requests, has state, deals with transactional data, is reusable, and may be dynamic and long-running in nature.. %package binding Summary: Spring Binding %description binding The Spring Data Binding framework, a utility library used by Web Flow. %package js Summary: Spring JavaScript module %description js The Spring JavaScript module. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n spring-webflow-%{namedversion} find -name "*.class" -delete find -name "*.jar" -print -delete rm -r spring-js-resources/dojo-build/dojo-build.zip %patch0 -p1 %pom_disable_module spring-js-resources %pom_remove_dep :spring-js-resources spring-js %pom_disable_module spring-faces %pom_remove_plugin :maven-antrun-plugin spring-js-resources %pom_remove_plugin :maven-source-plugin spring-binding %pom_add_plugin org.apache.felix:maven-bundle-plugin:2.3.7 spring-binding ' true org.springframework.binding ${project.name} SpringSource ${project.version} bundle-manifest process-classes manifest ' %pom_add_plugin org.apache.maven.plugins:maven-jar-plugin:2.4 spring-binding ' ${project.build.outputDirectory}/META-INF/MANIFEST.MF ' %pom_xpath_set "pom:dependencies/pom:dependency[pom:groupId = 'javax.servlet']/pom:version" 3.1.0 spring-js %pom_xpath_set "pom:dependencies/pom:dependency[pom:groupId = 'javax.servlet']/pom:artifactId" javax.servlet-api spring-js %pom_remove_plugin :maven-source-plugin spring-js %pom_add_plugin org.apache.felix:maven-bundle-plugin:2.3.7 spring-js ' true org.springframework.js ${project.name} SpringSource ${project.version} bundle-manifest process-classes manifest ' %pom_add_plugin org.apache.maven.plugins:maven-jar-plugin:2.4 spring-js ' ${project.build.outputDirectory}/META-INF/MANIFEST.MF ' %pom_xpath_set "pom:dependencies/pom:dependency[pom:groupId = 'javax.servlet']/pom:version" 3.1.0 spring-webflow %pom_xpath_set "pom:dependencies/pom:dependency[pom:groupId = 'javax.servlet']/pom:artifactId" javax.servlet-api spring-webflow %pom_xpath_set "pom:dependencies/pom:dependency[pom:groupId = 'org.hibernate']/pom:version" 3 spring-webflow %pom_xpath_set "pom:dependencies/pom:dependency[pom:groupId = 'org.hibernate']/pom:artifactId" hibernate-core spring-webflow %pom_xpath_set "pom:dependencies/pom:dependency[pom:groupId = 'javax.transaction']/pom:artifactId" jta spring-webflow %pom_xpath_set "pom:dependencies/pom:dependency[pom:artifactId = 'openjpa-lib-5']/pom:artifactId" openjpa-lib spring-webflow %pom_remove_dep backport-util-concurrent:backport-util-concurrent spring-webflow sed -i "s|edu.emory.mathcs.backport.||" \ spring-webflow/src/main/java/org/springframework/webflow/conversation/impl/JdkBackportConcurrentConversationLock.java %pom_remove_plugin :maven-source-plugin spring-webflow %pom_add_plugin org.apache.felix:maven-bundle-plugin:2.3.7 spring-webflow ' true org.springframework.webflow ${project.name} SpringSource ${project.version} bundle-manifest process-classes manifest ' %pom_add_plugin org.apache.maven.plugins:maven-jar-plugin:2.4 spring-webflow ' ${project.build.outputDirectory}/META-INF/MANIFEST.MF ' # Add missing resources for avoid test failure %pom_xpath_inject "pom:build/pom:resources/pom:resource/pom:includes" "**/*.xsl" spring-webflow %pom_remove_dep org.jboss.el:jboss-el spring-binding rm -r spring-binding/src/test/java/org/springframework/binding/expression/el/ELExpressionParserTests.java \ spring-binding/src/test/java/org/springframework/binding/expression/spel/ELExpressionParserCompatibilityTests.java # Caused by: java.lang.IllegalStateException: Could not load 'DispatcherServlet.properties': # class path resource [org/springframework/web/servlet/DispatcherServlet.properties] # cannot be opened because it does not exist rm -r spring-js/src/test/java/org/springframework/js/ajax/tiles2/AjaxTilesViewTests.java %pom_remove_dep org.jboss.el:jboss-el spring-webflow rm -r spring-webflow/src/test/java/org/springframework/webflow/expression/el/WebFlowELExpressionParserTests.java # missing resources rm -r spring-webflow/src/test/java/org/springframework/webflow/security/SecurityFlowExecutionListenerTests.java # missing resources rm -r spring-webflow/src/test/java/org/springframework/webflow/persistence/JpaFlowExecutionListenerTests.java \ spring-webflow/src/test/java/org/springframework/webflow/persistence/JpaPersistenceContextPropagationTests.java \ spring-webflow/src/test/java/org/springframework/webflow/persistence/JpaFlowManagedPersistenceIntegrationTests.java # missing resources rm -r spring-webflow/src/test/java/org/springframework/webflow/mvc/portlet/PortletMvcViewTests.java cp -p build-spring-webflow/resources/changelog.txt . cp -p build-spring-webflow/resources/license.txt . cp -p build-spring-webflow/resources/notice.txt . sed -i 's/\r//' readme.txt %mvn_package :spring-webflow-root __noinstall %build %mvn_build -s -- -Dproject.build.sourceEncoding=UTF-8 %install %mvn_install %files -f .mfiles-spring-webflow %dir %{_javadir}/%{name} %doc changelog.txt README.md readme.txt %license license.txt notice.txt %files binding -f .mfiles-spring-binding %files js -f .mfiles-spring-js %files javadoc -f .mfiles-javadoc %license license.txt notice.txt %changelog * Thu Mar 19 2015 gil cattaneo 2.3.1-1 - initial rpm