RE: What is the purpose of finalName? really?

2008-10-24 Thread Jörg Schaible
Hi Kent,

Kent Närling wrote:
 What IS really the purpose of finalName?

It is used to give the resulting artifact a different name locally in your 
target directory.

 Apparently, the install plugin ignores the artifact name when
 deploying it to the repository anyway??

Definitely. The filename is part of the Maven repository's meta data. Otherwise 
Maven would have no chance of pulling it from there again.
 
 We would like to have a version-less filename on the artifact in the
 repository (the version is in the path anyway), is this possible?

No. These are Maven structures. IIRC there is a possibility to inject a 
different implementation for the RepositoryManager (or whatever the interface 
is called), but I am not aware of any alternative implementation.
 
 If not, what is the real purpose of finalName if it is not
 used for the
 name of the artifact/file in the end anyway... ?

You may either use the local file directly for a hot deployment on your 
developer machine or you can use additional plugins to process the file further.

- Jörg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: What is the purpose of finalName? really?

2008-10-24 Thread Mark Struberg
--- Jörg Schaible [EMAIL PROTECTED] schrieb am Fr, 24.10.2008:
 You may either use the local file directly for a hot
 deployment on your developer machine or you can use
 additional plugins to process the file further.

To give Kent an example:

Consider a pom for building a WAR.
If you set 

finalNamemycontextpath/finalName

and use e.g. the jetty plugin to start your webserver in 1 go:

$ mvn package jetty:run

Then your finalName is being used for 'deployment' and you may access your 
webapp via

http://localhost:8080/mycontextpath/

which may then automatically be regression tested via Canoo, etc without having 
to type http://localhost:8080/mygroup_id.myartifact_id-2.5.3-SNAPSHOT/ and 
change the version every time.

got it?

LieGrü,
strub




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What is the purpose of finalName? really?

2008-10-24 Thread Mark Hobson
2008/10/24 Mark Struberg [EMAIL PROTECTED]:
 To give Kent an example:

 Consider a pom for building a WAR.
 If you set

 finalNamemycontextpath/finalName

 and use e.g. the jetty plugin to start your webserver in 1 go:

 $ mvn package jetty:run

 Then your finalName is being used for 'deployment' and you may access your 
 webapp via

 http://localhost:8080/mycontextpath/

BTW, the Jetty plugin uses the project's artifact id for its context path :)

 which may then automatically be regression tested via Canoo, etc without 
 having to type http://localhost:8080/mygroup_id.myartifact_id-2.5.3-SNAPSHOT/ 
 and change the version every time.

Mark

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What is the purpose of finalName? really?

2008-10-24 Thread Mark Struberg
Sorry Mark, should have mentioned that I usually use the following config

plugin
groupIdorg.mortbay.jetty/groupId
artifactIdjetty-maven-plugin/artifactId
 configuration  
 contextPath${build.finalName}/contextPath  
 scanIntervalSeconds10/scanIntervalSeconds  
 /configuration 
/plugin

;)

And thanks to bring up the feature with the artifactId. 
(I'm not sure if the groupId-artifactId-version behaviour I have in mind is 
from either a very old jetty plugin or from the tomcat or cargo plugin i've 
worked with. Anyway, it's good to know that this works now.)

LieGrue,
strub

--- Mark Hobson [EMAIL PROTECTED] schrieb am Fr, 24.10.2008:

 Von: Mark Hobson [EMAIL PROTECTED]
 Betreff: Re: What is the purpose of finalName? really?
 An: Maven Users List users@maven.apache.org
 Datum: Freitag, 24. Oktober 2008, 9:41
 2008/10/24 Mark Struberg [EMAIL PROTECTED]:
  To give Kent an example:
 
  Consider a pom for building a WAR.
  If you set
 
  finalNamemycontextpath/finalName
 
  and use e.g. the jetty plugin to start your webserver
 in 1 go:
 
  $ mvn package jetty:run
 
  Then your finalName is being used for
 'deployment' and you may access your webapp via
 
  http://localhost:8080/mycontextpath/
 
 BTW, the Jetty plugin uses the project's artifact id
 for its context path :)
 
  which may then automatically be regression tested via
 Canoo, etc without having to type
 http://localhost:8080/mygroup_id.myartifact_id-2.5.3-SNAPSHOT/
 and change the version every time.
 
 Mark




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What is the purpose of finalName? really?

