Comments (20)
Agree, Byte Buddy v0.3 is released in 2-3 weeks and I'll integrate OSGI with this new version. Is this early enough for your needs?
from byte-buddy.
I do not have a lot of OSGI experience and I cannot use the maven-bundle-plugin
as it does not play nicely with the maven-shade-plugin
. I had to put the OSGI entries into the manifest using the shade plugin. Could you do me a favor and run:
git clone https://github.com/raphw/byte-buddy.git
cd byte-buddy
mvn install -Pextras
and check if this looks okay? Thanks!
from byte-buddy.
So I gave this a go but it won't build due to javadoc errors. What version of the JDK does one need? I am using 1.7u60.
[ERROR] javadoc: warning - Class OutputTimeUnit not found.
[ERROR] /Users/mbishop/Sides/byte-buddy/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/DynamicType.java:180: warning - Tag @link: reference not found: org.objectweb.asm.ClassVisitor
[ERROR] /Users/mbishop/Sides/byte-buddy/byte-buddy-dep/src/main/java/net/bytebuddy/asm/ClassVisitorWrapper.java:14: warning - Tag @link: reference not found: org.objectweb.asm.ClassVisitor
[ERROR] /Users/mbishop/Sides/byte-buddy/byte-buddy-dep/src/main/java/net/bytebuddy/instrumentation/attribute/FieldAttributeAppender.java:15: warning - Tag @link: reference not found: org.objectweb.asm.FieldVisitor
[ERROR] /Users/mbishop/Sides/byte-buddy/byte-buddy-dep/src/main/java/net/bytebuddy/instrumentation/attribute/MethodAttributeAppender.java:16: warning - Tag @link: reference not found: org.objectweb.asm.MethodVisitor
from byte-buddy.
I tried to recreate this problem, but I cannot find out what goes wrong when you build. I doubt that it is related to the JDK but rather to your system context. Are you using MacOS? This is the only OS I never built on. I wonder if Apple has something customary to its JDK. I currently build Byte Buddy on Windows and on Linux with JDKs 1.6, 1.7 and 1.8, this is part of the Travis CI integration. I also built it on various machines and it never caused trouble.
I wonder if this could be related to your Maven version? I also wonder why it is complaining about OutputTimeUnit
what is a JMH class which is clearly available with the configured version and which is never referenced in the javadoc anywhere. Alltogether, it should not even create a javadoc when you do not add the -Pextras
profile.
But for the time being, try this prebuilt jar: https://www.dropbox.com/s/lahrljtd1we46o5/byte-buddy-0.3-SNAPSHOT.jar?dl=0
Thanks!
from byte-buddy.
I am on Mac and that's usually not a problem.
Maven maybe? I am using 3.2.1.
from byte-buddy.
I tried it again with forced updates and now the build is fine. Probably a bad download yesterday.
One interesting thing about 'mvn clean' is that it wants a GPG passphrase? To clean?
from byte-buddy.
That's a relief, I want the build to be clean. Never encountered the GPG thing, it should only pop up when you use the extras
profile but I will investigate. Did you verify the OSGI compatibility? I am on vacation next week but I'll release a new version right after, I miss some test cases and some documentation and then its good to go.
from byte-buddy.
So I can't check the OSGi output because I have to run the extras profile to generate the manifest.
Nonetheless, I think your entries won't be right. I will take some time in the next few weeks to create a pull request for this issue. I cannot commit to a time so go ahead with your release. No doubt another release will come along, it always does. ;)
from byte-buddy.
Sure thing, but have you tried the version I uploaded?
from byte-buddy.
Fixed in version 0.3.
from byte-buddy.
Hi,
We are unable to use bytebuddy for OSGi environments. Are you sure that Export-Package definition is correct?
Export-Package: !net.bytebuddy.jar.asm.*,net.bytebuddy.*
Related issue and comment:
https://github.com/ui4j/ui4j/issues/28#issuecomment-106741600
from byte-buddy.
Not entirely sure. To be honest, I do not use OSGi, I only googled my way. I am going to have a look at it.
from byte-buddy.
I guys, i will fix this, but I want to get the requirements straigt.
Right now only byte-buddy-agent produces valid osgi headers, however I assume this is not even included as bundle, because its a javaagent. This is not even a valid bundle (because it doesnt provide services) so I propose to remove it.
byte-buddy-dep and byte-buddy both do not produce osgi headers.
Could you please clarify which Classes you actually want to use form which jar?
from byte-buddy.
Update, i am building the 0.7 snapshot and the osgi headers are valid. i am able to load the bundle in karaf:
karaf@root()> bundle:install mvn:net.bytebuddy/byte-buddy/0.7-SNAPSHOT
Bundle ID: 53
53 | Active | 80 | 0.7-SNAPSHOT | Byte Buddy (without dependencies)
karaf@root()> bundle:info 53
Byte Buddy (without dependencies) (53)
from byte-buddy.
The current version or your build?
from byte-buddy.
without my changes. It works, but as sent to you via skype, a really correct header is pretty long, due to the amount of packages and tangling you have there
from byte-buddy.
Here are the new manifest files my upcoming PR will produce. Would these work for you?
https://gist.github.com/CodingFabian/35f727056830156b2756
from byte-buddy.
Version 0.6.7 should have correct OSGi headers. Thanks @CodingFabian for fixing this!
from byte-buddy.
On second look, it seems like the shaded POM is not longer overriding the original POM. The dependency remains declared...
from byte-buddy.
Okay, I had to tweak the build a bit. The shade plugin does not play nice with the bundle plugin. I had to list the exports explicitly. It works with version 0.6.8.
from byte-buddy.
Related Issues (20)
- I am sorry, this is a question about java bytecode HOT 5
- Not able to intercept methods of java.net.HttpURLConnection class in Java 17 HOT 1
- Strange interaction with method implementations for methods from composite interfaces HOT 1
- Replace Method Code HOT 3
- Can I replace the new byte[] in the onTransformation method? HOT 1
- I want to use bytebuddy to advice java.time.LocalDateTime HOT 3
- BUG: instrumentation error HOT 3
- No classes have been predefined during the image build to load from bytecodes at runtime HOT 8
- Verify Error on Byte Buddy generated class HOT 1
- Question: copy class hierarchy in an environment without Java Agent HOT 1
- Can 'private final method' in 'public final class' be redefined? HOT 4
- Method matchers works by chance HOT 2
- Why does ClassNotFoundException appear in Interceptor when running in SpringBoot? HOT 1
- Compilation error after adding lombok to classpath HOT 1
- why is the byte-buudy AgentBuilder source code so long ? HOT 2
- Invalid module descriptor of byte-buddy `jar` when `JAVA_HOME` is set to version 21 HOT 16
- matched class wasn't transformered and the issue appears just twice, and i didn't reproducing the issue HOT 10
- Fail to read property due to `IllegalArgumentException` when using it on withX methods HOT 4
- Improve diagnostics/troubleshooting features for agent installation HOT 1
- ByteBudy agent required by Mockito fails to install on GraalVM HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from byte-buddy.