Search code examples
mavenglassfishmaven-2glassfish-3glassfish-4

NoPluginFoundForPrefixException when trying to run glassfish


In order to contribute to the glassfish project, I download the entire trunk workspace from the repository https://svn.java.net/svn/glassfish~svn/trunk/main to my local machine, after the download I followed all the instructions in this link (https://wikis.oracle.com/display/GlassFish/DevelopmentInstructions) to build and run the project, I could build the modules successfully by using the command "mvn install", but when I try to run any module with the "mvn -e gf:run" command it throws the following exception:

[ERROR] No plugin found for prefix 'gf' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\W7\.m2\repository), maven-central (http://repo1.maven.org/maven2/)] -> [Help 1]
org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'gf' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\W7\.m2\repository), maven-central (http://repo1.maven.org/maven2/)]
        at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve(DefaultPluginPrefixResolver.java:93)
        at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginForPrefix(MojoDescriptorCreator.java:260)
        at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:220)
        at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:103)
        at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:83)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:85)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
        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:483)
        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)

Does anyone knows how to fix it?


Solution

  • Please read http://maven.apache.org/settings.html#Plugin_Groups . The other option is to use the fully qualified name, i.e mvn {groupId}:{artifactId}:{version}:{goal}. I hope you can discover the values for this, {goal} is at least run.