dev@glassfish.java.net

Re: tweak to full build instructions

From: Jane Young <jane.young_at_oracle.com>
Date: Tue, 28 Sep 2010 12:26:16 -0700

  If the change is impacting other modules, then do a "clean". The
developer should know if their change is impacting other modules. But
if the change is isolated, are we suggesting to do a "clean" in every
build ? The regression I've seen lately is if I didn't change anything
in the workspace and recompile, running QL fails.

I added this section in
http://wikis.sun.com/display/glassfish/V3FullBuildInstructions:

You can use the "clean" target if you want maven to delete the modules'
target directories and force maven to build all the modules. Without the
clean target, maven will build the modules that have been modified.

*NOTE* if your code change impacts other modules, it is recommended that
you do a "clean".





On 9/28/10 11:19 AM, Snjezana Sevo-Zenzerovic wrote:
> I think that the issue here is that running 'mvn install' for a
> particular module will not also rebuild any modules that particular
> module depends on which changed since the last build. Unless I am
> completely off target, maven will simply use last available snapshot
> artifact from local repository, correct?
>
> Jane Young wrote:
>> There are some modules that require a clean (e.g. packager,
>> distributions, some modules of admin-console) and that's why the
>> poms in these modules have explicitly defined the maven-clean-plugin
>> so clean is automatically invoked during initialize phase.
>>
>> IMO, the module that is causing rebuild not to work will need to
>> explicitly define the maven-clean-plugin. Invoking "mvn install"
>> should allow developer to rebuild without removing all the module's
>> target directory. This used to work. I also noticed this
>> regression that you pointed out when running QL after rebuilding the
>> workspace with "mvn install"
>>
>> Do you know which module(s) that mandates a clean?
>>
>>
>> On 9/28/10 8:03 AM, Sanjeeb Sahoo wrote:
>>> I do mvn clean && mvn install. That way, if install failed for
>>> whatever reason, I can just rerun mvn install without having clean
>>> all the stuff that were built successfully.
>>>
>>> On Tuesday 28 September 2010 08:00 PM, Bobby Bissett wrote:
>>>> Hi all,
>>>>
>>>> Does anyone care if I change the "Re-build from existing workspace"
>>>> instructions [0] to include "mvn clean install" instead of just
>>>> "mvn install" to rebuild? Building without a clean first does not
>>>> guarantee a working server. The page has this text: "Without the
>>>> clean target, maven will build the modules that have been
>>>> modified." But I don't believe it does a clean build of those
>>>> modules, and I don't think it rebuilds the dependent modules as well.
>>>>
>>>> I've seen two otherwise identical workspaces (same revision, no
>>>> local changes) have very different behaviors when one was built
>>>> with "clean install" and the other was built with just "install."
>>>> Or is this a bug in the build process?
>>>>
>>>> If developers really know what they're doing, e.g. have made a
>>>> change that doesn't include other dependencies, then s/he ought to
>>>> know when it's ok to just do a build without a clean.
>>>>
>>>> [0] http://wikis.sun.com/display/glassfish/V3FullBuildInstructions
>>>>
>>>> Thanks,
>>>> Bobby
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>