You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jamie Bisotti <jb...@gmail.com> on 2005/08/23 18:18:32 UTC

Why is the version not appended to target/blah.war?

When I run 'maven war' on my project, blah, I get target/blah.war. 
However, when I run 'maven war:install', I get blah-1.0.war in my
local repository.  Is this difference intentional, or is it a bug?
-- 
Jamie Bisotti

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is the version not appended to target/blah.war?

Posted by Brett Porter <br...@gmail.com>.
It's simply ease of use to be able to drop them into a container as
Craig suggests. Far more people would complain about a version in the
target directory and having to setup a context file :)

So are you saying it is un-maven-like to be user friendly? :)

Basically the rule is you can do whatever you want in 'target' and you
can do whatever you want when you pull something out of the repo, but
in the repo the filename needs to follow the convention. In this vein
there was no problem leaving the version off in target/ for
convenience (though you can add it back by changing the property as
suggested).

Hope that helps.

Cheers,
Brett

On 8/24/05, Jamie Bisotti <jb...@gmail.com> wrote:
> On 8/23/05, Craig S. Cottingham <cr...@cottingham.net> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > On Aug 23, 2005, at 11:41, Jamie Bisotti wrote:
> >
> > > Thanks for your response.  Sorry, I didn't ask my question clearly
> > > enough.  I understand what it is doing and that it is doing things per
> > > the documentation.  I guess my real question is why does
> > > 'maven.war.final.name' not default to
> > > ${pom.artifactId}-${pom.version}.war?  This seems to go against "the
> > > Maven way".
> > >
> > > As I'm typing this, it seems like maybe this came up on the list
> > > recently; however, a quick search didn't find it.  If so, and this has
> > > already been addressed, a pointer to the thread would be greatly
> > > appreciated.
> >
> > I don't remember this coming up recently, but I'm pretty sure it's come
> > up before. I know the answer to this, which means that I got the answer
> > from someone smarter than me. :-)
> >
> > Some servlet containers (like Tomcat 5, maybe?) deploy a webapp to a
> > URL that's a function of the warfile name. (For instance, "myapp.war"
> > might be deployed to "http://www.example.com/myapp".) If the warfile
> > name changes, the URL changes -- and that's probably undesired
> > behavior.
> >
> > - --
> > Craig S. Cottingham
> > craig@cottingham.net
> > OpenPGP key available from:
> > http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7977F79C
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.2.4 (Darwin)
> >
> > iD8DBQFDC1YrEJLQ3Hl395wRAkRdAJ4x9zlR3SNHO8x9g4UqB3lccWJFGwCeP+bQ
> > YfwMjiJsOmZY8Gi1/esj268=
> > =MYc6
> > -----END PGP SIGNATURE-----
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> Craig,
> 
> Thanks for the quick response.  The behavior you describe is the
> default behavior, for Tomcat at least, but can be modified by
> supplying a context.xml which tells the container what context to
> deploy the webapp to.  I'm assuming other servlet containers have
> similar functionality.  So, my question still stands: Why does
> 'maven.war.final.name' not default to
> ${pom.artifactId}-${pom.version}.war?  This is highly un-Maven-like.
> Any committers care to comment?
> --
> Jamie Bisotti
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is the version not appended to target/blah.war?

Posted by Jamie Bisotti <jb...@gmail.com>.
On 8/23/05, Craig S. Cottingham <cr...@cottingham.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Aug 23, 2005, at 11:41, Jamie Bisotti wrote:
> 
> > Thanks for your response.  Sorry, I didn't ask my question clearly
> > enough.  I understand what it is doing and that it is doing things per
> > the documentation.  I guess my real question is why does
> > 'maven.war.final.name' not default to
> > ${pom.artifactId}-${pom.version}.war?  This seems to go against "the
> > Maven way".
> >
> > As I'm typing this, it seems like maybe this came up on the list
> > recently; however, a quick search didn't find it.  If so, and this has
> > already been addressed, a pointer to the thread would be greatly
> > appreciated.
> 
> I don't remember this coming up recently, but I'm pretty sure it's come
> up before. I know the answer to this, which means that I got the answer
> from someone smarter than me. :-)
> 
> Some servlet containers (like Tomcat 5, maybe?) deploy a webapp to a
> URL that's a function of the warfile name. (For instance, "myapp.war"
> might be deployed to "http://www.example.com/myapp".) If the warfile
> name changes, the URL changes -- and that's probably undesired
> behavior.
> 
> - --
> Craig S. Cottingham
> craig@cottingham.net
> OpenPGP key available from:
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7977F79C
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (Darwin)
> 
> iD8DBQFDC1YrEJLQ3Hl395wRAkRdAJ4x9zlR3SNHO8x9g4UqB3lccWJFGwCeP+bQ
> YfwMjiJsOmZY8Gi1/esj268=
> =MYc6
> -----END PGP SIGNATURE-----
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
Craig,

