Having the version number in filenames can be problematic in some environments. For instance, when doing local development it is nice to strip the version number from the war/ear name so that you don't end up with two deployments if the version number changes.

Some production environments have similar issues. For example, some webapps are deployed expanded. And the new version is simply dumped in over the old version. Requesting to have files deleted during a deployment in these schemes is overhead, and error-prone. I think that is a lousy way to setup a production deployment, but I have had to live with this kind of thing on more than one occasion in my professional career. I am sure I'm not the only one.

I think the OP just wants to be able to build his war in such a way that the jars that maven puts into the WEB-INF/lib directory DO NOT have the version number in the filenames. Does anyone know how to do that?

Off the top of my head, this might work:
* Set the scope of the dependencies to "provided" so that Maven doesn't copy them to WEB-INF/lib * Use the maven-dependency-plugin to copy the jars, stripping the version number in the process However, that adds a lot of work to configure all the scopes and setup the copy for each dependency. Maybe there is a better way.

-Max

Mike Perham wrote:
Can you guarantee that every jar in the maven repo has a manifest with
its version in it?  I certainly don't believe so.  Not every jar in the
repo was even built with maven.

We recently realized we were packaging two versions of wstx-asl, because
the groupIds changed and so maven considered them different artifacts.
Now if you renamed the jar without the version, you won't know (a) you
have a problem, (b) which version was chosen without some deep digging.
Being able to see your resolved deps and their versions at a glance is a
good thing.

-----Original Message-----
From: Ian Springer [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 25, 2006 4:40 PM
To: Maven Users List
Subject: RE: deploying jars without version information

Isn't that what MANIFEST.MF files are for?
| -----Original Message-----
| From: Mike Perham [mailto:[EMAIL PROTECTED] | Sent: Tuesday, July 25, 2006 2:23 PM
| To: Maven Users List
| Subject: RE: deploying jars without version information
| | Why? Removing version info is very dangerous. You then have no idea | which version was actually selected by Maven by looking in | the artifact
| after the fact.
| | -----Original Message----- | From: LaCasse, John [mailto:[EMAIL PROTECTED] | Sent: Tuesday, July 25, 2006 12:57 PM
| To: Maven Users List
| Subject: RE: deploying jars without version information
| | I'm talking about the second case; in the | target\webapp\WEB-INF\lib. All
| compile and runtime scoped dependant jars that get put into this
| location; I would like the war plugin not to include the | version info on
| all the jars it includes in this location.
| | -----Original Message----- | From: Alexandre Poitras [mailto:[EMAIL PROTECTED] | Sent: Tuesday, July 25, 2006 10:53 AM
| To: Maven Users List
| Subject: Re: deploying jars without version information
| | What do you means by deploting? Deploying on a maven repository or on
| a application server ? In the first case, the answer is no because
| Maven needs those metadatas to be able to manage dependencies. In the
| other case, yes it's possible just change the name in your war/jar
| plugin configuration section.
| | On 7/25/06, LaCasse, John <[EMAIL PROTECTED]> wrote:
| > Hi,
| >
| >
| >
| > Does anybody know if you can have Maven deploy the jars | that end up in
| > webapp/WEB-INF/lib without the version information in the filename?
| >
| >
| >
| > Thanks,
| >
| > Jpl
| >
| >
| >
| | ---------------------------------------------------------------------
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
| | | | | ---------------------------------------------------------------------
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
| | | ---------------------------------------------------------------------
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
| |
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


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

Reply via email to