summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2021-05-13 12:58:12 +0200
committerMiroslav Šulc <fordfrog@gentoo.org>2021-05-13 12:58:28 +0200
commitab53c56a9d9e11c81ac81cbb541f91415a640ae4 (patch)
treeed9486771dbf37e2a84d59335a62c4eb4bc7f727 /dev-java
parentapp-emulation/containerd: remove ED usage (diff)
downloadgentoo-ab53c56a9d9e11c81ac81cbb541f91415a640ae4.tar.gz
gentoo-ab53c56a9d9e11c81ac81cbb541f91415a640ae4.tar.bz2
gentoo-ab53c56a9d9e11c81ac81cbb541f91415a640ae4.zip
dev-java/jakartaee-migration: bump to 1.0.0
Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/jakartaee-migration/Manifest1
-rw-r--r--dev-java/jakartaee-migration/jakartaee-migration-1.0.0.ebuild89
2 files changed, 90 insertions, 0 deletions
diff --git a/dev-java/jakartaee-migration/Manifest b/dev-java/jakartaee-migration/Manifest
index 6d2f38a8b361..a606c0e97d64 100644
--- a/dev-java/jakartaee-migration/Manifest
+++ b/dev-java/jakartaee-migration/Manifest
@@ -1 +1,2 @@
DIST jakartaee-migration-0.2.0-sources.tar.gz 34495 BLAKE2B 98e281d4a0a2c27215131b4b72406fbf9d6b335602df6e44be8eec252071482305182ab8d3554317650f69197438c1634982ba77297c93603835ded1fe43d105 SHA512 c3874cf036051a0636287b3afa78af96458816601a7a79117994389f31ad8f253d9b0a9bb1530de3263f1b8ca2f63fcdf113b3ad933a545136559ca80ae7700f
+DIST jakartaee-migration-1.0.0-sources.tar.gz 35116 BLAKE2B 98b587e5a51e8f3540d6f4570c60ffa5516801709e41260ac09f7fcabc9e96a3b9067e8eba6c5975c62e3c56585a1f334a21acc15627666e1616ced6f625c56f SHA512 f0c0dc5da4d3c5d4bae8fd4c3db349cb45b7c8d82ca0bb12f3c995e92d4b0893db111ab33ce812299d66904827adc91b22c49381625760fc05c1b10de76faa0c
diff --git a/dev-java/jakartaee-migration/jakartaee-migration-1.0.0.ebuild b/dev-java/jakartaee-migration/jakartaee-migration-1.0.0.ebuild
new file mode 100644
index 000000000000..a5a06c63d545
--- /dev/null
+++ b/dev-java/jakartaee-migration/jakartaee-migration-1.0.0.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Skeleton command:
+# java-ebuilder --generate-ebuild --workdir . --pom pom.xml --download-uri https://ftp.fau.de/apache/tomcat/jakartaee-migration/v1.0.0/source/jakartaee-migration-1.0.0-src.tar.gz --slot 0 --keywords "~amd64" --ebuild jakartaee-migration-1.0.0.ebuild
+
+EAPI=7
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="org.apache.tomcat:jakartaee-migration:1.0.0"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="Apache Tomcat tool for migration from Java EE 8 to Jakarta EE 9."
+HOMEPAGE="https://tomcat.apache.org"
+SRC_URI="mirror://apache/tomcat/${PN}/v${PV}/source/${P}-src.tar.gz -> ${P}-sources.tar.gz"
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+# Common dependencies
+# POM: pom.xml
+# commons-io:commons-io:2.8.0 -> >=dev-java/commons-io-2.8.0:1
+# org.apache.bcel:bcel:6.5.0 -> >=dev-java/bcel-6.5.0:0
+# org.apache.commons:commons-compress:1.20 -> >=dev-java/commons-compress-1.20:0
+
+CDEPEND="
+ dev-java/ant-core:0
+ dev-java/bcel:0
+ >=dev-java/commons-compress-1.20:0
+ dev-java/commons-io:1
+"
+
+# Compile dependencies
+# POM: pom.xml
+# org.apache.ant:ant:1.10.9 -> !!!groupId-not-found!!!
+# POM: pom.xml
+# test? junit:junit:4.13.1 -> >=dev-java/junit-4.13.1:4
+
+DEPEND="
+ >=virtual/jdk-1.8:*
+ ${CDEPEND}
+"
+
+RDEPEND="
+ >=virtual/jre-1.8:*
+ ${CDEPEND}"
+
+S="${WORKDIR}/${P}"
+
+JAVA_LAUNCHER_FILENAME="${PN}"
+
+JAVA_GENTOO_CLASSPATH="ant-core,bcel,commons-compress,commons-io-1"
+JAVA_SRC_DIR="src/main/java"
+JAVA_MAIN_CLASS="org.apache.tomcat.jakartaee.MigrationCLI"
+JAVA_RESOURCE_DIRS=(
+ "src/main/resources"
+)
+
+JAVA_TEST_GENTOO_CLASSPATH="junit-4"
+JAVA_TEST_SRC_DIR="src/test/java"
+JAVA_TEST_RESOURCE_DIRS=(
+ "src/test/resources"
+)
+
+src_prepare() {
+ default
+ sed -i "s/\${project.version}/${PV}/g" src/main/resources/info.properties
+}
+
+src_test() {
+ # we need to create jar files for the tests the same way as it's done using pom.xml
+ local implementation_version=$(grep Implementation-Version pom.xml | grep -oE "[0-9]+\.[0-9]+\.[0-9]+")
+ mkdir -p target/test-classes/META-INF || die
+ pushd target/test-classes || die
+ echo "Implementation-Version: ${implementation_version}" > META-INF/MANIFEST.MF
+ ejavac -d . -encoding ${JAVA_ENCODING} $(find "${S}/${JAVA_TEST_SRC_DIR}" -name CommonGatewayInterface.java) || die
+ jar cfm cgi-api.jar META-INF/MANIFEST.MF $(find -name CommonGatewayInterface.class) || die
+ ejavac -d . -encoding ${JAVA_ENCODING} $(find "${S}/${JAVA_TEST_SRC_DIR}" -name HelloCGI.java) || die
+ jar cfm hellocgi.jar META-INF/MANIFEST.MF $(find -name HelloCGI.class) || die
+ for enc in rsa dsa ec; do
+ cp hellocgi.jar hellocgi-signed-${enc}.jar || die
+ jarsigner -keystore "${S}/src/test/resources/keystore.p12" -storepass apache hellocgi-signed-${enc}.jar ${enc} || die
+ done
+ popd
+
+ java-pkg-simple_src_test
+}