dev@glassfish.java.net

Re: V3 How to get gf:run to work

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Mon, 14 May 2007 10:25:30 -0700

Stefan Arentz wrote:
> On May 11, 2007, at 7:03 PM, Stefan Arentz wrote:
>
>> I'm hacking on a new deployer for V3. My project is completely
>> standalone, I build it outside of the Glassfish build root.
>> Packaging works fine, I end up with a correct HK2 module jar with a
>> good looking manifest. But then when I try to run Glassfish through
>> 'mvn gf:run' I get the following error:
>>
>> [INFO] Scanning for projects...
>> [INFO] Searching repository for plugin with prefix: 'gf'.
>> [INFO]
>> ----------------------------------------------------------------------
>> --
>> [ERROR] BUILD ERROR
>> [INFO]
>> ----------------------------------------------------------------------
>> --
>> [INFO] The plugin 'org.apache.maven.plugins:maven-gf-plugin' does
>> not exist or no valid version could be found
>>
>> I'm not a Maven guru and I'm not sure what to do now :-)
>
> Little update, I added:
>
> <plugin>
> <groupId>com.sun.enterprise.glassfish</groupId>
> <artifactId>maven-glassfish-plugin</artifactId>
> <extensions>true</extensions>
> </plugin>
>
> To my project's pom and it can now find the maven-glassfish-plugin.
> However, when I try to run:
>
> java.lang.NullPointerException
> at com.sun.enterprise.build.RunMojo.execute(RunMojo.java:96)

You are missing the following <configuration>. I fixed the code so that
it will be reported as an error, not NPE.

                     <distribution>
                         <groupId>com.sun.enterprise.glassfish</groupId>
                         <artifactId>pe</artifactId>
                         <version>10.0-SNAPSHOT</version>
                     </distribution>

I need to post the documentation for this plugin, and I should probably
write a tutorial to how to develop a module. Stay tuned.


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com