Name: snmp4j
Version: 2.2.2
Release: 1%{?dist}
Summary: The Object Oriented SNMP API for Java Managers and Agents
License: ASL 2.0
URL: http://www.snmp4j.org/
Source0: https://oosnmp.net/dist/release/org/snmp4j/%{name}/%{version}/%{name}-%{version}-distribution.tar.gz
BuildRequires: java-devel
BuildRequires: mvn(log4j:log4j)
# test deps
BuildRequires: mvn(junit:junit)
BuildRequires: maven-local
BuildRequires: maven-plugin-bundle
BuildArch: noarch
%description
SNMP4J is an enterprise class free open source and
state-of-the-art SNMP implementation for Java 2SE 1.4 or
later. SNMP4J supports command generation (managers) as
well as command responding (agents). Its clean object
oriented design is inspired by SNMP++, which is a
well-known SNMPv1/v2c/v3 API for C++ (see http://www.agentpp.com).
The SNMP4J Java SNMP API provides the following features:
* SNMPv3 with MD5 and SHA authentication and DES, 3DES,
AES 128, AES 192, and AES 256 privacy.
* Pluggable Message Processing Models with implementations
for MPv1, MPv2c, and MPv3
* All PDU types.
* Pluggable transport mappings. UDP, TCP, and TLS are supported
out-of-the-box.
* Pluggable timeout model.
* Synchronous and asynchronous requests.
* Command generator as well as command res-ponder support.
* Free open source with the Apache license model
* Java 1.4.1 or later (1.6 for version 2.0 or later)
* Logging based on Log4J
* Row-based efficient asynchronous table retrieval with GETBULK.
* Multi-threading support.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q -n %{name}-%{version}
# cleanup
find -name "*.jar" -delete
find -name "*.class" -delete
# remove wagon-webdav-jackrabbit
%pom_xpath_remove "pom:project/pom:build/pom:extensions"
# required by Apache Camel
%pom_xpath_remove "pom:project/pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-jar-plugin']/pom:configuration/pom:excludes"
%pom_xpath_inject "pom:project/pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-jar-plugin']/pom:configuration" '
${project.build.outputDirectory}/META-INF/MANIFEST.MF
'
%pom_add_plugin org.apache.felix:maven-bundle-plugin . '
true
org.snmp4j.*;version="${project.version}"
javax.crypto*,javax.net.ssl,javax.security*,org.apache.log4j*;resolution:=optional,*
bundle-manifest
process-classes
manifest
'
%pom_remove_plugin :maven-assembly-plugin
%pom_remove_plugin :maven-source-plugin
for s in src/org/snmp4j/PDUv1.java \
src/org/snmp4j/Snmp.java \
src/org/snmp4j/SNMP4JSettings.java \
src/org/snmp4j/mp/MessageProcessingModel.java \
src/org/snmp4j/mp/MPv3.java \
src/org/snmp4j/security/TSM.java \
src/org/snmp4j/security/USM.java \
src/org/snmp4j/security/UsmUser.java \
src/org/snmp4j/transport/DefaultSshTransportMapping.java; do
native2ascii -encoding UTF8 ${s} ${s}
done
sed -i 's/\r//' CHANGES.txt LICENSE-2_0.txt NOTICE snmp4j_usage.txt \
mibs/OOSNMP-USM-MIB.txt
%build
%mvn_file :%{name} %{name}
%mvn_alias :%{name} "org.apache.servicemix.bundles:org.apache.servicemix.bundles.snmp4j"
%mvn_build
%install
%mvn_install
%files -f .mfiles
%doc CHANGES.txt LICENSE-2_0.txt NOTICE snmp4j_usage.txt mibs
%files javadoc -f .mfiles-javadoc
%doc LICENSE-2_0.txt NOTICE
%changelog
* Wed Jun 19 2013 gil cattaneo 2.2.2-1
- initial rpm