maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MNGSITE-287) Maven plugin tutorial not working as expected?
Date Fri, 03 Jun 2016 19:23:59 GMT

    [ https://issues.apache.org/jira/browse/MNGSITE-287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15314639#comment-15314639
] 

Robert Scholte commented on MNGSITE-287:
----------------------------------------

I hope we can assume that developers who want to start with making a plugin are aware of the
[standard directory layout|https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html]

> Maven plugin tutorial not working as expected?
> ----------------------------------------------
>
>                 Key: MNGSITE-287
>                 URL: https://issues.apache.org/jira/browse/MNGSITE-287
>             Project: Maven Project Web Site
>          Issue Type: Question
>            Reporter: Utku Gultopu
>
> I am following the maven plugin [tutorial|https://maven.apache.org/guides/plugin/guide-java-plugin-development.html].
> I have created the the {{GreetingMojo}} class and the POM as described in the tutorial,
and run {{mvn install}} but I am getting the same error as indicated in [this|http://stackoverflow.com/questions/18999401/basic-maven-plugin-project-not-working-mojo-plugin-descriptors-not-generating]
question (also by the issue MNG-5346).
> [3.2.2 release notes|http://maven.apache.org/docs/3.2.2/release-notes.html] state that
the issue is fixed. I have the 3.3.9 version of Maven. However, I still get:
> {{org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException: No mojo definitions
were found for plugin: sample.plugin:hello-maven-plugin}}
> The full stack trace is:
> {code}
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor
(default-descriptor) on project hello-maven-plugin: Error extracting plugin descriptor: 'No
mojo definitions were found for plugin: sample.plugin:hello-maven-plugin.' -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor
(default-descriptor) on project hello-maven-plugin: Error extracting plugin descriptor: 'No
mojo definitions were found for plugin: sample.plugin:hello-maven-plugin.'
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
>     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
>     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
>     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
>     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
>     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
>     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
>     at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
>     at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
>     at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:498)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error extracting plugin descriptor:
'No mojo definitions were found for plugin: sample.plugin:hello-maven-plugin.'
>     at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:245)
>     at org.apache.maven.plugin.plugin.DescriptorGeneratorMojo.execute(DescriptorGeneratorMojo.java:92)
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
>     ... 20 more
> Caused by: org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException: No mojo
definitions were found for plugin: sample.plugin:hello-maven-plugin.
>     at org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:126)
>     at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:233)
>     ... 23 more
> {code}
> Am I missing something here?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message