dev@glassfish.java.net

[gf-dev] Problem building and running glassfish

From: Leonardo Jines <leonardohjines_at_gmail.com>
Date: Wed, 31 Dec 2014 13:19:38 -0200

​​
Hi,

I don't know if this is the right e-mail for this sort of questions, if it
doesn't please tell me the right one so I can contact the right person.

I'm a Java Developer and I intent to contribute to the glassfish project,
but I'm having some problems, 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)

I also tried to use the fully qualified name "mvn -e
org.glassfish.build:maven-glassfish-plugin:10.0-alpha-4:run", and then
I got a different exception:

    [ERROR] Failed to execute goal
org.glassfish.build:maven-glassfish-plugin:10.0-alpha-4:run
(default-cli) on project glassfish-main-aggregator: Either
<distribution> or <distributions> is required -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal org.glassfish.build:maven-glassfish-plugin:10.0-alpha-4:run
(default-cli) on project glassfish-main-aggregator: Either
<distribution> or <distributions> is required
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
            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:120)
            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)
    Caused by: org.apache.maven.plugin.MojoExecutionException: Either
<distribution> or <distributions> is required
            at com.sun.enterprise.build.RunMojo.execute(RunMojo.java:163)
            at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)

I searched and asked in some forums but I couldn't find anything
helpful, I'll be very grateful if you can help me with this.

I'm waiting for your return and I really look forward to contribute to
the glassfish project.

Best Regasds,

Leonardi Jines