In general, aside from the noted lack of documentation (once again happy to
provide support here) I think the basic approach is the right one.

Writing a Mojo with javadoc tags is definitely nice & straightforward.

What I am confused about is how my new plugin actually gets called. I
basically get the whole lifecycle/phase thing, I that on the money AFAIAC,
but what I can't quite get is connecting the new plugin with the project
that needs the code generated.

> The problem is that you need to add
> <goals><goal><id>bean</id></goal></goals> to the plugin 
> configuration to tell Maven to register the goal with the phase.
> 

So here are you talking about the plugin or the project that uses the
plugin?

Assuming the later, I did this:

And got this:

[INFO] intermedi8-protege-plugin: using locally installed snapshot
FATAL ERROR: Error executing Maven for a project
org.apache.maven.reactor.ReactorException: Error executing project within
the reactor
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:144)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:217)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:303)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:243)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:416)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:363)
Caused by: org.apache.maven.lifecycle.LifecycleExecutionException: A goal
'protege:bean' was declared in pom.xml, but does not exist

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.processPluginPhases(Defa
ultLifecycleExecutor.java:293)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.processPluginConfigurati
on(DefaultLifecycleExecutor.java:240)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.processGoals(DefaultLife
cycleExecutor.java:152)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycle
Executor.java:94)
        at
org.apache.maven.DefaultMaven.processProject(DefaultMaven.java:222)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:136)
        ... 9 more

Very happy to keep plugigng away to get this resolved

Matthew


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to