Thanks for the quick response.  The behavior you describe is the
default behavior, for Tomcat at least, but can be modified by
supplying a context.xml which tells the container what context to
deploy the webapp to.  I'm assuming other servlet containers have
similar functionality.  So, my question still stands: Why does
'maven.war.final.name' not default to
${pom.artifactId}-${pom.version}.war?  This is highly un-Maven-like. 
Any committers care to comment?
-- 
Jamie Bisotti

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is the version not appended to target/blah.war?

Posted by "Craig S. Cottingham" <cr...@cottingham.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Aug 23, 2005, at 11:41, Jamie Bisotti wrote:

> Thanks for your response.  Sorry, I didn't ask my question clearly
> enough.  I understand what it is doing and that it is doing things per
> the documentation.  I guess my real question is why does
> 'maven.war.final.name' not default to
> ${pom.artifactId}-${pom.version}.war?  This seems to go against "the
> Maven way".
>
> As I'm typing this, it seems like maybe this came up on the list
> recently; however, a quick search didn't find it.  If so, and this has
> already been addressed, a pointer to the thread would be greatly
> appreciated.

I don't remember this coming up recently, but I'm pretty sure it's come 
up before. I know the answer to this, which means that I got the answer 
from someone smarter than me. :-)

Some servlet containers (like Tomcat 5, maybe?) deploy a webapp to a 
URL that's a function of the warfile name. (For instance, "myapp.war" 
might be deployed to "http://www.example.com/myapp".) If the warfile 
name changes, the URL changes -- and that's probably undesired 
behavior.

- --
Craig S. Cottingham
craig@cottingham.net
OpenPGP key available from:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7977F79C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFDC1YrEJLQ3Hl395wRAkRdAJ4x9zlR3SNHO8x9g4UqB3lccWJFGwCeP+bQ
YfwMjiJsOmZY8Gi1/esj268=
=MYc6
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is the version not appended to target/blah.war?

Posted by Jamie Bisotti <jb...@gmail.com>.
On 8/23/05, dan tran <da...@gmail.com> wrote:
> Jamie,
> 
> according maven-war-plugin doco,
> 
> maven.war.final.name is default to ${pom.artifactId}.war
> 
> that is why maven war:war would produce, however when install
> on repos, it must comform to maven filename convention.
> 
> Overide maven.war.final.name if you like
> 
> 
> -D
> 
> On 8/23/05, Jamie Bisotti <jb...@gmail.com> wrote:
> > When I run 'maven war' on my project, blah, I get target/blah.war.
> > However, when I run 'maven war:install', I get blah-1.0.war in my
> > local repository.  Is this difference intentional, or is it a bug?
> > --
> > Jamie Bisotti
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 

Dan,

Thanks for your response.  Sorry, I didn't ask my question clearly
enough.  I understand what it is doing and that it is doing things per
the documentation.  I guess my real question is why does
'maven.war.final.name' not default to
${pom.artifactId}-${pom.version}.war?  This seems to go against "the
Maven way".

As I'm typing this, it seems like maybe this came up on the list
recently; however, a quick search didn't find it.  If so, and this has
already been addressed, a pointer to the thread would be greatly
appreciated.

Thanks!
-- 
Jamie Bisotti

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why is the version not appended to target/blah.war?

Posted by dan tran <da...@gmail.com>.
Jamie,

according maven-war-plugin doco,

maven.war.final.name is default to ${pom.artifactId}.war

that is why maven war:war would produce, however when install
on repos, it must comform to maven filename convention.

Overide maven.war.final.name if you like


-D

On 8/23/05, Jamie Bisotti <jb...@gmail.com> wrote:
> When I run 'maven war' on my project, blah, I get target/blah.war.
> However, when I run 'maven war:install', I get blah-1.0.war in my
> local repository.  Is this difference intentional, or is it a bug?
> --
> Jamie Bisotti
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org