%global namedreltag .RELEASE
%global namedversion %{version}%{?namedreltag}
# Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=10007119
%global oname spring-roo
Name: springframework-roo
# Newer release use OSGi apis >= 5.0.0
Version: 1.2.5
Release: 1%{?dist}
Summary: Development tool for Java developers
License: ASL 2.0
URL: http://projects.spring.io/spring-roo/
Source0: https://github.com/spring-projects/spring-roo/archive/%{namedversion}.tar.gz
BuildRequires: maven-local
BuildRequires: mvn(ant-contrib:ant-contrib)
BuildRequires: mvn(commons-codec:commons-codec)
BuildRequires: mvn(commons-io:commons-io)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.ant:ant-apache-regexp)
BuildRequires: mvn(org.apache.commons:commons-lang3)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
BuildRequires: mvn(org.apache.felix:org.apache.felix.scr.annotations)
BuildRequires: mvn(org.mockito:mockito-all)
BuildRequires: mvn(org.osgi:org.osgi.core)
BuildRequires: mvn(org.osgi:org.osgi.compendium)
BuildRequires: mvn(org.powermock:powermock-module-junit4)
BuildRequires: mvn(org.powermock:powermock-api-mockito)
BuildArch: noarch
%description
Spring Roo is a next-generation rapid application development tool
for Java developers. It focuses on higher productivity,
stock-standard Java APIs, high usability, avoiding
engineering trade-offs and facilitating easy Roo removal.
%package addon-jdbc
Summary: Spring Roo - Addon - JDBC Driver Acquisition
%description addon-jdbc
Spring Roo - Addon - JDBC Driver Acquisition.
%package annotations
Summary: Spring Roo - Annotations (ASLv2 Licensed)
%description annotations
Spring Roo - Annotations (ASLv2 Licensed).
%package deployment-support
Summary: Spring Roo - Deployment Support
%description deployment-support
Spring Roo - Deployment Support.
%package file-monitor
Summary: Spring Roo - File Monitor
%description file-monitor
Spring Roo - File Monitor.
%package file-monitor-polling
Summary: Spring Roo - File Monitor - Polling
%description file-monitor-polling
Spring Roo - File Monitor - Polling.
%package file-monitor-polling-roo
Summary: Spring Roo - File Monitor - Polling (Roo Launcher)
%description file-monitor-polling-roo
Spring Roo - File Monitor - Polling (Roo Launcher).
%package file-undo
Summary: Spring Roo - File Undo
%description file-undo
Spring Roo - File Undo.
%package metadata
Summary: Spring Roo - Metadata
%description metadata
Spring Roo - Metadata.
%package model
Summary: Spring Roo - Model
%description model
Spring Roo - Model.
%package osgi-bundle
Summary: Spring Roo - OSGi Bundle Module Parent
%description osgi-bundle
Spring Roo - OSGi Bundle Module Parent.
%package osgi-roo-bundle
Summary: Spring Roo - OSGi Roo Bundle Module Parent
%description osgi-roo-bundle
Spring Roo - OSGi Roo Bundle Module Parent.
%package process-manager
Summary: Spring Roo - Process Manager
%description process-manager
Spring Roo - Process Manager.
%package shell
Summary: Spring Roo - Shell
License: ASL 2.0 and BSD
%description shell
Spring Roo - Shell.
%package shell-osgi
Summary: Spring Roo - Shell (OSGi Launcher)
%description shell-osgi
Spring Roo - Shell (OSGi Launcher).
%package startlevel
Summary: Spring Roo - OSGi Start Level Control
%description startlevel
Spring Roo - OSGi Start Level Control.
%package support
Summary: Spring Roo - Support
%description support
Spring Roo - Support.
%package support-osgi
Summary: Spring Roo - Support for OSGi Features
%description support-osgi
Spring Roo - Support for OSGi Features.
%package url-stream
Summary: Spring Roo - URL Stream API Contract
%description url-stream
Spring Roo - URL Stream API Contract.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q -n %{oname}-%{namedversion}
find . -name "*.bat" -delete
find . -name "*.class" -delete
find . -name "*.jar" -delete
# remove org.springframework.build.aws:org.springframework.build.aws.maven
%pom_xpath_remove "pom:build/pom:extensions"
%pom_remove_plugin :maven-gpg-plugin
%pom_remove_plugin :maven-source-plugin
%pom_remove_plugin org.apache.maven.plugins:maven-help-plugin
%pom_remove_plugin org.apache.maven.plugins:maven-deploy-plugin
%pom_remove_plugin org.apache.maven.plugins:maven-idea-plugin
# m_remove_plugin org.sonatype.plugins:nexus-staging-maven-plugin
# m_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-javadoc-plugin']/pom:executions"
%pom_remove_plugin :maven-clean-plugin
%pom_remove_plugin :maven-eclipse-plugin
#%% pom_remove_plugin :maven-site-plugin
%pom_remove_plugin :maven-install-plugin
%pom_xpath_inject "pom:plugin[pom:artifactId = 'maven-antrun-plugin']" "org.apache.maven.plugins"
%pom_remove_plugin org.apache.maven.plugins:maven-enforcer-plugin
%pom_remove_plugin org.codehaus.mojo:exec-maven-plugin osgi-bundle
%pom_remove_plugin org.apache.maven.plugins:maven-dependency-plugin osgi-bundle
%pom_remove_plugin org.apache.maven.plugins:maven-antrun-plugin osgi-bundle
%pom_remove_plugin org.apache.felix:maven-scr-plugin osgi-roo-bundle
%pom_remove_plugin :docbkx-maven-plugin deployment-support
%pom_remove_plugin :maven-site-plugin deployment-support
sed -i '/project.organization.name/d' $(find . -name "pom.xml")
sed -i '/build-number.mf/d' osgi-bundle/pom.xml
%pom_remove_dep org.springframework.roo.wrapping:
%pom_remove_dep :spring-asm
# org.apache.felix:org.apache.felix.ipojo:jar:1.12.0)
# org.apache.felix:org.apache.felix.scr:jar:1.8.2)
%pom_disable_module bootstrap
# org.springframework.uaa:org.springframework.uaa.client:jar:1.0.2.RELEASE
%pom_disable_module project
%pom_disable_module uaa
%pom_disable_module url-stream-jdk
# org.springframework.roo:org.springframework.roo.url.stream.jdk:jar:1.2.5.BUILD-SNAPSHOT
# net.sourceforge.jline:jline:jar:1.0.S2-B
# org.springframework.roo.wrapping:org.springframework.roo.wrapping.json-simple:jar:1.1.0.0010
%pom_disable_module shell-jline
%pom_disable_module shell-jline-osgi
# org.apache.felix:org.apache.felix.log:jar:1.0.1
# org.springframework.roo.wrapping:org.springframework.roo.wrapping.bcpg-jdk15:jar:1.45.0.0010
# org.springframework.roo.wrapping:org.springframework.roo.wrapping.bcprov-jdk15:jar:1.45.0.0010
%pom_disable_module felix
# org.springframework.roo:org.springframework.roo.project:jar:1.2.5.BUILD-SNAPSHOT
# org.springframework.roo.wrapping:org.springframework.roo.wrapping.inflector:jar:0.7.0.0010
# https://weblogs.java.net/blog/tomwhite/archive/2006/07/pluralization.html
# http://central.maven.org/maven2/net/java/dev/inflector/inflector/0.7.0/inflector-0.7.0-sources.jar
# http://central.maven.org/maven2/net/java/dev/inflector/inflector/0.7.0/inflector-0.7.0.pom
%pom_disable_module classpath
# org.springframework.roo:org.springframework.roo.classpath:jar:1.2.5.BUILD-SNAPSHOT
# com.github.antlrjavaparser:antlr-java-parser:jar:1.0.14
# org.springframework.roo.wrapping:org.springframework.roo.wrapping.antlr4-runtime:jar:4.0.0002
%pom_disable_module classpath-antlrjavaparser
%pom_disable_module addon-tostring
%pom_disable_module addon-equals
%pom_disable_module addon-javabean
%pom_disable_module addon-plural
%pom_disable_module addon-propfiles
%pom_disable_module addon-configurable
%pom_disable_module addon-email
%pom_disable_module addon-dod
%pom_disable_module addon-test
%pom_disable_module addon-serializable
%pom_disable_module addon-jpa
%pom_disable_module addon-jms
%pom_disable_module addon-finder
%pom_disable_module addon-logging
%pom_disable_module addon-property-editor
%pom_disable_module addon-backup
%pom_disable_module addon-json
%pom_disable_module addon-web-mvc-controller
%pom_disable_module addon-web-mvc-jsp
%pom_disable_module addon-web-mvc-embedded
%pom_disable_module addon-security
%pom_disable_module addon-solr
%pom_disable_module addon-web-flow
%pom_disable_module addon-web-selenium
# org.springframework.roo.wrapping:org.springframework.roo.wrapping.hapax:jar:SYSTEM:
%pom_disable_module addon-gwt
%pom_disable_module addon-layers-repository-jpa
%pom_disable_module addon-layers-service
%pom_disable_module addon-dbre
%pom_disable_module addon-creator
%pom_disable_module addon-roobot-client
%pom_disable_module addon-jsf
%pom_disable_module addon-op4j
%pom_disable_module addon-git
%pom_disable_module addon-cloud-foundry
%pom_disable_module addon-layers-repository-mongo
%pom_disable_module addon-oscommands
%pom_disable_module addon-tailor
rm file-monitor/src/test/java/org/springframework/roo/file/monitor/event/FileDetailsTest.java
%build
%mvn_build -s -- -Dproject.build.sourceEncoding=UTF-8
%install
%mvn_install
%files -f .mfiles-org.springframework.roo.root
%dir %{_javadir}/%{name}
%doc readme.txt
%license LICENSE.TXT
%files addon-jdbc -f .mfiles-org.springframework.roo.addon.jdbc
%files annotations -f .mfiles-org.springframework.roo.annotations
%files deployment-support -f .mfiles-org.springframework.roo.deployment.support
%files file-monitor -f .mfiles-org.springframework.roo.file.monitor
%files file-monitor-polling -f .mfiles-org.springframework.roo.file.monitor.polling
%files file-monitor-polling-roo -f .mfiles-org.springframework.roo.file.monitor.polling.roo
%files file-undo -f .mfiles-org.springframework.roo.file.undo
%files metadata -f .mfiles-org.springframework.roo.metadata
%files model -f .mfiles-org.springframework.roo.model
%files osgi-bundle -f .mfiles-org.springframework.roo.osgi.bundle
%files osgi-roo-bundle -f .mfiles-org.springframework.roo.osgi.roo.bundle
%files process-manager -f .mfiles-org.springframework.roo.process.manager
%files shell -f .mfiles-org.springframework.roo.shell
%doc shell/legal-shell.txt
%files shell-osgi -f .mfiles-org.springframework.roo.shell.osgi
%files startlevel -f .mfiles-org.springframework.roo.startlevel
%files support -f .mfiles-org.springframework.roo.support
%doc support/legal-support.txt
%files support-osgi -f .mfiles-org.springframework.roo.support.osgi
%files url-stream -f .mfiles-org.springframework.roo.url.stream
%files javadoc -f .mfiles-javadoc
%license LICENSE.TXT
%changelog
* Thu Jan 15 2015 gil cattaneo 1.2.5-1
- initial rpm