https://github.com/walkmod/walkmod-maven-plugin
Walkmod plugin to resolve the classpath of a maven project before executing a code transformation
https://github.com/walkmod/walkmod-maven-plugin
Last synced: 5 months ago
JSON representation
Walkmod plugin to resolve the classpath of a maven project before executing a code transformation
- Host: GitHub
- URL: https://github.com/walkmod/walkmod-maven-plugin
- Owner: walkmod
- Created: 2014-06-19T10:22:58.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2017-03-03T10:08:51.000Z (over 9 years ago)
- Last Synced: 2024-05-28T17:34:04.844Z (about 2 years ago)
- Language: Java
- Size: 83 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
walkmod-maven-plugin
====================
image:https://badges.gitter.im/Join%20Chat.svg[link="https://gitter.im/rpau/walkmod-maven-plugin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"]
image:https://travis-ci.org/rpau/walkmod-maven-plugin.svg["Build Status", link="https://travis-ci.org/rpau/walkmod-maven-plugin"]
image:https://ci.appveyor.com/api/projects/status/4oq9j48jln2j2atu?svg=true["Build Windows Status, link="https://ci.appveyor.com/project/rpau/walkmod-maven-plugin"]
Walkmod plugin to resolve the classpath of a maven project before executing a code transformation. It builds the project and resolve all its dependencies. No matter if it is a maven module project or the classic maven project. In case of being a maven
module, this plugin compiles and resolve the dependencies with the other modules of the same project.
== Usage
Important, to run this plugin, you need to work with JRE 7 or higher.
Specifically, this plugin makes available the classpath of maven project for the code transformations when you run walkmod. In order to access to the project classpath (the `java.lang.ClassLoader` element) from your code transformation, you just need to add
the setter operation for the class loader.
```java
public class MyVisitor extends VisitorSupport {
private ClassLoader classLoader;
public void setClassLoader(ClassLoader classLoader) {
this.classLoader = classLoader;
}
public void visit(MethodCallExpr md, VisitorContext vc){
...
}
```
In order to use this plugin from a project where you would like to run walkmod, you just need the following configuration provider in your walkmod.xml:
```XML
```
== Contributing
If you want to hack on this, fork it, improve it and send me a pull request.
To get started using it, just clone it and call mvn install.