Blob Blame History Raw
%global        old_enunciate_core_annotations_ver 1.28
Name:          enunciate
# Because "duplicate class" compiler errors, we cannot yet use the 2.x
# See also https://github.com/stoicflame/enunciate/issues/117
#      and https://bugs.openjdk.java.net/browse/JDK-8143213
Version:       1.31
Release:       5%{?dist}
Summary:       Build-time enhancement tool for Java-based Web services projects
License:       ASL 2.0
URL:           http://enunciate.webcohesion.com/
Source0:       https://github.com/stoicflame/enunciate/archive/v%{version}/%{name}-%{version}.tar.gz

BuildRequires: maven-local
BuildRequires: mvn(asm:asm)
BuildRequires: mvn(cglib:cglib)
BuildRequires: mvn(com.sun.jersey:jersey-server:1)
BuildRequires: mvn(com.sun.jersey:jersey-servlet:1)
BuildRequires: mvn(com.sun.jersey.contribs:jersey-spring:1)
BuildRequires: mvn(com.sun.xml.bind:jaxb-impl)
BuildRequires: mvn(javax.annotation:jsr250-api)
BuildRequires: mvn(javax.mail:mail)
BuildRequires: mvn(javax.servlet:servlet-api)
BuildRequires: mvn(javax.ws.rs:jsr311-api)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.codehaus:codehaus-parent:pom:)
BuildRequires: mvn(org.codehaus.jackson:jackson-jaxrs)
BuildRequires: mvn(org.codehaus.jackson:jackson-xc)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
BuildRequires: mvn(org.easymock:easymock)

BuildArch:     noarch

%description
%{summary}.

Provides:    %{name}-core-annotations = %{version}-%{release}
Obsoletes:   %{name}-core-annotations < %{old_enunciate_core_annotations_ver}
Provides:    %{name}-core-annotations-javadoc = %{version}-%{release}
Obsoletes:   %{name}-core-annotations-javadoc < %{old_enunciate_core_annotations_ver}

%package javadoc
Summary:       Javadoc for %{name}

%description javadoc
This package contains the API documentation for %{name}.

%prep
%setup -q -n %{name}-%{version}
# Cleanup
find -name "*.jar" -print -delete
find -name "*.js" -print -delete

# disable some plugins that are not in fedora and not relevant in fedora packaging 
%pom_remove_plugin -r :animal-sniffer-maven-plugin
%pom_remove_plugin -r :maven-dependency-plugin
%pom_remove_plugin -r :maven-eclipse-plugin
%pom_remove_plugin -r :maven-enforcer-plugin
%pom_remove_plugin -r :maven-idea-plugin
%pom_remove_plugin -r :maven-inherit-plugin
%pom_remove_plugin -r :maven-release-plugin
%pom_remove_plugin -r :maven-source-plugin
%pom_remove_plugin -r :maven-surefire-plugin

# disable rest of the modules
%pom_disable_module maven-enunciate-slim-plugin
%pom_disable_module xml
%pom_disable_module jaxws-support
%pom_disable_module jaxws-ri-rt
%pom_disable_module jaxws-ri
%pom_disable_module jersey
%pom_disable_module java-client
%pom_disable_module c
%pom_disable_module core
%pom_disable_module obj-c
%pom_disable_module csharp
%pom_disable_module ruby
%pom_disable_module php
%pom_disable_module swagger
%pom_disable_module docs
%pom_disable_module amf-rt
%pom_disable_module amf
%pom_disable_module gwt-rt
%pom_disable_module gwt
%pom_disable_module top-rt
%pom_disable_module top
%pom_disable_module spring-jaxws-rt
%pom_disable_module spring-app-rt
%pom_disable_module spring3-app-rt
%pom_disable_module spring-app
%pom_disable_module cxf-rt
%pom_disable_module cxf
%pom_disable_module jboss-rt
%pom_disable_module jboss
%pom_disable_module maven-enunciate-plugin
%pom_disable_module maven-enunciate-spring-plugin
%pom_disable_module maven-enunciate-cxf-plugin
%pom_disable_module maven-enunciate-jboss-plugin
%pom_disable_module enunciate-simple-archetype
%pom_disable_module integration-tests

# we have to remove wagon-webdav-jackrabbit until jackrabbit is available
%pom_xpath_remove "pom:build/pom:extensions"

%pom_xpath_set "pom:properties/pom:jersey.version" 1
%pom_change_dep -r com.sun.jersey: ::'${jersey.version}'

%pom_change_dep -r cglib: :cglib

chmod 644 README.md license.txt notice.txt

%build
%mvn_build

%install
%mvn_install

# Put core-annotation in main package to avoid 
# conflict with enunciate-core-annotations
%files -f .mfiles
%doc README.md
%license license.txt notice.txt

%files javadoc -f .mfiles-javadoc
%license license.txt notice.txt

%changelog
* Wed Jul 13 2016 Ding-Yi Chen <dchen@redhat.com> 1.31-5
- Merge all sub-packages.
- Obsolete enunciate-core-annotations < 1.28

* Wed Jul 06 2016 gil cattaneo <puntogil@libero.it> 1.31-4
- remove useless main package
- fix jersey version and cglib aId
- fix BRs list

* Wed Jul 06 2016 Ding-Yi Chen <dchen@redhat.com> 1.31-3
- Obsoletes the enunciate-core-annotations-javadoc, and
  provides enunciate-core-annotations-javadoc in enunciate-javadoc

* Tue Jul 05 2016 Ding-Yi Chen <dchen@redhat.com> 1.31-2
- Address review comment #6

* Mon Jul 04 2016 Ding-Yi Chen <dchen@redhat.com> 1.31-1
- Initial RPM package