From e4d7ee444e00b5c7e4c431c0b0430d9d8bc8ab9469a3c66f7dd6ccc9b2322e00 Mon Sep 17 00:00:00 2001 From: Anton Shvetz Date: Sat, 18 Jan 2025 11:15:58 +0000 Subject: [PATCH] - Update to v1.16.0 * Changes of v1.16.0 + Allow for erasure of types of bootstrapped methods in Advice within instrumented class. + Rework Advice post-processing to allow for erasure of bootstrapped methods. + Fix missing application of hashCode/equals plugin for Java 8 code. + Include support for JDK Class File API. + Allow Plugin.Engine to retain folders. - Rebase/update patch: * 0001-Avoid-bundling-asm.patch OBS-URL: https://build.opensuse.org/package/show/Java:packages/byte-buddy?expand=0&rev=46 --- .gitattributes | 23 +++ .gitignore | 1 + 0001-Avoid-bundling-asm.patch | 109 +++++++++++ byte-buddy-1.14.18.tar.gz | 3 + byte-buddy-1.15.1.tar.gz | 3 + byte-buddy-1.15.10.tar.gz | 3 + byte-buddy-1.15.11.tar.gz | 3 + byte-buddy-1.15.7.tar.gz | 3 + byte-buddy-1.15.8.tar.gz | 3 + byte-buddy-1.16.0.tar.gz | 3 + byte-buddy.changes | 336 ++++++++++++++++++++++++++++++++++ byte-buddy.spec | 142 ++++++++++++++ 12 files changed, 632 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 0001-Avoid-bundling-asm.patch create mode 100644 byte-buddy-1.14.18.tar.gz create mode 100644 byte-buddy-1.15.1.tar.gz create mode 100644 byte-buddy-1.15.10.tar.gz create mode 100644 byte-buddy-1.15.11.tar.gz create mode 100644 byte-buddy-1.15.7.tar.gz create mode 100644 byte-buddy-1.15.8.tar.gz create mode 100644 byte-buddy-1.16.0.tar.gz create mode 100644 byte-buddy.changes create mode 100644 byte-buddy.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0001-Avoid-bundling-asm.patch b/0001-Avoid-bundling-asm.patch new file mode 100644 index 0000000..ac9d64e --- /dev/null +++ b/0001-Avoid-bundling-asm.patch @@ -0,0 +1,109 @@ +diff -up byte-buddy-byte-buddy-1.16.0/byte-buddy/pom.xml.p0001 byte-buddy-byte-buddy-1.16.0/byte-buddy/pom.xml +--- byte-buddy-byte-buddy-1.16.0/byte-buddy/pom.xml.p0001 2025-01-18 02:22:59.454207769 +0300 ++++ byte-buddy-byte-buddy-1.16.0/byte-buddy/pom.xml 2025-01-18 13:55:24.459735957 +0300 +@@ -26,10 +26,6 @@ + --> + + +- org.objectweb.asm +- net.bytebuddy.jar.asm +- codes.rafael.asmjdkbridge +- net.bytebuddy.jar.asmjdkbridge + + net.bytebuddy, + net.bytebuddy.agent.builder, +@@ -64,11 +60,7 @@ + net.bytebuddy.utility, + net.bytebuddy.utility.nullability, + net.bytebuddy.utility.privilege, +- net.bytebuddy.utility.visitor, +- ${shade.asm.target}, +- ${shade.asm.target}.signature, +- ${shade.asm.target}.commons, +- ${shade.asmjdkbridge.target} ++ net.bytebuddy.utility.visitor + + + net.bytebuddy.utility.dispatcher +@@ -87,6 +79,16 @@ + byte-buddy-dep + + ++ org.ow2.asm ++ asm ++ ${version.asm} ++ ++ ++ org.ow2.asm ++ asm-commons ++ ${version.asm} ++ ++ + net.java.dev.jna + jna + ${version.jna} +@@ -257,64 +259,6 @@ + true + ${bytebuddy.extras} + true +- +- +- ${shade.asm.source} +- ${shade.asm.target} +- +- +- ${shade.asmjdkbridge.source} +- ${shade.asmjdkbridge.target} +- +- +- codes/rafael/asmjdkbridge +- net/bytebuddy/jar/asmjdkbridge +- true +- +- +- +- +- net.bytebuddy:byte-buddy-dep:* +- +- META-INF/MANIFEST.MF +- META-INF/maven/** +- +- +- +- org.ow2.asm:* +- +- META-INF/MANIFEST.MF +- **/module-info.class +- **/LICENSE +- **/NOTICE +- +- +- +- codes.rafael.asmjdkbridge:* +- +- META-INF/versions/** +- +- +- META-INF/MANIFEST.MF +- **/module-info.class +- +- +- +- org.ow2.asm:asm-commons +- +- org/objectweb/asm/commons/AnnotationRemapper.** +- org/objectweb/asm/commons/ClassRemapper.** +- org/objectweb/asm/commons/FieldRemapper.** +- org/objectweb/asm/commons/MethodRemapper.** +- org/objectweb/asm/commons/ModuleHashesAttribute.** +- org/objectweb/asm/commons/ModuleRemapper.** +- org/objectweb/asm/commons/RecordComponentRemapper.** +- org/objectweb/asm/commons/Remapper.** +- org/objectweb/asm/commons/SignatureRemapper.** +- org/objectweb/asm/commons/SimpleRemapper.** +- +- +- + + + net.bytebuddy.build.Plugin$Engine$Default diff --git a/byte-buddy-1.14.18.tar.gz b/byte-buddy-1.14.18.tar.gz new file mode 100644 index 0000000..b7dae7c --- /dev/null +++ b/byte-buddy-1.14.18.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f4a7ea40eafd00cbf4690a0785786360cfb69b866297b1dd62528a73c3f1266 +size 2027694 diff --git a/byte-buddy-1.15.1.tar.gz b/byte-buddy-1.15.1.tar.gz new file mode 100644 index 0000000..0b9b37c --- /dev/null +++ b/byte-buddy-1.15.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74129de1641d7d4090535b775ecb01bdd6fca4d44044f0844c875494fcfb6957 +size 2042176 diff --git a/byte-buddy-1.15.10.tar.gz b/byte-buddy-1.15.10.tar.gz new file mode 100644 index 0000000..053f1d7 --- /dev/null +++ b/byte-buddy-1.15.10.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40c1d373cf7b38a11758033c1657f9dfc410c95d9296f95810fe78a1b54e1c25 +size 2057524 diff --git a/byte-buddy-1.15.11.tar.gz b/byte-buddy-1.15.11.tar.gz new file mode 100644 index 0000000..d99a539 --- /dev/null +++ b/byte-buddy-1.15.11.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ad2f94e473f3d717b5dbe8cfd9e590bc4d4c54bbb2729a4410a720ee1bedf2f +size 2059994 diff --git a/byte-buddy-1.15.7.tar.gz b/byte-buddy-1.15.7.tar.gz new file mode 100644 index 0000000..4c2c459 --- /dev/null +++ b/byte-buddy-1.15.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:858e8c437790d2027f9e23bc36202a5c9e5617e0f652123d1e8315e317bfa5ab +size 2055789 diff --git a/byte-buddy-1.15.8.tar.gz b/byte-buddy-1.15.8.tar.gz new file mode 100644 index 0000000..78fb9ca --- /dev/null +++ b/byte-buddy-1.15.8.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:796b2e24b9508e39bbbfaac5c0b9b88701610dad43301e3edee827a1d56a2d7d +size 2057153 diff --git a/byte-buddy-1.16.0.tar.gz b/byte-buddy-1.16.0.tar.gz new file mode 100644 index 0000000..6480f37 --- /dev/null +++ b/byte-buddy-1.16.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65234ac23a27ddc9c12291b37ebb4b3e2456f2d784ee8b731ff9932b08187d11 +size 2066615 diff --git a/byte-buddy.changes b/byte-buddy.changes new file mode 100644 index 0000000..04492c4 --- /dev/null +++ b/byte-buddy.changes @@ -0,0 +1,336 @@ +------------------------------------------------------------------- +Sat Jan 18 10:59:07 UTC 2025 - Anton Shvetz + +- Update to v1.16.0 + * Changes of v1.16.0 + + Allow for erasure of types of bootstrapped methods in Advice + within instrumented class. + + Rework Advice post-processing to allow for erasure of + bootstrapped methods. + + Fix missing application of hashCode/equals plugin for Java 8 + code. + + Include support for JDK Class File API. + + Allow Plugin.Engine to retain folders. +- Rebase/update patch: + * 0001-Avoid-bundling-asm.patch + +------------------------------------------------------------------- +Sun Dec 15 12:21:44 UTC 2024 - Anton Shvetz + +- Update to v1.15.11 + * Changes of v1.15.11 + + Avoid dependency of CachedReturnPlugin on precompiled class + files. + + Add NOP instruction when Advice is used on void methods as + those might be empty which results on a frame being written + to the same offset, causing an exception. + + Allow Plugin.Enging to link files instead of copying. + + Adjust validator code to avoid compiler bug that was reported + by multiple users. + + Allow injection of class path as File[] to Plugin + constructors. + + Allow for configuring variants when using the Android Gradle + plugin. + +------------------------------------------------------------------- +Sun Nov 3 23:45:15 UTC 2024 - Anton Shvetz + +- Update to v1.15.10 + * Changes of v1.15.10 + + Fix Java 8 patterns for multi-release jars to avoid that + inner classes are excluded. + * Changes of v1.15.9 + + Additional release after time out during previous Gradle + plugin release. + +------------------------------------------------------------------- +Sat Nov 2 15:49:57 UTC 2024 - Anton Shvetz + +- Update to v1.15.8 + * Changes of v1.15.8 + + Extend ClassInjector API to support lazy resolution of class + files. + + Extend DynamicType API to support lazy resolution of + auxiliary types. + + Extend AgentBuilder.Transformer.ForAdvice to support + injection of new classes by their name. + +------------------------------------------------------------------- +Wed Oct 23 10:55:21 UTC 2024 - Anton Shvetz + +- Update to v1.15.7 + * Changes of v1.15.7 + + Additional release after time out during previous Gradle + plugin release. + * Changes of v1.15.6 + + Add ConstructorResolver to Super annotation for + MethodDelegation to allow for dynamic constructor resolution. + + Add Java 8 versions of shaded ASM to allow for faster class + file validation and CDS support. + +------------------------------------------------------------------- +Thu Oct 17 10:23:16 UTC 2024 - Anton Shvetz + +- Update to v1.15.5 + * Changes of v1.15.5 + + Publish Byte Buddy and Byte Buddy agent artifacts as + multi-release jars to support CDS and faster validation. +- Remove Windows-specific resources + +------------------------------------------------------------------- +Sat Oct 12 00:15:26 UTC 2024 - Anton Shvetz + +- Update to v1.15.4 + * Add non-experimental support for Java 24. + +------------------------------------------------------------------- +Thu Sep 26 22:46:31 UTC 2024 - Anton Shvetz + +- Update to v1.15.3 + * Changes of v1.15.3 + + Treat multi-release class files that are newer than the + supported version as regular resources. + + Allow overriding the multi-release class file version from + Maven and Gradle plugin. + + Correctly resolve multi-release class files in Android. + +------------------------------------------------------------------- +Wed Sep 25 21:44:53 UTC 2024 - Anton Shvetz + +- Update to v1.15.2 + * Changes of v1.15.2 + + Add support for multi-release JAR files in ClassFileLocators + and Plugin.Engine.Default. + + Add Gradle task for transforming multiple jar files with + ByteBuddyJarsTask. + + Avoid validation of JarFile when extracting individual + entries. + + Rework discovery in ByteBuddyMojo. + +------------------------------------------------------------------- +Sun Sep 1 16:25:12 UTC 2024 - Anton Shvetz + +- Update to v1.15.1 + * Changes of v1.15.1 + + Revert default EntryPoint for Android Gradle plugin to use + DECORATE unless explicitly specified due to many generic type + errors in Kotlin classes. + * Changes of v1.15.0 + + Introduce AsmClassWriter and AsmClassReader abstractions that + allow for plugging different implementations of readers and + writers. + + Add configuration extension to the Android Gradle plugin and + make it behave like regular Gradle plugin with standard + configuration. + + Throw TypeNotPresentException upon discovering undeclared + type variables as it was recently fixed on the JVM. + * Changes of v1.14.19 + + Add Maven Mojo for transforming jars and for transforming + dependencies folder. + + Better error handling for unresolved type variables. + + Allow loading arguments of the instrumented method in + MemberSubstitution. + + Fix checks for method visibility. + +------------------------------------------------------------------- +Mon Jul 8 21:30:57 UTC 2024 - Anton Shvetz + +- Update to v1.14.18 + * Changes of v1.14.18 + + Avoid verification error if constructor advice meats dropped + implicit this frame and throw exception during + instrumentation instead. + + Add support to resolve ByteBuddyAgent from non-obfuscated + name if obfuscation is used. + + Make sure CircularityLock implementations never load classes + during locking. + + Offer use of istat if stat command is not available for + emulated attachment. + + Avoid locking entire class loader when child-first class + loader loads shadowed class and parallel class loading is + supported. + * Changes of v1.14.17 + + Avoid crashing of Android plugin when there are duplicate + files for licenses or license notices. + +------------------------------------------------------------------- +Thu May 23 05:28:12 UTC 2024 - Anton Shvetz + +- Update to v1.14.16 + * Changes of v1.14.16 + + Update ASM and introduce support for Java 23. + +------------------------------------------------------------------- +Tue May 21 10:58:11 UTC 2024 - Fridrich Strba + +- Upgrade to v1.14.15 + * Changes of v1.14.15 + + Allow attaching from root on J9. + * Changes of v1.14.14 + + Adjust type validation to accept additional names that are + legal in the class file format. + + Fix dynamic attach on Windows when a service user is active. + + Avoid failure when using Android's strict mode. +- Removed patch: + * 0002-Remove-dependencies.patch + + not needed since we have jna packaged + +------------------------------------------------------------------- +Thu Apr 18 11:25:23 UTC 2024 - Fridrich Strba + +- Split the whole package into sub-packages +- Added patch: + * 0001-Avoid-bundling-asm.patch + + Do not bundle asm, but use external artifact + * 0002-Remove-dependencies.patch + + Remove optional dependency on jna + +------------------------------------------------------------------- +Thu Mar 28 20:38:55 UTC 2024 - Anton Shvetz + +- Update to v1.14.13 + * Changes of v1.14.13 + + Avoid resolving type variables when generic type processing + is disabled. + + Improve error message for Byte Buddy agent external attach. + + Fix build for modular jars when using later version than Java + 8. + +------------------------------------------------------------------- +Sat Feb 17 15:42:45 UTC 2024 - Anton Shvetz + +- Update to v1.14.12 + * Changes of v1.14.12 + + Pin proxy class file version to avoid implicit changes when + using Graal native image. + + Add support for Java 23. + + Add missing @MaybeNull annotation. + +------------------------------------------------------------------- +Thu Dec 21 00:16:33 UTC 2023 - Anton Shvetz + +- Update to v1.14.11 + * Changes of v1.14.11 + + Adjusts Gradle plugin to support Gradle 8.4 without warnings. + + Avoid blurry exception on build plugin for fail fast. + +------------------------------------------------------------------- +Wed Dec 20 23:21:57 UTC 2023 - Anton Shvetz + +- Update to v1.14.10 + * Changes of v1.14.10 + + Add lazy facade to default TypePool in AgentBuilder to avoid + parsing of types ignored by name. + + Avoid module info classes in Android plugin. + +------------------------------------------------------------------- +Tue Oct 17 05:32:59 UTC 2023 - Anton Shvetz + +- Update to v1.14.9 + * Changes of v1.14.9 + + Update ASM to version 9.6 + + Support Android plugin to support APG version 7.4 + +------------------------------------------------------------------- +Wed Sep 27 05:14:22 UTC 2023 - Fridrich Strba + +- Remove dependency on findbugs +- Do not produce bootstrap package + +------------------------------------------------------------------- +Thu Sep 14 23:17:38 UTC 2023 - Anton Shvetz + +- Update to v1.14.8 + * Changes of v1.14.8 + + Correctly read versions from class file that would use both + bytes. + + Fix Byte Buddy Gradle plugin for Gradle 8.3+. + + Correct field and static method access on subtypes in + MemberSubstitution. + + Support APK 7.4+ versions in Byte Buddy Gradle for Android + plugin. +- Reproducible builds: use SOURCE_DATE_EPOCH for timestamp + +------------------------------------------------------------------- +Thu Aug 31 07:35:26 UTC 2023 - Anton Shvetz + +- Update to v1.14.7 + * Changes of v1.14.7 + + Correctly read minor version from class file. + + Catch type resolution errors when applying Plugin.Engine. + +------------------------------------------------------------------- +Tue Aug 15 03:26:43 UTC 2023 - Anton Shvetz + +- Update to v1.14.6 + * Changes of v1.14.6 + + Add PatchMode.SUBSTITUTE and + ResettableClassFileTransformer.Substitutable for in-order + patching. + + Allow for explicit specification og differential matcher when + patching an AgentBuilder. + + Add platform loader to locator for build plugins. + + Correctly resolve accessors for fields with capitalized first + letter. + + Make jars for Android read-only as newer versions require it. + +------------------------------------------------------------------- +Sat Jun 10 08:06:59 UTC 2023 - Anton Shvetz + +- Update to v1.14.5 + * Changes of v1.14.5 + + Avoid use of location if agent argument separator is + contained. + + Allow failure of member substitution if no element is + separated. + + Allow retry in case of parallel class injection. + +------------------------------------------------------------------- +Fri May 5 07:43:46 UTC 2023 - Fridrich Strba + +- Do not bootstrap using downloaded binaries, but build the + minimal bootstrap package from sources + +------------------------------------------------------------------- +Thu Apr 13 16:47:24 UTC 2023 - Anton Shvetz + +- Update to v1.14.4 + * Changes of v1.14.4 + + Include instrumented type and auxiliary types in TypePool + that is passed to TypeWriter. + +------------------------------------------------------------------- +Mon Apr 3 12:37:18 UTC 2023 - Anton Shvetz + +- Remove patch: + * 00-asm5.patch - not needed due to update of objectweb-asm + +------------------------------------------------------------------- +Sun Apr 2 18:09:26 UTC 2023 - Anton Shvetz + +- Update to v1.14.3 + * Changes of v1.14.3 + + Make MethodGraph.Compiler failsafe when processing incomplete + methods. + + Update ASM. + +------------------------------------------------------------------- +Mon Mar 20 13:10:06 UTC 2023 - Anton Shvetz + +- Update to v1.14.2 + * Changes of v1.14.2 + + Fix offset mapping for local variable array remapping in + Advice. + + Add possibility to specify an index for skipOn and repeatOn + which resolves the checked value from a returned array. + * Changes of 1.14.1 + + Add extended scope for Maven Byte Buddy plugin to include all + non-test-dependencies. + +------------------------------------------------------------------- +Wed Mar 8 04:33:02 UTC 2023 - Anton Shvetz + +- Initial packaging with v1.14.0 +- Add patch: + * 00-asm5.patch + ~ asm5 does not support the Opcodes.V20 constant diff --git a/byte-buddy.spec b/byte-buddy.spec new file mode 100644 index 0000000..f8dacb0 --- /dev/null +++ b/byte-buddy.spec @@ -0,0 +1,142 @@ +# +# spec file for package byte-buddy +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: byte-buddy +Version: 1.16.0 +Release: 0 +Summary: Runtime code generation for the Java virtual machine +License: Apache-2.0 +Group: Development/Libraries/Java +URL: https://bytebuddy.net/ +Source0: https://github.com/raphw/%{name}/archive/refs/tags/%{name}-%{version}.tar.gz +Patch0: 0001-Avoid-bundling-asm.patch +BuildRequires: fdupes +BuildRequires: jurand +BuildRequires: maven-local +BuildRequires: mvn(codes.rafael.modulemaker:modulemaker-maven-plugin) +BuildRequires: mvn(com.google.code.findbugs:jsr305) +BuildRequires: mvn(net.java.dev.jna:jna) +BuildRequires: mvn(net.java.dev.jna:jna-platform) +BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) +BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations) +BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) +BuildRequires: mvn(org.apache.maven:maven-core) +BuildRequires: mvn(org.apache.maven:maven-plugin-api) +BuildRequires: mvn(org.eclipse.aether:aether-api) +BuildRequires: mvn(org.eclipse.aether:aether-util) +BuildRequires: mvn(org.ow2.asm:asm) >= 9.7.1 +BuildRequires: mvn(org.ow2.asm:asm-commons) +BuildRequires: mvn(org.sonatype.plexus:plexus-build-api) +BuildArch: noarch + +%description +Byte Buddy is a code generation and manipulation library for creating and +modifying Java classes during the runtime of a Java application and without the +help of a compiler. Other than the code generation utilities that ship with the +Java Class Library, Byte Buddy allows the creation of arbitrary classes and is +not limited to implementing interfaces for the creation of runtime proxies. +Furthermore, Byte Buddy offers a convenient API for changing classes either +manually, using a Java agent or during a build. + +%package agent +Summary: Byte Buddy Java agent +Group: Development/Libraries/Java + +%description agent +The Byte Buddy Java agent allows to access the JVM's HotSwap feature. + +%package maven-plugin +Summary: Byte Buddy Maven plugin +Group: Development/Libraries/Java + +%description maven-plugin +A plugin for post-processing class files via Byte Buddy in a Maven build. + +%package javadoc +Summary: API documentation for %{name} +Group: Documentation/HTML + +%description javadoc +API documentation for %{name}. + +%prep +%setup -q -n %{name}-%{name}-%{version} +%patch -P0 -p1 + +# Remove Windows-specific resources +rm -rf %{name}-agent/src/main/resources/win32-x86{,-64} + +# Don't ship android or benchmark modules +%pom_disable_module %{name}-android +%pom_disable_module %{name}-android-test +%pom_disable_module %{name}-benchmark + +# Don't ship gradle plugin +%pom_disable_module %{name}-gradle-plugin + +# Remove check plugins unneeded by RPM builds +%pom_remove_plugin :jacoco-maven-plugin +%pom_remove_plugin :license-maven-plugin +%pom_remove_plugin :pitest-maven +%pom_remove_plugin :coveralls-maven-plugin +%pom_remove_plugin :spotbugs-maven-plugin +%pom_remove_plugin :jitwatch-jarscan-maven-plugin +%pom_remove_plugin :maven-release-plugin +%pom_remove_plugin :nexus-staging-maven-plugin + +# Avoid circular dependency +%pom_remove_plugin :byte-buddy-maven-plugin %{name}-dep + +# Not interested in shading sources (causes NPE on old versions of shade plugin) +%pom_xpath_set pom:createSourcesJar false %{name} + +# Drop build dep on findbugs annotations, used only by the above check plugins +%pom_remove_dep -r :findbugs-annotations +%{java_remove_annotations} %{name}-{agent,dep,maven-plugin} -n SuppressFBWarnings + +%pom_remove_dep org.ow2.asm:asm-deprecated +%pom_remove_dep codes.rafael.asmjdkbridge:asm-jdk-bridge %{name}-dep + +%pom_remove_plugin -r :maven-shade-plugin + +%{mvn_package} :byte-buddy-parent __noinstall + +%build +%{mvn_build} -f -s -- \ + -Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \ + -Dsource=8 + +%install +%mvn_install +%if %{without bootstrap} +%fdupes -s %{buildroot}%{_javadocdir} +%endif + +%files -f .mfiles-%{name} -f .mfiles-%{name}-dep +%doc README.md release-notes.md +%license LICENSE NOTICE + +%files agent -f .mfiles-%{name}-agent +%license LICENSE NOTICE + +%files maven-plugin -f .mfiles-%{name}-maven-plugin + +%files javadoc -f .mfiles-javadoc +%license LICENSE NOTICE + +%changelog