Comments (3)
Building additional artifacts takes a lot of time, therefore you need to build Byte Buddy with the extras profile to build the repackaged artifact. On ByteBuddy.net, you can find a developers page with some infos on that.
Run: mvn package -Pextras
There is also info in the root pom.
from byte-buddy.
Success ! Thanks !
First
Thanks for the great work, unless I hit a major issue that cant be resolved, this is going to make it into xmlsh 2.0 - its been a critical missing link i've been struggling with for months and nearly gave up on. I only need a tiny bit of the features but those make the all the difference between a clean simple solution vs a huge gap in functionality. So thank you !
Suggestion: ( I'm happy to add this and send a pull request)
You put a lot of effort into great docs, and this particular bit (using the -deps vs not jar) I wouldn't have even guessed was an issue without your detailed explanation.
With cglib I just guessed (wrong , twice :) and still didn't understand why the 2 libs issue until I stumbled on byte-buddy.
My suggestion - assume the reader doesn't know what you know at a fundamental level,
particularly toolsets, build systems, libraries etc.
Add the build command for generating the non dep version.
It took me less then 1 minute (including failing, then a mvn clean, then it worked)
Without your hint I would never have figured it out, and not for lack of trying ( I spent several hours researching the issue and came up blank ... including reading all the pom files, review a good portion of the source and every kind of web search I could think of). There were no errors, the jar was built, the docs made it clear that using the non -deps was highly encouraged, every thing I could think of did nothing or appeared to work ... except - no classes in the jar file.
This is undoubtable completely obvious to someone who is an expert in maven but i had no clue at all where to even look ...
Its difficult to keep in mind, but regardless of popularity at any point, and especially with things like build tools which take vast efforts to learn and become proficient, and come and go so quickly over time - what seems like 'common knowledge' can often be the exact opposite. Ironically, the entire purpose of build tools is to solve that problem ... but in the process of simplification and abstraction the end result is you need to become an expert in that particular tool in order to understand how to achieve the obvious :) So a new tool comes out that tries to solve the problems of the previous one,
and so we go ... its literally impossible to keep up and still get work done ... ( the other irony of software, people like to write new programs more then improving old ones ... )
So just a suggestion ...
Just 1 or 2 lines more in the docs can be the difference between someone being able to get it to work or giving up.
Writing all this not to complain but to remind myself as much as anyone ... the more you learn the harder it is to remember what you didn't know before. Its the blind spot of knowledge :)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Byte Buddy (parent) ................................ SUCCESS [ 0.921 s]
[INFO] Byte Buddy Java agent .............................. SUCCESS [ 2.104 s]
[INFO] Byte Buddy (with dependencies) ..................... SUCCESS [ 18.722 s]
[INFO] Byte Buddy (without dependencies) .................. SUCCESS [ 2.787 s]
[INFO] Byte Buddy benchmarks .............................. SUCCESS [ 2.682 s]
[INFO] Byte Buddy for Android ............................. SUCCESS [ 4.114 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31.443 s
[INFO] Finished at: 2015-01-17T11:46:42-05:00
[INFO] Final Memory: 32M/706M
[INFO] ------------------------------------------------------------------------
E:\Work\DEI\github\byte-buddy\byte-buddy\target>ls -l *.jar
-rwxr-xr-x 1 DLEE None 4225288 Jan 17 11:46 byte-buddy-0.6-SNAPSHOT-javadoc.jar
-rwxr-xr-x 1 DLEE None 1050915 Jan 17 11:46 byte-buddy-0.6-SNAPSHOT-sources.jar
-rwxr-xr-x 1 DLEE None 1131915 Jan 17 11:46 byte-buddy-0.6-SNAPSHOT.jar
-rwxr-xr-x 1 DLEE None 5236 Jan 17 11:46 original-byte-buddy-0.6-SNAPSHOT.jar
E:\Work\DEI\github\byte-buddy\byte-buddy\target>jar t < byte-buddy-0.6-SNAPSHOT.jar | tai
net/bytebuddy/jar/asm/commons/RemappingFieldAdapter.class
net/bytebuddy/jar/asm/commons/RemappingMethodAdapter.class
net/bytebuddy/jar/asm/commons/RemappingSignatureAdapter.class
net/bytebuddy/jar/asm/commons/SerialVersionUIDAdder$Item.class
net/bytebuddy/jar/asm/commons/SerialVersionUIDAdder.class
net/bytebuddy/jar/asm/commons/SimpleRemapper.class
net/bytebuddy/jar/asm/commons/StaticInitMerger.class
net/bytebuddy/jar/asm/commons/TableSwitchGenerator.class
net/bytebuddy/jar/asm/commons/TryCatchBlockSorter$1.class
net/bytebuddy/jar/asm/commons/TryCatchBlockSorter.class
from byte-buddy.
Thanks! I am really glad that you like Byte Buddy. I am happy that all the time spent pays off. I am more than happy to merge the suggested addition. If you stumpled upon it, others will probably stumble, as well. Your bug is fixed and I added an exteded API to make interface creation more easy. Just note that interface methods must always be public.
I want to add some additional API improvements in the upcoming week. Once I am done, I will push the changes to Maven Central. Thank you once again for your kind words.
from byte-buddy.
Related Issues (20)
- 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
- Error when trying to modify the response of a method assigned to a public static final config variable HOT 9
- How to change the loaded class in javaagent? HOT 5
- [Question] AgentBuilder.InitializationStrategy.SelfInjection's behaviour in detail HOT 2
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.