summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2023-02-22 17:20:35 +0100
committerMiroslav Šulc <fordfrog@gentoo.org>2023-10-18 09:46:32 +0200
commit3fae38f21bec0b1eae7bdc5259cc42e90ef7416d (patch)
tree67d17970e47a3f3cd03d71bea808dcf2b9235142 /dev-java/testng
parentjava-pkg-simple.eclass: avoid removal of generated test classes (diff)
downloadgentoo-3fae38f21bec0b1eae7bdc5259cc42e90ef7416d.tar.gz
gentoo-3fae38f21bec0b1eae7bdc5259cc42e90ef7416d.tar.bz2
gentoo-3fae38f21bec0b1eae7bdc5259cc42e90ef7416d.zip
dev-java/testng: add 6.11
- switches slot of dependency assertj-core 2 -> 3 - removes test restriction - moves "test" from IUSE to JAVA_PKG_IUSE - sets the "-verbose 3" option to get the PASSED/FAILED information - uses older version of jcommander 0 -> 1.64 - uses the DOCS array instead of dodoc - uses JAVA_RESOURCE_DIRS instead of java-pkg_addres which allows removing src_compile() - chops long lines - adds MAVEN_ID so that java-ebuilder can find it Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java/testng')
-rw-r--r--dev-java/testng/Manifest5
-rw-r--r--dev-java/testng/testng-6.11.ebuild101
2 files changed, 106 insertions, 0 deletions
diff --git a/dev-java/testng/Manifest b/dev-java/testng/Manifest
index 310f28a1c68c..aaf68f18ad4d 100644
--- a/dev-java/testng/Manifest
+++ b/dev-java/testng/Manifest
@@ -1 +1,6 @@
+DIST apache-groovy-binary-2.4.21.zip 37467992 BLAKE2B e0f925bad53f0f8a7012f0bea420ec3e5986118cc23cd677a11f619284754eacc15c3012cf780063fef574053781bba924a86e5fa2ac284d86f349ad18173704 SHA512 e2f73405d7521b99e3ce5622cffcc505bbc039ccb1c35696fc895d648a9325937a136cf97a229f7ac1b90b63ad8603881350c4d41e514ad45233fb333d76d510
+DIST groovy-all-2.4.7.jar 7015434 BLAKE2B 23d22ddd78229c485ed9384169acee154258644249b856661e17d1d0efb5518e32473a26962b5d657a09b41d490813ed76254820ffdf39e83869209617b66c2d SHA512 4c26ff9f7137c0506c95f7ba1d4228ce57e16d87b77dd1d114390224207d71d3958460c7b5a239d5f41596ab87e7f4aa7aaea1dfce19a50badf8f9b818329c54
+DIST jquery-3.5.1.jar 313070 BLAKE2B 76abfbd21d83f72a3cfcb666f3a2fcfcf5975e723a462996bac9701caf6b59cb9998746af713ebb1f6bfe49cce91544216cc65dc6819e95e8a15930744685415 SHA512 9f560415b36875958ff1d3c6d37fa79d6d134c5f5fc7719dd21db36d1f24dec39787834b2a9ffb104ec6b56e725ccc524a8ff9b189ced3d68e24296b2daae720
+DIST spock-core-1.0-groovy-2.4.jar 588030 BLAKE2B 68d8fad8b6ffb45a18778797ea23d4f3b09256bf4e9f207ee666d07572399cd13522e6f1590219a80e23f6906a2e9eaf1f22c6a3c01717e8c1e99b5d37b89210 SHA512 078c0b16688eaa3134043e58ed4273981797ea92f08723b5508c7d7e4f635278dd5ca731fb294da2a1f35674623d969ee423d4344c2c822e1d4cb8d4f3383790
+DIST testng-6.11.tar.gz 677522 BLAKE2B 2e7bf30fcf805cce5a7ec42f22c39e9f4678642fcde9752c51d118e655189805661edeeff1a3db0e960c79e7542fe25ab8fa6995f142da12b3adc8753fd8a361 SHA512 996d7a18399e16626756b7a790182c7b6bf3453280209d0a09d4a509d698fcad1a80e58ec36702de95bd59c90c237463719ad44934c14390620fc9655d871252
DIST testng-6.9.10.tar.gz 6271781 BLAKE2B 5b77f4b1d9bfdca6749a1d33f465a30bcd9ab9dd9fc37abf8148301c24d6bf287224d9886c0f681deac54e12f9460139ce2a2058b3d160c05cf8fcb9f7808373 SHA512 ed9ad1ced20904ab261d2a233f3fa43ee1ea31778e992cdd27459811b256a6998d8385dd01ff72821133208a1fbd72aa3599a4b8bc0eb4d7b696d34593f9567e
diff --git a/dev-java/testng/testng-6.11.ebuild b/dev-java/testng/testng-6.11.ebuild
new file mode 100644
index 000000000000..fa7a919959da
--- /dev/null
+++ b/dev-java/testng/testng-6.11.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="org.testng:testng:6.11"
+JAVA_TESTING_FRAMEWORKS="testng"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="Testing framework inspired by JUnit and NUnit with new features"
+HOMEPAGE="https://testng.org/"
+# Presently we install the binary version of jquery since it is not packaged in ::gentoo.
+JQV="3.5.1"
+# Currently we bundle the binary versions of spock-core, groovy-all and apache-groovy-binary.
+# These are used only for tests, we don't install them.
+SCV="1.0-groovy-2.4"
+GAV="2.4.7"
+AGV="2.4.21"
+SRC_URI="https://github.com/testng-team/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
+ https://repo1.maven.org/maven2/org/webjars/jquery/${JQV}/jquery-${JQV}.jar
+ test? (
+ https://repo1.maven.org/maven2/org/spockframework/spock-core/${SCV}/spock-core-${SCV}.jar
+ https://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/${GAV}/groovy-all-${GAV}.jar
+ https://downloads.apache.org/groovy/${AGV}/distribution/apache-groovy-binary-${AGV}.zip
+ )"
+S="${WORKDIR}/${P}"
+
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+SLOT="0"
+
+CP_DEPEND="
+ dev-java/ant-core:0
+ dev-java/bsh:0
+ dev-java/guice:4
+ dev-java/jcommander:1.64
+ dev-java/junit:4
+ dev-java/snakeyaml:0
+"
+
+DEPEND="${CP_DEPEND}
+ >=virtual/jdk-1.8:*
+ test? (
+ dev-java/assertj-core:3
+ dev-java/guava:0
+ )"
+
+RDEPEND="${CP_DEPEND}
+ >=virtual/jre-1.8:*"
+
+BDEPEND="app-arch/unzip"
+
+DOCS=( README {ANNOUNCEMENT,CHANGES}.txt )
+
+JAVA_RESOURCE_DIRS="src/main/resources"
+JAVA_SRC_DIR="src/main/java"
+
+JAVA_TEST_GENTOO_CLASSPATH="assertj-core-3"
+JAVA_TEST_RESOURCE_DIRS="src/test/resources"
+JAVA_TEST_RUN_ONLY="src/test/resources/testng.xml"
+JAVA_TEST_SRC_DIR="src/test/java"
+
+src_prepare() {
+ java-pkg-2_src_prepare
+ java-pkg_clean ! -path "./src/*"
+
+ rm src/main/resources/META-INF/MANIFEST.MF || die
+}
+
+src_test() {
+ # This contains the compiler groovyc
+ unzip "${DISTDIR}/apache-groovy-binary-${AGV}.zip"
+
+ JAVA_GENTOO_CLASSPATH_EXTRA=":${DISTDIR}/spock-core-${SCV}.jar"
+
+ ejavac -cp "${JAVA_TEST_SRC_DIR}:${PN}.jar:$(java-pkg_getjars guava)" \
+ src/test/java/test/SimpleBaseTest.java || die
+
+ # java-pkg-simple.eclass expects generated test classes in this
+ # directory and will copy them to target/test-classes
+ mkdir generated-test || die "cannot create generated-test directory"
+ "groovy-${AGV}/bin/groovyc" \
+ -cp "${JAVA_TEST_SRC_DIR}:${DISTDIR}/spock-core-${SCV}.jar" \
+ -d generated-test \
+ src/test/groovy/test/groovy/* || die
+
+ JAVA_GENTOO_CLASSPATH_EXTRA+=":${DISTDIR}/groovy-all-${GAV}.jar"
+ java-pkg-simple_src_test
+}
+
+src_install() {
+ java-pkg-simple_src_install
+ java-pkg_dolauncher ${PN} --main org.testng.TestNG
+
+ java-pkg_newjar "${DISTDIR}/jquery-${JQV}.jar" jquery.jar
+ java-pkg_regjar "${ED}/usr/share/${PN}/lib/jquery.jar"
+
+ java-pkg_register-ant-task
+}