walkmod-maven-plugin

Walkmod plugin to resolve a maven user classpath and provide it to code transformations

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

org.walkmod
ArtifactId

ArtifactId

walkmod-maven-plugin
Last Version

Last Version

2.1.7
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

walkmod-maven-plugin
Walkmod plugin to resolve a maven user classpath and provide it to code transformations
Project URL

Project URL

https://github.com/rpau/walkmod-maven-plugin
Source Code Management

Source Code Management

https://github.com/rpau/walkmod-maven-plugin

Download walkmod-maven-plugin

How to add to project

<plugin>
    <groupId>org.walkmod</groupId>
    <artifactId>walkmod-maven-plugin</artifactId>
    <version>2.1.7</version>
</plugin>

Dependencies

compile (9)

Group / Artifact Type Version
org.walkmod : javalang jar [2.0, 5.0)
org.walkmod : walkmod-core jar [2.0.0,3.0.0)
org.jboss.shrinkwrap.resolver : shrinkwrap-resolver-api jar 2.2.1
org.jboss.shrinkwrap.resolver : shrinkwrap-resolver-api-maven jar 2.2.1
org.jboss.shrinkwrap.resolver : shrinkwrap-resolver-spi jar 2.2.1
org.jboss.shrinkwrap.resolver : shrinkwrap-resolver-impl-maven jar 2.2.1
org.jboss.shrinkwrap.resolver : shrinkwrap-resolver-impl-maven-archive jar 2.2.1
org.apache.maven : maven-embedder jar 3.2.5
org.apache.maven : maven-model-builder jar 3.2.5

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.slf4j : slf4j-log4j12 jar 1.7.5

Project Modules

There are no modules declared in this project.

walkmod-maven-plugin

Join%20Chat

Build Status

Build Windows Status, link=

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.

    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:

<!DOCTYPE walkmod PUBLIC "-//WALKMOD//DTD" "http://www.walkmod.com/dtd/walkmod-1.1.dtd">
<walkmod>
    <conf-providers>
        <conf-provider type="maven"/>
    </conf-providers>
</walkmod>

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.

Versions

Version
2.1.7
2.1.6
2.1.5
2.1.4
2.1.3
2.1.2
2.1.1
2.1.0
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1
1.0