Maven Error
willemneal opened this issue · 1 comments
Hey Jon,
I've been playing around with Phosphor for sometime now and I think it's awesome. I'm trying to add instrumentation to add either a method or a field for each loop in a class and "taint" it with the loop condition. That is to say set that field with the variable of the loop condition or pass it to a void function. This way I can add the loops to the list of sinks.
That being said I'm very new to ASM and low level bytecode stuff and I found this when looking around for resources. Phosphor itself was pretty advanced usage of ASM and this project looked like the perfect introduction. Thanks for putting it together!
When I try to run "mvn package", however, I get the following error and I haven't found anything online that helps (I'm also new to maven).
tia,
WIllem
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building instrumenter-maven-plugin 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ instrumenter-maven-plugin ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /mnt/c/Users/Willem/Drive/linuxHome/sirwillem/Research/bytecode-examples/staticInstrumenter/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ instrumenter-maven-plugin ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-plugin-plugin:3.3:descriptor (default-descriptor) @ instrumenter-maven-plugin ---
[WARNING] Using platform encoding (UTF-8 actually) to read mojo metadata, i.e. build is platform dependent!
[INFO] Applying mojo extractor for language: java
[INFO] Mojo extractor for language: java found 0 mojo descriptors.
[INFO] Applying mojo extractor for language: bsh
[INFO] Mojo extractor for language: bsh found 0 mojo descriptors.
[INFO] Applying mojo extractor for language: java-annotations
[INFO] Mojo extractor for language: java-annotations found 0 mojo descriptors.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.540 s
[INFO] Finished at: 2017-01-18T00:12:06+00:00
[INFO] Final Memory: 14M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.3:descriptor (default-descriptor) on project instrumenter-maven-plugin: Error extracting plugin descriptor: 'No mojo definitions were found for plugin: net.jonbell.examples.bytecode:instrumenter-maven-plugin.' -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Oops.. It looks like this was half-finished example :/
I just committed the rest of it. Now you can do mvn package. You can then do java -jar target/instrumenter-maven-plugin-0.0.1-SNAPSHOT.jar and run it on any code. Or, you can use it as a maven plugin. In that case, do mvn install, and then for an example, look at staticInstrumenterUsage, where (after doing a mvn install in the instrumenter plugin) you can do mvn package, and then note the generated files in target/classes-instrumented and target/test-classes-instrumented.
Let me know if you'd like to chat at all about Phosphor... I am now a Professor at GMU, and live in DC ~10 miles from UMD and would be happy to come out for a visit.