You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Shan Syed <sh...@gmail.com> on 2010/07/20 22:26:54 UTC

applying finalName of dependencies when project is packaging

I know there is already a lot of discussion around the topic of artifacts
not using "finalName" when they are installed into a repository (remote or
local), but is there a way to enforce that the dependencies, when packaged
into the using project, are packaged with their finalNames?

example:
Project A (a POM that ZIPs its WAR dependencies) uses B, C, D, etc.. as
dependencies (all WARs)

B's finalName is "Bee", C's is "Cee", etc...
by default, when A packages, it creates a ZIP of all its dependencies (using
an assembly descriptor), with their fully qualified repository names, as
expected

is there an easy way to ask maven to use the finalNames for the dependencies
instead?

S

Re: applying finalName of dependencies when project is packaging

Posted by Kalle Korhonen <ka...@gmail.com>.
Just a suggestion, but sounds to me the pom that drives zipping up the
artifacts should also be in control of the final names rather than the
individual wars. What would happen if two wars specified the same
final names? If you cannot dictate a convention for the artifact names
I don't see why you'd be able to do it any better for the final names.

Kalle


On Tue, Jul 20, 2010 at 2:05 PM, Shan Syed <sh...@gmail.com> wrote:
> Hi,
>
> We have a very large set of WAR projects (web services, web applications,
> static websites, etc) as part of a product offering.
>
> Various versions and combinations of these are delivered to clients, but
> there is no immediate understand of who gets what WARs, what versions, etc.
>
> So I am using maven to manage this: I have a POM for each "delivery", which
> just has the dependencies listed, and an assembly descriptor that ZIPs them
> all conveniently, for deployment/DL to various environments.
>
> Each developer has specified a finalName for their WAR, but there is no
> convention, some require just the version info lopped off, some need a
> totally different name from their artifact, etc.. there is no reliable way
> to "calculate" the desired finalName, for various business reasons.
>
> So in my ZIPs for each set of packaged goods, I would like the WARs to have
> their finalNames, as opposed to their fully qualified maven names.
>
> Shan
>
>
> On Tue, Jul 20, 2010 at 4:54 PM, Kalle Korhonen
> <ka...@gmail.com>wrote:
>
>> Always a good idea to state *why* you might want to do this so people
>> can provide alternatives. AFAIK the answer is no to your question, but
>> if, for example, you just want to use the artifact name and strip out
>> the version info from the filename, you can use outputFileNameMapping
>> (see http://maven.apache.org/plugins/maven-assembly-plugin/component.html
>> ).
>>
>> Kalle
>>
>>
>> On Tue, Jul 20, 2010 at 1:26 PM, Shan Syed <sh...@gmail.com> wrote:
>> > I know there is already a lot of discussion around the topic of artifacts
>> > not using "finalName" when they are installed into a repository (remote
>> or
>> > local), but is there a way to enforce that the dependencies, when
>> packaged
>> > into the using project, are packaged with their finalNames?
>> >
>> > example:
>> > Project A (a POM that ZIPs its WAR dependencies) uses B, C, D, etc.. as
>> > dependencies (all WARs)
>> >
>> > B's finalName is "Bee", C's is "Cee", etc...
>> > by default, when A packages, it creates a ZIP of all its dependencies
>> (using
>> > an assembly descriptor), with their fully qualified repository names, as
>> > expected
>> >
>> > is there an easy way to ask maven to use the finalNames for the
>> dependencies
>> > instead?
>> >
>> > S
>> >
>>
>> ---------------------------------------------------------------------
>> 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: applying finalName of dependencies when project is packaging

Posted by Shan Syed <sh...@gmail.com>.
Hi,

We have a very large set of WAR projects (web services, web applications,
static websites, etc) as part of a product offering.

Various versions and combinations of these are delivered to clients, but
there is no immediate understand of who gets what WARs, what versions, etc.

So I am using maven to manage this: I have a POM for each "delivery", which
just has the dependencies listed, and an assembly descriptor that ZIPs them
all conveniently, for deployment/DL to various environments.

Each developer has specified a finalName for their WAR, but there is no
convention, some require just the version info lopped off, some need a
totally different name from their artifact, etc.. there is no reliable way
to "calculate" the desired finalName, for various business reasons.

So in my ZIPs for each set of packaged goods, I would like the WARs to have
their finalNames, as opposed to their fully qualified maven names.

Shan


On Tue, Jul 20, 2010 at 4:54 PM, Kalle Korhonen
<ka...@gmail.com>wrote:

> Always a good idea to state *why* you might want to do this so people
> can provide alternatives. AFAIK the answer is no to your question, but
> if, for example, you just want to use the artifact name and strip out
> the version info from the filename, you can use outputFileNameMapping
> (see http://maven.apache.org/plugins/maven-assembly-plugin/component.html
> ).
>
> Kalle
>
>
> On Tue, Jul 20, 2010 at 1:26 PM, Shan Syed <sh...@gmail.com> wrote:
> > I know there is already a lot of discussion around the topic of artifacts
> > not using "finalName" when they are installed into a repository (remote
> or
> > local), but is there a way to enforce that the dependencies, when
> packaged
> > into the using project, are packaged with their finalNames?
> >
> > example:
> > Project A (a POM that ZIPs its WAR dependencies) uses B, C, D, etc.. as
> > dependencies (all WARs)
> >
> > B's finalName is "Bee", C's is "Cee", etc...
> > by default, when A packages, it creates a ZIP of all its dependencies
> (using
> > an assembly descriptor), with their fully qualified repository names, as
> > expected
> >
> > is there an easy way to ask maven to use the finalNames for the
> dependencies
> > instead?
> >
> > S
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: applying finalName of dependencies when project is packaging

Posted by Kalle Korhonen <ka...@gmail.com>.
Always a good idea to state *why* you might want to do this so people
can provide alternatives. AFAIK the answer is no to your question, but
if, for example, you just want to use the artifact name and strip out
the version info from the filename, you can use outputFileNameMapping
(see http://maven.apache.org/plugins/maven-assembly-plugin/component.html).

Kalle


On Tue, Jul 20, 2010 at 1:26 PM, Shan Syed <sh...@gmail.com> wrote:
> I know there is already a lot of discussion around the topic of artifacts
> not using "finalName" when they are installed into a repository (remote or
> local), but is there a way to enforce that the dependencies, when packaged
> into the using project, are packaged with their finalNames?
>
> example:
> Project A (a POM that ZIPs its WAR dependencies) uses B, C, D, etc.. as
> dependencies (all WARs)
>
> B's finalName is "Bee", C's is "Cee", etc...
> by default, when A packages, it creates a ZIP of all its dependencies (using
> an assembly descriptor), with their fully qualified repository names, as
> expected
>
> is there an easy way to ask maven to use the finalNames for the dependencies
> instead?
>
> S
>

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