summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2016-04-03 22:37:10 +0100
committerJames Le Cuirot <chewi@gentoo.org>2016-04-03 22:43:13 +0100
commit00b3f6a8540038b53269a81c3682f7c4bdd3f937 (patch)
treefcba86b10e0f4ddfc6ce9e1e6233ab3e2c71bff3
parentprofiles: Mask Spring Framework for the time being (diff)
downloadgentoo-00b3f6a8540038b53269a81c3682f7c4bdd3f937.tar.gz
gentoo-00b3f6a8540038b53269a81c3682f7c4bdd3f937.tar.bz2
gentoo-00b3f6a8540038b53269a81c3682f7c4bdd3f937.zip
dev-java/jamon: Version bump to 2.81, java-pkg-simple rewrite
This adds the war but I'm afraid I haven't tested it at all. A couple of jars remain bundled because they're not working tackling right now. src_test has been added and all tests are passing. Package-Manager: portage-2.2.28
-rw-r--r--dev-java/jamon/Manifest1
-rw-r--r--dev-java/jamon/jamon-2.81.ebuild82
-rw-r--r--dev-java/jamon/metadata.xml1
3 files changed, 84 insertions, 0 deletions
diff --git a/dev-java/jamon/Manifest b/dev-java/jamon/Manifest
index c443308a737c..ac2fb922e580 100644
--- a/dev-java/jamon/Manifest
+++ b/dev-java/jamon/Manifest
@@ -1 +1,2 @@
DIST JAMonAll_103005.zip 143825 SHA256 23eceb23264c4643846372c6454f9406d2435aeaf840a183033d9fa50176c9ab SHA512 bb4b7fbd108a0612ceb59486c985f32ffa4c9dd158fe6d6c307357d3ab76c53dfa87ed691295a9de9172744e46c6a01c2ed976d3959834e1665fbbc36dcafb97 WHIRLPOOL 53aa936d313f32e052609173dd94de9bc8b659babcca8af71f4729e646989fb44d25a49f442db792dcb1bde762c40f3b46db69d9c075f659125d233dfdf1e015
+DIST jamonapi-2_81.tar.gz 23149879 SHA256 7b88d90fc284375cb329569570a3c125f41590c95422239aaf661a5260b8004e SHA512 09fba65aec2754f8a1b85dd7f5691b8bae5c4f1c852dd69cddb3642a594bb44baa5b6a3c611657041d6ce2cc37c824a111adeaa929761e3983d43d7080ce05b1 WHIRLPOOL f2f281c491fe80602040086844f64ddbf99ba03334f734c9ad0a3d039903c13480a21f5eaf10acd991c252a589a0f2155d651f7015a7c728d8184125e08a7a15
diff --git a/dev-java/jamon/jamon-2.81.ebuild b/dev-java/jamon/jamon-2.81.ebuild
new file mode 100644
index 000000000000..eaf1b5cb480d
--- /dev/null
+++ b/dev-java/jamon/jamon-2.81.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_PN="${PN}api"
+MY_PV="${PV//./_}"
+MY_P="${MY_PN}-${MY_PV}"
+
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="Java API to monitor production applications"
+HOMEPAGE="http://www.jamonapi.com/"
+SRC_URI="https://github.com/stevensouza/${MY_PN}/archive/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
+LICENSE="BSD"
+SLOT="2"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+CDEPEND="dev-java/log4j:0
+ java-virtuals/interceptor-api:0
+ java-virtuals/servlet-api:3.0
+ www-servers/tomcat:7"
+
+RDEPEND="${CDEPEND}
+ >=virtual/jre-1.7
+ dev-db/hsqldb:0
+ dev-java/jakarta-oro:2.0"
+
+DEPEND="${CDEPEND}
+ >=virtual/jdk-1.7
+ test? (
+ dev-db/hsqldb:0
+ dev-java/assertj-core:2
+ dev-java/junit:4
+ dev-java/mockito:0
+ dev-java/objenesis:0
+ )"
+
+S="${WORKDIR}/${MY_P}"
+JAVA_GENTOO_CLASSPATH="interceptor-api,log4j,servlet-api-3.0,tomcat-7"
+JAVA_SRC_DIR="${PN}/src/main/java"
+WAR_DIR="jamon_war/src/main/webapp"
+
+java_prepare() {
+ # No Jetty or Hazelcast packaged right now and Spring is ancient.
+ find \( -name "*Jetty*.java" -o -name "*Hazelcast*.java" \) -exec rm -v {} + || die
+ rm -rv ./jamon/src/test/java/com/jamonapi/distributed/JamonDataPersisterFactoryTest.java \
+ ./jamon/src/{main,test}/java/com/jamonapi/aop/spring || die
+
+ # Keep fdsapi and xss-html-filter bundled as we lack packages.
+ rm -v ${WAR_DIR}/WEB-INF/lib/{hsqldb,jakarta-oro}*.jar || die
+}
+
+src_compile() {
+ java-pkg-simple_src_compile
+ jar cf ${PN}.war -C ${WAR_DIR} . || die
+}
+
+src_install() {
+ java-pkg-simple_src_install
+ java-pkg_dowar ${PN}.war
+ dodoc designnotes.txt README.md
+
+ # hsqldb used by JSP files, oro used by fdsapi.
+ java-pkg_register-dependency hsqldb,jakarta-oro-2.0
+}
+
+src_test() {
+ cd jamon/src/test/java || die
+
+ local CP=".:../resources:${S}/${PN}.jar:$(java-pkg_getjars assertj-core-2,hsqldb,junit-4,mockito,objenesis,${JAVA_GENTOO_CLASSPATH})"
+ local TESTS=$(find * -name "*Test.java")
+ TESTS="${TESTS//.java}"
+ TESTS="${TESTS//\//.}"
+
+ ejavac -cp "${CP}" -d . $(find * -name "*.java")
+ ejunit4 -classpath "${CP}" ${TESTS}
+}
diff --git a/dev-java/jamon/metadata.xml b/dev-java/jamon/metadata.xml
index 273d563979d8..5256079650cb 100644
--- a/dev-java/jamon/metadata.xml
+++ b/dev-java/jamon/metadata.xml
@@ -10,6 +10,7 @@
developers to easily monitor production applications
</longdescription>
<upstream>
+ <remote-id type="github">stevensouza/jamonapi</remote-id>
<remote-id type="sourceforge">jamonapi</remote-id>
</upstream>
</pkgmetadata>