2008-10-24 Thread Mark Hobson
2008/10/24 Mark Struberg [EMAIL PROTECTED]:
 Sorry Mark, should have mentioned that I usually use the following config

plugin
groupIdorg.mortbay.jetty/groupId
artifactIdjetty-maven-plugin/artifactId
 configuration
 contextPath${build.finalName}/contextPath
 scanIntervalSeconds10/scanIntervalSeconds
 /configuration
/plugin

 ;)

 And thanks to bring up the feature with the artifactId.
 (I'm not sure if the groupId-artifactId-version behaviour I have in mind is 
 from either a very old jetty plugin or from the tomcat or cargo plugin i've 
 worked with. Anyway, it's good to know that this works now.)

No worries, that was how the tomcat-maven-plugin worked in
1.0-alpha-1, but I've since changed the trunk to work in the same way
as Jetty (see MOJO-1181).  I got tired of guessing the context path :)

Cheers,

Mark

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What is the purpose of finalName? really?

2008-10-24 Thread Kent Närling
2008/10/24 Jörg Schaible [EMAIL PROTECTED]

 Hi Kent,

 Kent Närling wrote:
  What IS really the purpose of finalName?

 It is used to give the resulting artifact a different name locally in your
 target directory.


only locally? a bit limited usefulness, but ok if that is the defined
purpose...



  Apparently, the install plugin ignores the artifact name when
  deploying it to the repository anyway??

 Definitely. The filename is part of the Maven repository's meta data.
 Otherwise Maven would have no chance of pulling it from there again.


Well, technically speaking... it COULD have looked in the POM file to find
out which filename to look for... ;-)




  We would like to have a version-less filename on the artifact in the
  repository (the version is in the path anyway), is this possible?

 No. These are Maven structures. IIRC there is a possibility to inject a
 different implementation for the RepositoryManager (or whatever the
 interface is called), but I am not aware of any alternative implementation.


Ok, but I was kind of hoping that we could use the maven repository as a
product download repository as well, which would have been nice?
(anyone else see the logic in this?)

Essentially what we are looking for is to make the release process automated
and standarddized with maven, including making it available to our delivery
department.
ie. when doing a release:
- branching/taging it etc (done nicely by the relase plugin already)
- uploading it to the repository for dependencies etc (done by maven nicely
already)
- updating a project site with product information , release notes and
download links to the artifacts belonging to it (so they can grab it and
install it at a customer)
- sending a release mail to relevant parties with links to the updated
product site, possibly with release notes etc

What would be the recommended maven way to achieve this behaviour?



  If not, what is the real purpose of finalName if it is not
  used for the
  name of the artifact/file in the end anyway... ?

 You may either use the local file directly for a hot deployment on your
 developer machine or you can use additional plugins to process the file
 further.


Well, that is hardly a practical solution for non-developers ... ;-)





Re: What is the purpose of finalName? really?

2008-10-24 Thread Kent Närling

  You may either use the local file directly for a hot
  deployment on your developer machine or you can use
  additional plugins to process the file further.

 To give Kent an example:

 Consider a pom for building a WAR.
 If you set

 finalNamemycontextpath/finalName

 and use e.g. the jetty plugin to start your webserver in 1 go:

 $ mvn package jetty:run

 Then your finalName is being used for 'deployment' and you may access your
 webapp via

 http://localhost:8080/mycontextpath/


Well, this is all very nice... but not so practical for  creating a proper
context for a production environment?

Also, to make things more annoying, tomcat has a tendency to ignore symlink
names and picking the actual filename (pointed to by the symlink) as context
ANYWAY!?!

It is possible to work around this, but it seems it gets quite messy... so
our best solution so far is to make sure that the actual filename matches
the desired context name...


Re: What is the purpose of finalName? really?

2008-10-24 Thread Wendy Smoak
On Fri, Oct 24, 2008 at 1:56 PM, Kent Närling [EMAIL PROTECTED] wrote:

 Ok, but I was kind of hoping that we could use the maven repository as a
 product download repository as well, which would have been nice?
 (anyone else see the logic in this?)
...
 - updating a project site with product information , release notes and
 download links to the artifacts belonging to it (so they can grab it and
 install it at a customer)

