[Jpackage-commits] rpms/free/atinject atinject.spec,NONE,1.1

jpackage jpackage at ryu.zarb.org
Thu Dec 23 20:31:27 CET 2010

Update of /home/projects/jpackage/cvs/rpms/free/atinject
In directory ryu.zarb.org:/tmp/07fDThHdJZ/rpms/free/atinject

Added Files:
Log Message:

--- NEW FILE: atinject.spec ---
%global artifactId javax.inject

Name:           atinject
Version:        1
Release:        2.20100611svn86%{?dist}
Epoch:          0
Summary:        Dependency injection specification for Java (JSR-330)

Group:          Development/Libraries
License:        ASL 2.0
URL:            http://code.google.com/p/atinject/
# latest release doesn't generate javadocs and there is no source
# tarball with pom.xml or ant build file
# svn export -r86 http://atinject.googlecode.com/svn/trunk atinject-1
# tar cjf atinject-1.tar.bz2 atinject-1
Source0:        %{name}-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch:      noarch

BuildRequires:       apache-commons-parent
BuildRequires:       maven2
BuildRequires:       maven2-plugin-install
BuildRequires:       maven2-plugin-jar
BuildRequires:       maven-surefire-provider-junit4
BuildRequires:       maven2-plugin-surefire
BuildRequires:       maven2-plugin-javadoc
BuildRequires:       maven2-plugin-resources
BuildRequires:       maven2-plugin-release
BuildRequires:       maven2-plugin-compiler

Requires:       jpackage-utils
Requires(post):       jpackage-utils
Requires(postun):     jpackage-utils

This package specifies a means for obtaining objects in such a way as
to maximize reusability, testability and maintainability compared to
traditional approaches such as constructors, factories, and service
locators (e.g., JNDI). This process, known as dependency injection, is
beneficial to most nontrivial applications.

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

%description    javadoc

%setup -q

rm -rf lib/

export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mvn-jpp \
  -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
  install javadoc:javadoc

rm -rf %{buildroot}

install -d -m 755 %{buildroot}%{_javadir}
install -d -m 755 %{buildroot}%{_datadir}/maven2/poms

%add_to_maven_depmap %{artifactId} %{artifactId} %{version} JPP %{name}

# poms
install -d -m 755 %{buildroot}%{_datadir}/maven2/poms
install -pm 644 pom.xml \

# jar files
install -pm 644 target/%{artifactId}-*.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar

# symlinks
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)

# javadoc
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}

rm -rf %{buildroot}




%files javadoc

* Thu Dec 29 2010 David Walluck <dwalluck at redhat.com> 0:1-2.20100611svn86
- adapt to JPackage

* Tue Sep 21 2010 Stanislav Ochotnicky <sochotnicky at redhat.com> - 1-1.20100611svn86
- Initial version of the package

More information about the JPackage-commits mailing list