An open API service indexing awesome lists of open source software.

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

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.