For this, I would create an assembly (zip or .tar.gz distribution)
with the artifacts and documentation.  The assembly is still going to
have the version number in the filename when it gets deployed to the
repository, but I bet you can find a way to remove the version number
in the files *inside* the assembly.

Another idea to get a version-less filename without duplicating the
file:  use a symlink on the repository server.  So you might have
   repo.mycompany.com/maven2/com/mycompany/project/1.0/project-1.0.war
and
  repo.mycompany.com/dist/project.war
which is just a link to the original.  The link would have to be
updated for each release.

Or you could get even fancier with some code that served up the latest
version based on the repository metadata when it got a request for
'project.war'.  (Actually this thread already prompted a feature
request for a repository manager to allow browsing to
groupId/artifactId/[latest|release] based on the metadata.)

HTH,
-- 
Wendy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What is the purpose of finalName? really?

2008-10-23 Thread Stephen Connolly
For us we use it to ensure that the war file in target is always the same,
so that other scripts we have can pick it up irrespective of the version.

If you are pulling the file out of the repo, you can always specify the name
to pull it out of the repo as

2008/10/23 Kent Närling [EMAIL PROTECTED]

 What IS really the purpose of finalName?

 Apparently, the install plugin ignores the artifact name when deploying it
 to the repository anyway??

 We would like to have a version-less filename on the artifact in the
 repository (the version is in the path anyway), is this possible?

 If not, what is the real purpose of finalName if it is not used for the
 name of the artifact/file in the end anyway... ?

 Best regards
 Kent



Re: What is the purpose of finalName? really?

2008-10-23 Thread Kent Närling
Exactly what we wanted too!

But when I do this, the filename in the repository gets the default name
anyway!!

When running it locally for instance, I get the following message:
[INFO] Installing
C:\Workspaces\main\requestparser\requestparser-servlet\target\requestparser-servletxx.war
to C:\Documents and
Settings\kent\.m2\repository\com\seamless\ers\requestparser-servlet\1.0rc3-SNAPSHOT\requestparser-servlet-1.0rc3-SNAPSHOT.war

ie, it seems the install plugin simply ignores the finalName tag?!?

I mean, obviously it is nice to have a war file have a fixed name since it
usually dictates the default path to the context in the container and you
don't want the version in that?!?

Naturally it is possible to manually re-name it, but that kind of defeats
the purpose of a company repository if you have to re-name the files before
you use them?!?

2008/10/23 Stephen Connolly [EMAIL PROTECTED]

 For us we use it to ensure that the war file in target is always the same,
 so that other scripts we have can pick it up irrespective of the version.

 If you are pulling the file out of the repo, you can always specify the
 name
 to pull it out of the repo as

 2008/10/23 Kent Närling [EMAIL PROTECTED]

  What IS really the purpose of finalName?
 
  Apparently, the install plugin ignores the artifact name when deploying
 it
  to the repository anyway??
 
  We would like to have a version-less filename on the artifact in the
  repository (the version is in the path anyway), is this possible?
 
  If not, what is the real purpose of finalName if it is not used for the
  name of the artifact/file in the end anyway... ?
 
  Best regards
  Kent
 




-- 
Kent Närling

System Architect
SEAMLESS
Dalagatan 100, 8 tr, 113 43 Stockholm, Sweden
Phone: +46 8 5648 7800, fax: +46 8 5648 7823
Mobile: +46 70 836 9925
Mail: [EMAIL PROTECTED]
www.seamless.se


Re: What is the purpose of finalName? really?

2008-10-23 Thread Stephen Connolly
But why are you pulling them from your repo by hand.

When we need to get the artifact we copy it out of the local repo with
either the dependencies:copy goal in a little project, or with maven ant
tasks

Both of these allow us to control the name.

