summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-java/plexus-classworlds/Manifest1
-rw-r--r--dev-java/plexus-classworlds/metadata.xml3
-rw-r--r--dev-java/plexus-classworlds/plexus-classworlds-2.6.0.ebuild59
3 files changed, 63 insertions, 0 deletions
diff --git a/dev-java/plexus-classworlds/Manifest b/dev-java/plexus-classworlds/Manifest
index ce840cb6f52b..78a8b35b095b 100644
--- a/dev-java/plexus-classworlds/Manifest
+++ b/dev-java/plexus-classworlds/Manifest
@@ -1 +1,2 @@
DIST plexus-classworlds-2.2.3.tar.bz2 41744 BLAKE2B 41ddc64c066bdfb5f2398773790b9fec213070d3dad5e57f7b0643f4347386d5304c435cd60e5b1fad32f2d7fae7b48a2afd0189d115018ed5ee38901c80867a SHA512 d5f3d3dac4df569b91ddea9265b14a2459b0ecd4ac3e4547cbac341f50d18238071a7a560d9771a9f8724c59225ea7fa8645ed72c5a00a684519a46a024c3c61
+DIST plexus-classworlds-2.6.0.tar.gz 57221 BLAKE2B 7cef274981101eab85247c1a19420ebbb626b671312579ea665fc3d82e9eb8caba55955ccbc38ccd54e19c55ec1683b6a99a2cd96b08bf7ace57355a8e958d1f SHA512 d6ef17a4651da99975bcfc04f89ba128d891efc9047dc9b8afa52bd092d07268d44a7424a3a3700209bb56452f035ac1071c58ae6dc961b7e991efee1c0e117e
diff --git a/dev-java/plexus-classworlds/metadata.xml b/dev-java/plexus-classworlds/metadata.xml
index 4221e170cbc0..183a9252fc9e 100644
--- a/dev-java/plexus-classworlds/metadata.xml
+++ b/dev-java/plexus-classworlds/metadata.xml
@@ -5,4 +5,7 @@
<email>java@gentoo.org</email>
<name>Java</name>
</maintainer>
+ <upstream>
+ <remote-id type="github">codehaus-plexus/plexus-classworlds</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/dev-java/plexus-classworlds/plexus-classworlds-2.6.0.ebuild b/dev-java/plexus-classworlds/plexus-classworlds-2.6.0.ebuild
new file mode 100644
index 000000000000..3a2f9d422f54
--- /dev/null
+++ b/dev-java/plexus-classworlds/plexus-classworlds-2.6.0.ebuild
@@ -0,0 +1,59 @@
+# 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="org.codehaus.plexus:plexus-classworlds:2.6.0"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="The class loader framework of the Plexus project"
+HOMEPAGE="https://codehaus-plexus.github.io/plexus-classworlds/"
+SRC_URI="https://github.com/codehaus-plexus/plexus-classworlds/archive/plexus-classworlds-${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+
+DEPEND="
+ >=virtual/jdk-1.8:*
+ test? (
+ dev-java/commons-logging
+ dev-java/xml-commons-external:1.4
+ )
+"
+RDEPEND=">=virtual/jre-1.8:*"
+
+S="${WORKDIR}/${PN}-${P}"
+
+JAVA_MAIN_CLASS="org.codehaus.plexus.classworlds.launcher.Launcher"
+JAVA_SRC_DIR="src/main/java/"
+
+JAVA_TEST_GENTOO_CLASSPATH="junit-4"
+JAVA_TEST_SRC_DIR="src/test/java"
+JAVA_TEST_RESOURCE_DIRS="src/test/test-data"
+JAVA_TEST_EXCLUDES="org.codehaus.plexus.classworlds.TestUtil"
+
+src_prepare() {
+ default
+ # Ignore one test case testing the presence of ant-core
+ sed \
+ -e '/testConfigure_Valid/i @Ignore' \
+ -e '/import org.junit.Test/a import org.junit.Ignore;' \
+ -i src/test/java/org/codehaus/plexus/classworlds/launcher/ConfiguratorTest.java || die
+}
+
+src_test(){
+ mkdir -p target/test-lib || die
+ # https://github.com/codehaus-plexus/plexus-classworlds/blob/plexus-classworlds-2.6.0/pom.xml#L159-L161
+ ln -s "$(java-pkg_getjars --build-only xml-commons-external-1.4)" \
+ target/test-lib/xml-apis-1.3.02.jar || die
+ # symlinking works only if java-pkg_getjars finds only one file
+ # but commons-logging has multiple jar files.
+ ln -s "${SYSROOT}"/usr/share/commons-logging/lib/commons-logging.jar \
+ target/test-lib/commons-logging-1.0.3.jar || die
+ java-pkg-simple_src_test
+}