dev@glassfish.java.net

Re: Develop-test-debug cycle in v3

From: Jane Young <jane.young_at_oracle.com>
Date: Thu, 13 May 2010 10:00:12 -0700

Hi Yamini,

Yamini K B wrote:
> Hi,
>
> I'm new to v3 and am just getting started with it. I'm able to do the
> builds successfully but I have some questions:

Welcome to GlassFish 3.1!
>
> 1. Re-build (i.e svn update; mvn -U clean install) of complete sources
> takes very long at times (nearly an hour on on my laptop running
> Ubuntu) How can I speed this up?
The "-U" option will check for the updated releases and SNAPSHOTs
artifacts on the remote repositories. This will take a long time,
since the GlassFish references 8 remote repositories (we use Nexus as
the proxy server so there is one reference point in the pom) and maven
communicates to these repositories to search for the updated artifacts.
If you have one successful build which means your local Maven repository
(by default it's <uesr-home>/.m2/repository) is populated with the
artifacts referenced in GlassFish v3 workspace, then you don't need to
use "-U".
Also, once you have a successful build, you can build selected modules
in the v3 directory by using the "-pl or --projects" option.

e.g.
mvn -Dmaven.repo.local=/export/GlassFish/Apr20/repository -pl
admin,common install
> 2. When ever I re-build, I unzip the target glassfish.zip afresh. In
> v2 recompiling wasn't trouble at all since build automatically
> publishes the jars into the lib folder. Recompiling 1-2 modules and
> copying the jars into modules folder is ok, but this manual copying is
> not possible when updating and building at the top most level. Is
> there a better way to do this?
>

 From the GlassFish installation in "modules" folder, you can create
symlinks to the maven artifact in the target folder.

The other option is to modify the pom file and change the default target
directory to the GlassFish module directory but I don't advice doing
this since poms are part of the build and under source control, so it
can be accidentally committed.

Thanks,
Jane
> I've read the developer instructions, FAQs etc. but any other tips and
> tricks for quick develop-test-debug cycle would be appreciated!
>
> Thanks,
> -Yamini
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>