2008/10/23 Kent Närling [EMAIL PROTECTED]

 Exactly what we wanted too!

 But when I do this, the filename in the repository gets the default name
 anyway!!

 When running it locally for instance, I get the following message:
 [INFO] Installing

 C:\Workspaces\main\requestparser\requestparser-servlet\target\requestparser-servletxx.war
 to C:\Documents and

 Settings\kent\.m2\repository\com\seamless\ers\requestparser-servlet\1.0rc3-SNAPSHOT\requestparser-servlet-1.0rc3-SNAPSHOT.war

 ie, it seems the install plugin simply ignores the finalName tag?!?

 I mean, obviously it is nice to have a war file have a fixed name since it
 usually dictates the default path to the context in the container and you
 don't want the version in that?!?

 Naturally it is possible to manually re-name it, but that kind of defeats
 the purpose of a company repository if you have to re-name the files before
 you use them?!?

 2008/10/23 Stephen Connolly [EMAIL PROTECTED]

  For us we use it to ensure that the war file in target is always the
 same,
  so that other scripts we have can pick it up irrespective of the version.
 
  If you are pulling the file out of the repo, you can always specify the
  name
  to pull it out of the repo as
 
  2008/10/23 Kent Närling [EMAIL PROTECTED]
 
   What IS really the purpose of finalName?
  
   Apparently, the install plugin ignores the artifact name when deploying
  it
   to the repository anyway??
  
   We would like to have a version-less filename on the artifact in the
   repository (the version is in the path anyway), is this possible?
  
   If not, what is the real purpose of finalName if it is not used for
 the
   name of the artifact/file in the end anyway... ?
  
   Best regards
   Kent
  
 



 --
 Kent Närling

 System Architect
 SEAMLESS
 Dalagatan 100, 8 tr, 113 43 Stockholm, Sweden
 Phone: +46 8 5648 7800, fax: +46 8 5648 7823
 Mobile: +46 70 836 9925
 Mail: [EMAIL PROTECTED]
 www.seamless.se



Re: What is the purpose of finalName? really?

2008-10-23 Thread Kent Närling
Well, when our deployment team wants to install eg a new version of a
component, they just download it from the repo.
And they don't run maven, for them the repo is just a download server,
which is kind of natural, or?
Why keep another copy of all artifact versions etc?
Is this a very unusual way of using a maven repo?

On 23/10/2008, Stephen Connolly [EMAIL PROTECTED] wrote:
 But why are you pulling them from your repo by hand.

 When we need to get the artifact we copy it out of the local repo with
 either the dependencies:copy goal in a little project, or with maven ant
 tasks

 Both of these allow us to control the name.

 2008/10/23 Kent Närling [EMAIL PROTECTED]

 Exactly what we wanted too!

 But when I do this, the filename in the repository gets the default name
 anyway!!

 When running it locally for instance, I get the following message:
 [INFO] Installing

 C:\Workspaces\main\requestparser\requestparser-servlet\target\requestparser-servletxx.war
 to C:\Documents and

 Settings\kent\.m2\repository\com\seamless\ers\requestparser-servlet\1.0rc3-SNAPSHOT\requestparser-servlet-1.0rc3-SNAPSHOT.war

 ie, it seems the install plugin simply ignores the finalName tag?!?

 I mean, obviously it is nice to have a war file have a fixed name since it
 usually dictates the default path to the context in the container and you
 don't want the version in that?!?

 Naturally it is possible to manually re-name it, but that kind of defeats
 the purpose of a company repository if you have to re-name the files
 before
 you use them?!?

 2008/10/23 Stephen Connolly [EMAIL PROTECTED]

  For us we use it to ensure that the war file in target is always the
 same,
  so that other scripts we have can pick it up irrespective of the
  version.
 
  If you are pulling the file out of the repo, you can always specify the
  name
  to pull it out of the repo as
 
  2008/10/23 Kent Närling [EMAIL PROTECTED]
 
   What IS really the purpose of finalName?
  
   Apparently, the install plugin ignores the artifact name when
   deploying
  it
   to the repository anyway??
  
   We would like to have a version-less filename on the artifact in the
   repository (the version is in the path anyway), is this possible?
  
   If not, what is the real purpose of finalName if it is not used for
 the
   name of the artifact/file in the end anyway... ?
  
   Best regards
   Kent
  
 



 --
 Kent Närling

 System Architect
 SEAMLESS
 Dalagatan 100, 8 tr, 113 43 Stockholm, Sweden
 Phone: +46 8 5648 7800, fax: +46 8 5648 7823
 Mobile: +46 70 836 9925
 Mail: [EMAIL PROTECTED]
 www.seamless.se




-- 
Kent Närling

System Architect
SEAMLESS
Dalagatan 100, 8 tr, 113 43 Stockholm, Sweden
Phone: +46 8 5648 7800, fax: +46 8 5648 7823
Mobile: +46 70 836 9925
Mail: [EMAIL PROTECTED]
www.seamless.se

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]