dev@glassfish.java.net

Re: V3 redeploy does not work

From: Kedar Mhaswade <Kedar.Mhaswade_at_Sun.COM>
Date: Fri, 14 Mar 2008 17:37:22 -0700

vince kraemer wrote:
> Kedar Mhaswade wrote:
>> Let me clarify. I am assuming that when you as a user, are deploying and
>> redeploying an "archive" foo.war", you know the path to foo.war. Thus,
>> the command sequence is:
>> - asadmin deploy /archives/foo.war
>> - asadmin deploy /archives/foo.war => results in foo.war's redeployment.
>>
>> The exact same logic applies to directory deployment (except that we
>> have a separate command named "deploydir"):
>> - asadmin deploydir /Projects/NB/Foo/web => creates a web-app named "web"
>> - asadmin deploydir /Projects/NB/Foo/web => results in "web"'s
>> redeployment.
>>
>> So, the consistency is you know precisely what you are (re)deploying
>> -- the
>> path to the archive or path to the folder where app's contents are.
>>
>> This was in V2.
>
> Yes. I agree. That is the way it was.
>
> asadmin deploy /archives/foo.war also creates a web-app named foo....
>
>>
>> I understand that we want to provide deployment based on a "name"
>> rather than
>> a path, but that is foiled by the following:
>>
>> It seems, we changed two things in V3. In V3, there is no deploydir
>> command and hence, there is no way for the server to know what to
>> do on simple : "asadmin deploy foo", whether it is a directory deployment
>> of a directory called "foo" or directory redeployment of an application
>> which was deployed as a name "foo" (since, server presumably knows its
>> location).
>
> That is a great catch. So, now we just need to figure out a way to make
> it easy for the user to disambiguate their intent, without requiring
> that they reenter a full path every time they want to redeploy something.

Hmmm. But I am unsure how this happens with just the name alone.

e.g.
- asadmin deploy --name bar foo.war
- asadmin redeploy bar

will not execute because server does not know what to redeploy!

Perhaps you're thinking only in terms of directory deployment.

In order to best disambiguate, for deployment or redeployment purpose, provide
the correct data -- either the war file or the folder where it resides. It might
be a little clumsy that you have to provide the path to the directory, but it is
very clear.