Blob Blame History Raw
%global old_enunciate_core_annotations_ver 1.28
%global jersey1_version %(rpm -q --qf "%%{version}" jsersey1)
%global jersey_version %(rpm -q --qf "%%{version}" jsersey2)
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:       2.8.0
Release:       7%{?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: maven-plugin-bundle
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:javax.ws.rs-api)
BuildRequires: mvn(javax.ws.rs:jsr311-api)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.maven.archetype:archetype-packaging)
BuildRequires: mvn(org.apache.maven.plugins:maven-archetype-plugin)
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)
BuildRequires: mvn(org.mockito:mockito-core)

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-enforcer-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

# Depends on echo-maven-plugin
%pom_disable_module c-xml-client
%pom_disable_module csharp-xml-client

## Does not compile with java8
%pom_disable_module javac-support

# Depends on javac-support
%pom_disable_module core

# Depends on enunciate-core
%pom_disable_module docs
%pom_disable_module examples
%pom_disable_module gwt-json-overlay
%pom_disable_module idl
%pom_disable_module jackson
%pom_disable_module jackson1
%pom_disable_module java-json-client
%pom_disable_module java-xml-client
%pom_disable_module javascript-client
%pom_disable_module jaxb
%pom_disable_module jaxrs
%pom_disable_module jaxws
%pom_disable_module lombok
%pom_disable_module maven-plugin
%pom_disable_module php-json-client
%pom_disable_module php-xml-client
%pom_disable_module obj-c-xml-client
%pom_disable_module ruby-json-client
%pom_disable_module slim-maven-plugin
%pom_disable_module spring-web
%pom_disable_module swagger
%pom_disable_module top

%pom_xpath_set "pom:properties/pom:jersey1.version" %{jersey1.version}
%pom_xpath_set "pom:properties/pom:jersey2.version" %{jersey.version}

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 Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Mon Feb 27 2017 Ding-Yi Chen <dchen@redhat.com> 2.8.0-5
- Remove mvn_alias for org.codehaus.enunciate, as it is a major upgrade

* Mon Feb 27 2017 Ding-Yi Chen <dchen@redhat.com> 2.8.0-3
- Add mvn_alias for org.codehaus.enunciate

* Mon Feb 20 2017 Ding-Yi Chen <dchen@redhat.com> 2.8.0-2
- Restore Changelog item from Fedora Release Engineering

* Mon Feb 20 2017 Ding-Yi Chen <dchen@redhat.com> 2.8.0-1
- Upstream update to 2.8.0

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.31-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* 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