Blob Blame History Raw
%global namedreltag .Final
%global namedversion %{version}%{?namedreltag}

Name: weld-core
Version: 1.1.13
Release: 1%{namedreltag}%{?dist}
Summary: Reference Implementation for JSR-299: Contexts and Dependency Injection (CDI)
Group: Development/Libraries
License: ASL 2.0 and LGPLv2+ and (CDDL or GPLv2 with exceptions)
URL: http://seamframework.org/Weld

Source0: https://github.com/weld/core/archive/%{namedversion}.tar.gz

BuildArch: noarch

BuildRequires: findbugs
BuildRequires: jpackage-utils
BuildRequires: java-devel
BuildRequires: jboss-interceptor
BuildRequires: jboss-servlet-3.0-api
BuildRequires: maven-local
BuildRequires: maven-clean-plugin
BuildRequires: maven-compiler-plugin
BuildRequires: maven-deploy-plugin
BuildRequires: maven-dependency-plugin
BuildRequires: maven-enforcer-plugin
BuildRequires: maven-install-plugin
BuildRequires: maven-jar-plugin
BuildRequires: maven-javadoc-plugin
BuildRequires: maven-shade-plugin
BuildRequires: maven-surefire-provider-junit4
BuildRequires: maven-surefire-report-plugin
BuildRequires: maven-plugin-build-helper
BuildRequires: weld-api
BuildRequires: weld-parent
BuildRequires: mvn(javax.enterprise:cdi-api)
BuildRequires: mvn(javax.faces:jsf-api)
BuildRequires: mvn(javax.persistence:persistence-api)
BuildRequires: mvn(javax.servlet.jsp:jsp-api)

Requires: java
Requires: jpackage-utils
Requires: jboss-interceptor
Requires: jboss-servlet-3.0-api
Requires: weld-api
Requires: mvn(javax.enterprise:cdi-api)
Requires: mvn(javax.faces:jsf-api)
Requires: mvn(javax.persistence:persistence-api)
Requires: mvn(javax.servlet.jsp:jsp-api)


%description
Weld is the reference implementation (RI) for JSR-299: Java Contexts and
Dependency Injection for the Java EE platform (CDI). CDI is the Java standard
for dependency injection and contextual lifecycle management, and integrates
cleanly with the Java EE platform. Any Java EE 6-compliant application server
provides support for JSR-299 (even the web profile). 


%package javadoc
Summary: Javadocs for %{name}
Group: Documentation
Requires: jpackage-utils


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


%prep
%setup -q -n core-%{namedversion}

find . -name '*.jar' -exec rm {} \;
find . -name '*.class' -exec rm {} \;

# Not needed for build
%pom_remove_plugin org.eclipse.m2e:lifecycle-mapping

# We don't want to build these modules
%pom_disable_module porting-package
%pom_disable_module tests
%pom_disable_module tests-arquillian
%pom_disable_module inject-tck-runner
%pom_disable_module jboss-tck-runner

# Don't ship or run checkstyle configuration, see rhbz #825355
%pom_remove_dep org.jboss.weld:weld-build-config
%pom_disable_module build-config
%pom_remove_plugin org.apache.maven.plugins:maven-checkstyle-plugin

# Disable envs that are not needed
%pom_disable_module environments/servlet


%build
mvn-rpmbuild install javadoc:aggregate


%install

# Jar files:
install -d -m 755 %{buildroot}%{_javadir}
install -pm 644 impl/target/weld-core-%{namedversion}.jar \
  %{buildroot}%{_javadir}/weld-core.jar
install -pm 644 environments/se/core/target/weld-se-core-%{namedversion}.jar \
  %{buildroot}%{_javadir}/weld-se-core.jar

# POM files:
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}-parent.pom
install -pm 644 impl/pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
install -pm 644 environments/se/core/pom.xml %{buildroot}%{_mavenpomdir}/JPP-weld-se-core.pom

# Dependencies map:
%add_maven_depmap JPP-%{name}-parent.pom
%add_maven_depmap JPP-%{name}.pom %{name}.jar
%add_maven_depmap JPP-weld-se-core.pom weld-se-core.jar

# Javadoc files:
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -rp target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}


%files
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*
%{_javadir}/*


%files javadoc
%{_javadocdir}/%{name}


%changelog
* Wed Jul 10 2013 Mat Booth <fedora@matbooth.co.uk> - 1.1.13-1.Final
- Update to latest 1.1.x upstream
- Switch to using pom macros, drop upstreamed patches
- Don't run or ship checkstyle config, fixed rhbz #825355
- Build se-core module, fixes rhbz #969769
- Fix FTBFS rhbz #914570

* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.5-6.AS71.Final
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 1.1.5-5.AS71.Final
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
- Replace maven BuildRequires with maven-local

* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.5-4.AS71.Final
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Mon Apr 02 2012 Juan Hernandez <juan.hernandez@redhat.com> 1.1.5-3.AS71.Final
- Remove binaries bundled in the tarball

* Wed Mar 21 2012 Juan Hernandez <juan.hernandez@redhat.com> 1.1.5-2.AS71.Final
- Cleanup of the spec file

* Thu Mar 15 2012 Marek Goldmann <mgoldman@redhat.com> 1.1.5-1.AS71.Final
- Initial packaging