summaryrefslogtreecommitdiff
path: root/dev-java/jakartaee-migration
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java/jakartaee-migration')
-rw-r--r--dev-java/jakartaee-migration/Manifest4
-rw-r--r--dev-java/jakartaee-migration/jakartaee-migration-0.2.0.ebuild54
-rw-r--r--dev-java/jakartaee-migration/jakartaee-migration-1.0.0.ebuild89
3 files changed, 91 insertions, 56 deletions
diff --git a/dev-java/jakartaee-migration/Manifest b/dev-java/jakartaee-migration/Manifest
index 308d1d8855f0..f072aad95712 100644
--- a/dev-java/jakartaee-migration/Manifest
+++ b/dev-java/jakartaee-migration/Manifest
@@ -1,3 +1,3 @@
-DIST jakartaee-migration-0.2.0-sources.tar.gz 34495 BLAKE2B 98e281d4a0a2c27215131b4b72406fbf9d6b335602df6e44be8eec252071482305182ab8d3554317650f69197438c1634982ba77297c93603835ded1fe43d105 SHA512 c3874cf036051a0636287b3afa78af96458816601a7a79117994389f31ad8f253d9b0a9bb1530de3263f1b8ca2f63fcdf113b3ad933a545136559ca80ae7700f
-EBUILD jakartaee-migration-0.2.0.ebuild 1389 BLAKE2B 3ad313f6831a5515aabdb82fdacf79b8f5c797ffb2795cd69f3cebb30c52b4d8084cab5a74adef3b8fe0618d54d89702edeffa136c138727a929377d8a8a37be SHA512 ead7d25c89c56bf8c7e7a5731addd40b6ef4d984a0c653926230b3944069a8cbf310c1122d1f03304faad98799f9a20b78a29e98c5d69ebeb209f547ab8bedcf
+DIST jakartaee-migration-1.0.0-sources.tar.gz 35116 BLAKE2B 98b587e5a51e8f3540d6f4570c60ffa5516801709e41260ac09f7fcabc9e96a3b9067e8eba6c5975c62e3c56585a1f334a21acc15627666e1616ced6f625c56f SHA512 f0c0dc5da4d3c5d4bae8fd4c3db349cb45b7c8d82ca0bb12f3c995e92d4b0893db111ab33ce812299d66904827adc91b22c49381625760fc05c1b10de76faa0c
+EBUILD jakartaee-migration-1.0.0.ebuild 2877 BLAKE2B c6fc88baf5abd7df3c31b25326154c546f259cfc697b4cea9581b4b900ec5d1bffc3d017eac1b201c728cfa4b3056da72ba102f13ba0171e27e8229c8e2ca344 SHA512 eee4baddab8ec054a4001b77bf5291ce755d6ea3385e76b2ee7577b970284fd1789ff3894ce194ac09a137ce0893c0434dd3dbaf4252b99e80a5e32bd729469f
MISC metadata.xml 232 BLAKE2B 513679b02247d8e4cb4c874abd785119d9ca62ad24c44969d52a42c3765d0ebf689024512a2c4c48e69688a4ce02a74ae05708b050a720bc73d8d2bf2ceff58d SHA512 00beaf2c81112ff757c4395f4ea47e85f2d48e369e241f10ddf200090dd6513d52ae2b1aef6d28b7417f1cf34608a7258a167eb307d5670323a2190f3710f893
diff --git a/dev-java/jakartaee-migration/jakartaee-migration-0.2.0.ebuild b/dev-java/jakartaee-migration/jakartaee-migration-0.2.0.ebuild
deleted file mode 100644
index 7815b0e6bc20..000000000000
--- a/dev-java/jakartaee-migration/jakartaee-migration-0.2.0.ebuild
+++ /dev/null
@@ -1,54 +0,0 @@
-# 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/v0.2.0/source/jakartaee-migration-0.2.0-src.tar.gz --slot 0 --keywords "~amd64 ~x86" --ebuild jakartaee-migration-0.2.0.ebuild
-
-EAPI=7
-
-JAVA_PKG_IUSE="doc source test"
-MAVEN_ID="org.apache.tomcat:jakartaee-migration:0.2.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"
-
-CDEPEND="
- dev-java/ant-core:0
- >=dev-java/bcel-6.5.0:0
- >=dev-java/commons-compress-1.20:0
- dev-java/commons-io:1
-"
-
-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"
-)
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
+}