issues running the maven plugin

44 views
Skip to first unread message

j...@jeshan.co

unread,
Sep 11, 2015, 4:13:48 PM9/11/15
to walkmod

Hi all,

I'm trying to use walkmod for the first time through the walkmod-maven-plugin plugin but can't get it to work yet.

(Please note that what follows is based on my limited knowledge of how maven plugins work.)

First of all, I should be using walkmod-maven-plugin and not maven-walkmod-plugin right?

I like to invoke plugins the shorthand way, i.e with "mvn walkmod:check" but couldn't. Interestingly, I could do that with maven-walkmod-plugin but not with walkmod-maven-plugin! So I did some digging and found that we need the META-INF/maven/plugin.xml which is missing from walkmod-maven-plugin (but maven-walkmod-plugin has it!). So that's the first thing I think needs to be fixed.

I tried to work around this and created it based on the one I extracted from maven-walkmod-plugin! :) Now, I could invoke "mvn walkmod:check" but faced an error where I have stumbled:
"Unable to load the mojo 'check' in the plugin 'org.walkmod:walkmod-maven-plugin:1.1.2'. A required class is missing: org.walkmod.mojos.CheckMojo"

So, I did some digging in the walkmod-maven-plugin repo but was surprised that I didn't find any of the Mojo classes! maven-walkmod-plugin had 3 Mojo classes but walkmod-maven-plugin doesn't seem to have any.

So, how should the plugin actually be used?
Does what I wrote above make sense?
How do you others use it?


Jeshan

walkmod

unread,
Sep 11, 2015, 4:29:27 PM9/11/15
to walkmod, j...@jeshan.co
Hi,

First of all, thank you for trying walkmod :-)
So, let me introduce the plugins you are refering:

1) walkmod-maven-plugin is the walkmod plugin that allows to load into Walkmod the classpath of your maven project.
2) maven-walkmod-plugin is the maven plugin that allows to run walkmod as a maven plugin.

Therefore, the META-INF/maven/plugin.xml  are in the correct place. By convention, the first name corresponds to the platform where the plugin will be executed. 

Have you followed the instructions of https://github.com/rpau/maven-walkmod-plugin ?

If you have problems running this plugin, send me the stacktrace.

j...@jeshan.co

unread,
Sep 14, 2015, 4:55:31 PM9/14/15
to walkmod, j...@jeshan.co

> Have you followed the instructions of https://github.com/rpau/maven-walkmod-plugin ?

Yes, I did, but apparently not closely enough! So the next step is to invoke walkmod:install, right?

I did that but I'm still having problems.

>
>
> If you have problems running this plugin, send me the stacktrace.

After running walkmod:install, I ran walkmod:check but I got this:

[ERROR] Failed to execute goal org.walkmod:maven-walkmod-plugin:1.0:check (default-cli) on project abstract-factory: Execution default-cli of goal org.walkmod:maven-walkmod-plugin:1.0:check failed: An API incompatibility was encountered while executing org.walkmod:maven-walkmod-plugin:1.0:check: java.lang.NoSuchMethodError: org.walkmod.WalkModFacade.check([Ljava/lang/String;)V


I took a look and found that that method signature was changed walkmod-core release 1.1.0.

It seems that maven-walkmod-plugin was compiled with walkmod-core > 1.0.7 but is actually being run with core <= 1.0.7.

Do you think my analysis correct?
Did I miss any required steps?

walkmod

unread,
Sep 16, 2015, 2:24:46 AM9/16/15
to walkmod, j...@jeshan.co
Hi,

I am pretty busy this week because, but I am writing tests to verify it and assure that the plugin works. I will notify something ASAP.

walkmod

unread,
Sep 20, 2015, 5:57:21 PM9/20/15
to walkmod, j...@jeshan.co
Hi, 

I have reproduced the error. It is due the maven-walkmod-plugin (1.0) is written to be executed in maven 2.2.1. Now, everyone uses walkmod 3. 
I have added integration tests into the project and it has been deployed under the version 1.1

Try again and let me know :)

Thank you for reporting this issue.

j...@jeshan.co

unread,
Sep 24, 2015, 4:53:09 PM9/24/15
to walkmod
The error has disappeared now. If there's anything more to discuss, I'll open a new thread.

No problem, Raquel; I'm glad I reported a "real" issue and didn't make you lose your time :)
Reply all
Reply to author
Forward
0 new messages