Gentlemen
I found a consistent bug with PluginManager not able to locate @goal/** *
artifactId=modello-maven-plugin
* @author <a href="mailto:[email protected]">Trygve Laugstøl</a>
* @version 1.5
* @threadSafe
*/
public abstract class AbstractModelloGeneratorMojo extends AbstractMojo notice
the lack of @goal .. because this is an abstract class which is expected to be
extend'ed by a concrete
the PluginManager backtraces classes to find who is extending AbstractMojo
and correctly identifies org.codehaus.modello.maven.AbstractModelloGeneratorMojo
org.apache.maven.plugin.MojoExecutionException: Error generating: No such
plugin: java
at
org.codehaus.modello.maven.AbstractModelloGeneratorMojo.doExecute(AbstractModelloGeneratorMojo.java:324)
abstract class AbstractModelloGeneratorMojo has no @goal .. pluginManager will
always throw MojoExecutionException
solution is to have the concrete class which contains annotated @goal extend
AbstractMojo
/*** Echos an object string to the output screen.
* @goal java
* @requiresProject false
@Mojo(name "java")
*/
public class ModelloJavaMojo extends AbstractMojo implements
org.codehaus.modello.core.ModelloCore
{ public void execute()
}
if I run mvn dependency:tree i can see the guice injector the
modello-maven-plugin is expecting
[DEBUG] org.codehaus.modello:modello-maven-plugin:maven-plugin:1.1
[DEBUG] com.google.inject:guice:jar:2.0:compile
maven-core implements guice as well
[DEBUG] org.apache.maven:maven-core:jar:3.0.2:compile
[DEBUG] org.sonatype.sisu:sisu-guice:jar:2.9.1:compile
the options seem to be
1)disable guice and replace with plexus..if you find a way please let me know
2)refactor all concrete classes which already implement @goal to extend
AbstractMojo so PluginManager will
find the Mojo which contains the expected goal from plugin.xml
Thoughts?
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung.
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est
interdite. Ce message sert à l'information seulement et n'aura pas n'importe
quel effet légalement obligatoire. Étant donné que les email peuvent facilement
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité
pour le contenu fourni.