summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2022-06-23 13:23:36 +0200
committerFlorian Schmaus <flow@gentoo.org>2022-07-22 19:36:29 +0200
commit20fc1fdac9575a76c2f97bc63c910e0a3014182e (patch)
tree909a91cba563b414c966660019b394c089d0aa38 /dev-java/junit-dataprovider
parentdev-java/memoryfilesystem: new package, add 2.3.0 (diff)
downloadgentoo-20fc1fdac9575a76c2f97bc63c910e0a3014182e.tar.gz
gentoo-20fc1fdac9575a76c2f97bc63c910e0a3014182e.tar.bz2
gentoo-20fc1fdac9575a76c2f97bc63c910e0a3014182e.zip
dev-java/junit-dataprovider: new package, add 2.9
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'dev-java/junit-dataprovider')
-rw-r--r--dev-java/junit-dataprovider/Manifest1
-rw-r--r--dev-java/junit-dataprovider/junit-dataprovider-2.9.ebuild94
-rw-r--r--dev-java/junit-dataprovider/metadata.xml7
3 files changed, 102 insertions, 0 deletions
diff --git a/dev-java/junit-dataprovider/Manifest b/dev-java/junit-dataprovider/Manifest
new file mode 100644
index 000000000000..1ed767805252
--- /dev/null
+++ b/dev-java/junit-dataprovider/Manifest
@@ -0,0 +1 @@
+DIST junit-dataprovider-2.9.tar.gz 192088 BLAKE2B 4b6650bb2488bb2102e433c48f9c19620e4f60cf222fbab0dd5c8486fb0e64a86cdbf445739e2ad26f6d1e68239805cda7dd48802b556f56c53130b8fd348569 SHA512 78b9c02213e43c05e1896ce740cd177ce728ba00607dd90a029d87abcdb9bf899a285e39d6c69ef8e0b7463fe04159d4e80c405f983059a7a5a349f95767cc99
diff --git a/dev-java/junit-dataprovider/junit-dataprovider-2.9.ebuild b/dev-java/junit-dataprovider/junit-dataprovider-2.9.ebuild
new file mode 100644
index 000000000000..8628f1b234d8
--- /dev/null
+++ b/dev-java/junit-dataprovider/junit-dataprovider-2.9.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="com.tngtech.junit.dataprovider:junit-dataprovider:2.9"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="The common core for a TestNG like dataprovider runner for JUnit"
+HOMEPAGE="https://github.com/TNG/junit-dataprovider"
+SRC_URI="https://github.com/TNG/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+CP_DEPEND="dev-java/findbugs-annotations:0"
+
+DEPEND="
+ >=virtual/jdk-1.8:*
+ ${CP_DEPEND}
+ dev-java/junit:4
+ test? (
+ dev-java/assertj-core:3
+ dev-java/mockito:4
+ )
+"
+
+RDEPEND="
+ >=virtual/jre-1.8:*
+ ${CP_DEPEND}
+"
+
+DOCS=( {CODE-OF-CONDUCT,CONTRIBUTING,README,SECURITY}.md NOTICE )
+
+S="${WORKDIR}/${PN}-${PV}/"
+
+src_compile() {
+ einfo "Compiling junit-dataprovider-core"
+ JAVA_SRC_DIR="core/src/main/java"
+ JAVA_JAR_FILENAME="junit-dataprovider-core.jar"
+ java-pkg-simple_src_compile
+ JAVA_GENTOO_CLASSPATH_EXTRA+=":junit-dataprovider-core.jar"
+ rm -r target || die
+
+ einfo "Compiling junit4-dataprovider"
+ JAVA_SRC_DIR="junit4/src/main/java"
+ JAVA_JAR_FILENAME="juni4-dataprovider.jar"
+ JAVA_CLASSPATH_EXTRA="junit-4"
+ java-pkg-simple_src_compile
+ rm -r target || die
+
+ if use doc; then
+ einfo "Compiling javadocs"
+ JAVA_SRC_DIR=(
+ "core/src/main/java"
+ "junit4/src/main/java"
+ )
+ JAVA_JAR_FILENAME="ignoreme.jar"
+ java-pkg-simple_src_compile
+ fi
+}
+
+src_test() {
+ einfo "Testing junit-dataprovider-core"
+ JAVA_TEST_GENTOO_CLASSPATH="assertj-core-3,junit-4,mockito:4"
+ JAVA_TEST_SRC_DIR="core/src/test/java"
+ java-pkg-simple_src_test
+
+ einfo "Testing junit4-dataprovider"
+ JAVA_TEST_SRC_DIR="junit4/src/main/java"
+ JAVA_TEST_EXCLUDES=(
+ com.tngtech.java.junit.dataprovider.internal.TestGenerator
+ com.tngtech.java.junit.dataprovider.internal.TestValidator
+ )
+ java-pkg-simple_src_test
+}
+
+src_install() {
+ java-pkg_dojar "junit-dataprovider-core.jar"
+ java-pkg_dojar "juni4-dataprovider.jar"
+
+ if use doc; then
+ java-pkg_dojavadoc target/api
+ fi
+
+ if use source; then
+ java-pkg_dosrc "core/src/main/java/*"
+ java-pkg_dosrc "junit4/src/main/java/*"
+ fi
+}
diff --git a/dev-java/junit-dataprovider/metadata.xml b/dev-java/junit-dataprovider/metadata.xml
new file mode 100644
index 000000000000..75321cfb5598
--- /dev/null
+++ b/dev-java/junit-dataprovider/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>java@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>