You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "C. Benson Manica" <cb...@gmail.com> on 2010/08/02 16:48:31 UTC

Change name of assembled artifacts

We have a project "foo" that builds several assemblies - let's say one of
them is named "bar".  The resulting artifacts get named foo-VERSION-bar.
The problem is that the tool that will be processing these artifacts really
wants them to be named foo-bar-VERSION.  Is there a way to coax the assembly
plugin (or something else) to get the artifacts named like this?  There are
no Maven projects that depend on these assembled artifacts so the renaming
isn't problematic from that perspective.  Since we need an immediate
solution I am going to simply use the exec plugin to "mv" the artifacts as
need be, but I'm hoping to be able to replace that with a less ugly
solution.

-- 
C. Benson Manica
cbmanica@gmail.com

Re: Change name of assembled artifacts

Posted by "a.geo" <aq...@gmail.com>.
or using a weird maven-ant task... :D
but, next, you will need about three coffee cups...

2010/8/2 Wendy Smoak <ws...@gmail.com>

> On Mon, Aug 2, 2010 at 11:26 AM, C. Benson Manica <cb...@gmail.com>
> wrote:
> > So there's absolutely no way to force Maven to deploy an artifact with a
> > name not in the standard format?  If so, that's really unfortunate...
>
> That would be kind of like insisting that MySQL change its internal
> data format.  It's probably possible to change the repository format
> if you want to dig into the code, but unlikely to be worth it.
>
> I think you've already hit on the easiest solution, which is to copy
> or move the artifacts somewhere that the tool can process them.  (I
> wouldn't rename them *in* the repo in case you later have some
> maven-aware tooling.)
>
> You could use the wagon plugin to transfer the file to some arbitrary
> location.
>
> Another idea might be to use the Maven dependency plugin to pull the
> artifacts down and rename them:
> http://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.html
> , then have the tool process them.
>
> Or you could fix the tool so it works with the Maven repo format.
>
> --
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Cesar De la Cruz Rojas
*
-----------------------------------------------------------------------------
*
Sennior Software Engineer
-----------------------------------------------------------------------------
Follow me in Facebook : http://www.facebook.com/aquiles.geo
Twitter http://twitter.com/ageo
Picture blog http://ageo.deviantart.com

Re: Change name of assembled artifacts

Posted by Wendy Smoak <ws...@gmail.com>.
On Mon, Aug 2, 2010 at 11:26 AM, C. Benson Manica <cb...@gmail.com> wrote:
> So there's absolutely no way to force Maven to deploy an artifact with a
> name not in the standard format?  If so, that's really unfortunate...

That would be kind of like insisting that MySQL change its internal
data format.  It's probably possible to change the repository format
if you want to dig into the code, but unlikely to be worth it.

I think you've already hit on the easiest solution, which is to copy
or move the artifacts somewhere that the tool can process them.  (I
wouldn't rename them *in* the repo in case you later have some
maven-aware tooling.)

You could use the wagon plugin to transfer the file to some arbitrary location.

Another idea might be to use the Maven dependency plugin to pull the
artifacts down and rename them:
http://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.html
, then have the tool process them.

Or you could fix the tool so it works with the Maven repo format.

-- 
Wendy

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


Re: Change name of assembled artifacts

Posted by Anders Hammar <an...@hammar.net>.
As often said before, don't fight Maven. It will make your life difficult.

/Anders

On Mon, Aug 2, 2010 at 17:32, a.geo <aq...@gmail.com> wrote:

> mmmm, first think in the problem, why do you want change the repository
> generated file name... ?
>
> 2010/8/2 C. Benson Manica <cb...@gmail.com>
>
> > So there's absolutely no way to force Maven to deploy an artifact with a
> > name not in the standard format?  If so, that's really unfortunate...
> >
> > On Mon, Aug 2, 2010 at 11:06 AM, Anders Hammar <an...@hammar.net>
> wrote:
> >
> > > Changing the name in the repo is not possible. It has to conform to
> Maven
> > > standard.
> > >
> > > /Anders
> > >
> > > On Mon, Aug 2, 2010 at 17:04, a.geo <aq...@gmail.com> wrote:
> > >
> > > > So, you could use a weird Ant task embedded in the Maven plugins flow
> > to
> > > > change the name... But, I think you must think in a official/regular
> > way
> > > to
> > > > resolve the problem first...
> > > >
> > > > 2010/8/2 Anders Hammar <an...@hammar.net>
> > > >
> > > > > Changing finalName does not impact the name in the repo (local or
> > > > remote).
> > > > > Just in the target folder.
> > > > >
> > > > > /Anders
> > > > >
> > > > > On Mon, Aug 2, 2010 at 16:52, a.geo <aq...@gmail.com> wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > You can to use
> > > > > >
> > > > > >    ....
> > > > > >    <build>
> > > > > >        <finalName>my-own-name</finalName>
> > > > > >        <plugins>
> > > > > >              ....
> > > > > >
> > > > > > In the POM.XML file
> > > > > >
> > > > > > 2010/8/2 C. Benson Manica <cb...@gmail.com>
> > > > > >
> > > > > > > We have a project "foo" that builds several assemblies - let's
> > say
> > > > one
> > > > > of
> > > > > > > them is named "bar".  The resulting artifacts get named
> > > > > foo-VERSION-bar.
> > > > > > > The problem is that the tool that will be processing these
> > > artifacts
> > > > > > really
> > > > > > > wants them to be named foo-bar-VERSION.  Is there a way to coax
> > the
> > > > > > > assembly
> > > > > > > plugin (or something else) to get the artifacts named like
> this?
> > > >  There
> > > > > > are
> > > > > > > no Maven projects that depend on these assembled artifacts so
> the
> > > > > > renaming
> > > > > > > isn't problematic from that perspective.  Since we need an
> > > immediate
> > > > > > > solution I am going to simply use the exec plugin to "mv" the
> > > > artifacts
> > > > > > as
> > > > > > > need be, but I'm hoping to be able to replace that with a less
> > ugly
> > > > > > > solution.
> > > > > > >
> > > > > > > --
> > > > > > > C. Benson Manica
> > > > > > > cbmanica@gmail.com
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Cesar De la Cruz Rojas
> > > > > > *
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> -----------------------------------------------------------------------------
> > > > > > *
> > > > > > Sennior Software Engineer
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> -----------------------------------------------------------------------------
> > > > > > Follow me in Facebook : http://www.facebook.com/aquiles.geo
> > > > > > Twitter http://twitter.com/ageo
> > > > > > Picture blog http://ageo.deviantart.com
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Cesar De la Cruz Rojas
> > > > *
> > > >
> > > >
> > >
> >
> -----------------------------------------------------------------------------
> > > > *
> > > > Sennior Software Engineer
> > > >
> > > >
> > >
> >
> -----------------------------------------------------------------------------
> > > > Follow me in Facebook : http://www.facebook.com/aquiles.geo
> > > > Twitter http://twitter.com/ageo
> > > > Picture blog http://ageo.deviantart.com
> > > >
> > >
> >
> >
> >
> > --
> > C. Benson Manica
> > cbmanica@gmail.com
> >
>
>
>
> --
> Cesar De la Cruz Rojas
> *
>
> -----------------------------------------------------------------------------
> *
> Sennior Software Engineer
>
> -----------------------------------------------------------------------------
> Follow me in Facebook : http://www.facebook.com/aquiles.geo
> Twitter http://twitter.com/ageo
> Picture blog http://ageo.deviantart.com
>

Re: Change name of assembled artifacts

Posted by "a.geo" <aq...@gmail.com>.
mmmm, first think in the problem, why do you want change the repository
generated file name... ?

2010/8/2 C. Benson Manica <cb...@gmail.com>

> So there's absolutely no way to force Maven to deploy an artifact with a
> name not in the standard format?  If so, that's really unfortunate...
>
> On Mon, Aug 2, 2010 at 11:06 AM, Anders Hammar <an...@hammar.net> wrote:
>
> > Changing the name in the repo is not possible. It has to conform to Maven
> > standard.
> >
> > /Anders
> >
> > On Mon, Aug 2, 2010 at 17:04, a.geo <aq...@gmail.com> wrote:
> >
> > > So, you could use a weird Ant task embedded in the Maven plugins flow
> to
> > > change the name... But, I think you must think in a official/regular
> way
> > to
> > > resolve the problem first...
> > >
> > > 2010/8/2 Anders Hammar <an...@hammar.net>
> > >
> > > > Changing finalName does not impact the name in the repo (local or
> > > remote).
> > > > Just in the target folder.
> > > >
> > > > /Anders
> > > >
> > > > On Mon, Aug 2, 2010 at 16:52, a.geo <aq...@gmail.com> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > You can to use
> > > > >
> > > > >    ....
> > > > >    <build>
> > > > >        <finalName>my-own-name</finalName>
> > > > >        <plugins>
> > > > >              ....
> > > > >
> > > > > In the POM.XML file
> > > > >
> > > > > 2010/8/2 C. Benson Manica <cb...@gmail.com>
> > > > >
> > > > > > We have a project "foo" that builds several assemblies - let's
> say
> > > one
> > > > of
> > > > > > them is named "bar".  The resulting artifacts get named
> > > > foo-VERSION-bar.
> > > > > > The problem is that the tool that will be processing these
> > artifacts
> > > > > really
> > > > > > wants them to be named foo-bar-VERSION.  Is there a way to coax
> the
> > > > > > assembly
> > > > > > plugin (or something else) to get the artifacts named like this?
> > >  There
> > > > > are
> > > > > > no Maven projects that depend on these assembled artifacts so the
> > > > > renaming
> > > > > > isn't problematic from that perspective.  Since we need an
> > immediate
> > > > > > solution I am going to simply use the exec plugin to "mv" the
> > > artifacts
> > > > > as
> > > > > > need be, but I'm hoping to be able to replace that with a less
> ugly
> > > > > > solution.
> > > > > >
> > > > > > --
> > > > > > C. Benson Manica
> > > > > > cbmanica@gmail.com
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Cesar De la Cruz Rojas
> > > > > *
> > > > >
> > > > >
> > > >
> > >
> >
> -----------------------------------------------------------------------------
> > > > > *
> > > > > Sennior Software Engineer
> > > > >
> > > > >
> > > >
> > >
> >
> -----------------------------------------------------------------------------
> > > > > Follow me in Facebook : http://www.facebook.com/aquiles.geo
> > > > > Twitter http://twitter.com/ageo
> > > > > Picture blog http://ageo.deviantart.com
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Cesar De la Cruz Rojas
> > > *
> > >
> > >
> >
> -----------------------------------------------------------------------------
> > > *
> > > Sennior Software Engineer
> > >
> > >
> >
> -----------------------------------------------------------------------------
> > > Follow me in Facebook : http://www.facebook.com/aquiles.geo
> > > Twitter http://twitter.com/ageo
> > > Picture blog http://ageo.deviantart.com
> > >
> >
>
>
>
> --
> C. Benson Manica
> cbmanica@gmail.com
>



-- 
Cesar De la Cruz Rojas
*
-----------------------------------------------------------------------------
*
Sennior Software Engineer
-----------------------------------------------------------------------------
Follow me in Facebook : http://www.facebook.com/aquiles.geo
Twitter http://twitter.com/ageo
Picture blog http://ageo.deviantart.com

Re: Change name of assembled artifacts

Posted by "C. Benson Manica" <cb...@gmail.com>.
So there's absolutely no way to force Maven to deploy an artifact with a
name not in the standard format?  If so, that's really unfortunate...

On Mon, Aug 2, 2010 at 11:06 AM, Anders Hammar <an...@hammar.net> wrote:

> Changing the name in the repo is not possible. It has to conform to Maven
> standard.
>
> /Anders
>
> On Mon, Aug 2, 2010 at 17:04, a.geo <aq...@gmail.com> wrote:
>
> > So, you could use a weird Ant task embedded in the Maven plugins flow to
> > change the name... But, I think you must think in a official/regular way
> to
> > resolve the problem first...
> >
> > 2010/8/2 Anders Hammar <an...@hammar.net>
> >
> > > Changing finalName does not impact the name in the repo (local or
> > remote).
> > > Just in the target folder.
> > >
> > > /Anders
> > >
> > > On Mon, Aug 2, 2010 at 16:52, a.geo <aq...@gmail.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > You can to use
> > > >
> > > >    ....
> > > >    <build>
> > > >        <finalName>my-own-name</finalName>
> > > >        <plugins>
> > > >              ....
> > > >
> > > > In the POM.XML file
> > > >
> > > > 2010/8/2 C. Benson Manica <cb...@gmail.com>
> > > >
> > > > > We have a project "foo" that builds several assemblies - let's say
> > one
> > > of
> > > > > them is named "bar".  The resulting artifacts get named
> > > foo-VERSION-bar.
> > > > > The problem is that the tool that will be processing these
> artifacts
> > > > really
> > > > > wants them to be named foo-bar-VERSION.  Is there a way to coax the
> > > > > assembly
> > > > > plugin (or something else) to get the artifacts named like this?
> >  There
> > > > are
> > > > > no Maven projects that depend on these assembled artifacts so the
> > > > renaming
> > > > > isn't problematic from that perspective.  Since we need an
> immediate
> > > > > solution I am going to simply use the exec plugin to "mv" the
> > artifacts
> > > > as
> > > > > need be, but I'm hoping to be able to replace that with a less ugly
> > > > > solution.
> > > > >
> > > > > --
> > > > > C. Benson Manica
> > > > > cbmanica@gmail.com
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Cesar De la Cruz Rojas
> > > > *
> > > >
> > > >
> > >
> >
> -----------------------------------------------------------------------------
> > > > *
> > > > Sennior Software Engineer
> > > >
> > > >
> > >
> >
> -----------------------------------------------------------------------------
> > > > Follow me in Facebook : http://www.facebook.com/aquiles.geo
> > > > Twitter http://twitter.com/ageo
> > > > Picture blog http://ageo.deviantart.com
> > > >
> > >
> >
> >
> >
> > --
> > Cesar De la Cruz Rojas
> > *
> >
> >
> -----------------------------------------------------------------------------
> > *
> > Sennior Software Engineer
> >
> >
> -----------------------------------------------------------------------------
> > Follow me in Facebook : http://www.facebook.com/aquiles.geo
> > Twitter http://twitter.com/ageo
> > Picture blog http://ageo.deviantart.com
> >
>



-- 
C. Benson Manica
cbmanica@gmail.com

Re: Change name of assembled artifacts

Posted by Anders Hammar <an...@hammar.net>.
Changing the name in the repo is not possible. It has to conform to Maven
standard.

/Anders

On Mon, Aug 2, 2010 at 17:04, a.geo <aq...@gmail.com> wrote:

> So, you could use a weird Ant task embedded in the Maven plugins flow to
> change the name... But, I think you must think in a official/regular way to
> resolve the problem first...
>
> 2010/8/2 Anders Hammar <an...@hammar.net>
>
> > Changing finalName does not impact the name in the repo (local or
> remote).
> > Just in the target folder.
> >
> > /Anders
> >
> > On Mon, Aug 2, 2010 at 16:52, a.geo <aq...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > You can to use
> > >
> > >    ....
> > >    <build>
> > >        <finalName>my-own-name</finalName>
> > >        <plugins>
> > >              ....
> > >
> > > In the POM.XML file
> > >
> > > 2010/8/2 C. Benson Manica <cb...@gmail.com>
> > >
> > > > We have a project "foo" that builds several assemblies - let's say
> one
> > of
> > > > them is named "bar".  The resulting artifacts get named
> > foo-VERSION-bar.
> > > > The problem is that the tool that will be processing these artifacts
> > > really
> > > > wants them to be named foo-bar-VERSION.  Is there a way to coax the
> > > > assembly
> > > > plugin (or something else) to get the artifacts named like this?
>  There
> > > are
> > > > no Maven projects that depend on these assembled artifacts so the
> > > renaming
> > > > isn't problematic from that perspective.  Since we need an immediate
> > > > solution I am going to simply use the exec plugin to "mv" the
> artifacts
> > > as
> > > > need be, but I'm hoping to be able to replace that with a less ugly
> > > > solution.
> > > >
> > > > --
> > > > C. Benson Manica
> > > > cbmanica@gmail.com
> > > >
> > >
> > >
> > >
> > > --
> > > Cesar De la Cruz Rojas
> > > *
> > >
> > >
> >
> -----------------------------------------------------------------------------
> > > *
> > > Sennior Software Engineer
> > >
> > >
> >
> -----------------------------------------------------------------------------
> > > Follow me in Facebook : http://www.facebook.com/aquiles.geo
> > > Twitter http://twitter.com/ageo
> > > Picture blog http://ageo.deviantart.com
> > >
> >
>
>
>
> --
> Cesar De la Cruz Rojas
> *
>
> -----------------------------------------------------------------------------
> *
> Sennior Software Engineer
>
> -----------------------------------------------------------------------------
> Follow me in Facebook : http://www.facebook.com/aquiles.geo
> Twitter http://twitter.com/ageo
> Picture blog http://ageo.deviantart.com
>

Re: Change name of assembled artifacts

Posted by "a.geo" <aq...@gmail.com>.
So, you could use a weird Ant task embedded in the Maven plugins flow to
change the name... But, I think you must think in a official/regular way to
resolve the problem first...

2010/8/2 Anders Hammar <an...@hammar.net>

> Changing finalName does not impact the name in the repo (local or remote).
> Just in the target folder.
>
> /Anders
>
> On Mon, Aug 2, 2010 at 16:52, a.geo <aq...@gmail.com> wrote:
>
> > Hi,
> >
> > You can to use
> >
> >    ....
> >    <build>
> >        <finalName>my-own-name</finalName>
> >        <plugins>
> >              ....
> >
> > In the POM.XML file
> >
> > 2010/8/2 C. Benson Manica <cb...@gmail.com>
> >
> > > We have a project "foo" that builds several assemblies - let's say one
> of
> > > them is named "bar".  The resulting artifacts get named
> foo-VERSION-bar.
> > > The problem is that the tool that will be processing these artifacts
> > really
> > > wants them to be named foo-bar-VERSION.  Is there a way to coax the
> > > assembly
> > > plugin (or something else) to get the artifacts named like this?  There
> > are
> > > no Maven projects that depend on these assembled artifacts so the
> > renaming
> > > isn't problematic from that perspective.  Since we need an immediate
> > > solution I am going to simply use the exec plugin to "mv" the artifacts
> > as
> > > need be, but I'm hoping to be able to replace that with a less ugly
> > > solution.
> > >
> > > --
> > > C. Benson Manica
> > > cbmanica@gmail.com
> > >
> >
> >
> >
> > --
> > Cesar De la Cruz Rojas
> > *
> >
> >
> -----------------------------------------------------------------------------
> > *
> > Sennior Software Engineer
> >
> >
> -----------------------------------------------------------------------------
> > Follow me in Facebook : http://www.facebook.com/aquiles.geo
> > Twitter http://twitter.com/ageo
> > Picture blog http://ageo.deviantart.com
> >
>



-- 
Cesar De la Cruz Rojas
*
-----------------------------------------------------------------------------
*
Sennior Software Engineer
-----------------------------------------------------------------------------
Follow me in Facebook : http://www.facebook.com/aquiles.geo
Twitter http://twitter.com/ageo
Picture blog http://ageo.deviantart.com

Re: Change name of assembled artifacts

Posted by Anders Hammar <an...@hammar.net>.
Changing finalName does not impact the name in the repo (local or remote).
Just in the target folder.

/Anders

On Mon, Aug 2, 2010 at 16:52, a.geo <aq...@gmail.com> wrote:

> Hi,
>
> You can to use
>
>    ....
>    <build>
>        <finalName>my-own-name</finalName>
>        <plugins>
>              ....
>
> In the POM.XML file
>
> 2010/8/2 C. Benson Manica <cb...@gmail.com>
>
> > We have a project "foo" that builds several assemblies - let's say one of
> > them is named "bar".  The resulting artifacts get named foo-VERSION-bar.
> > The problem is that the tool that will be processing these artifacts
> really
> > wants them to be named foo-bar-VERSION.  Is there a way to coax the
> > assembly
> > plugin (or something else) to get the artifacts named like this?  There
> are
> > no Maven projects that depend on these assembled artifacts so the
> renaming
> > isn't problematic from that perspective.  Since we need an immediate
> > solution I am going to simply use the exec plugin to "mv" the artifacts
> as
> > need be, but I'm hoping to be able to replace that with a less ugly
> > solution.
> >
> > --
> > C. Benson Manica
> > cbmanica@gmail.com
> >
>
>
>
> --
> Cesar De la Cruz Rojas
> *
>
> -----------------------------------------------------------------------------
> *
> Sennior Software Engineer
>
> -----------------------------------------------------------------------------
> Follow me in Facebook : http://www.facebook.com/aquiles.geo
> Twitter http://twitter.com/ageo
> Picture blog http://ageo.deviantart.com
>

Re: Change name of assembled artifacts

Posted by "a.geo" <aq...@gmail.com>.
Hi,

You can to use

    ....
    <build>
        <finalName>my-own-name</finalName>
        <plugins>
              ....

In the POM.XML file

2010/8/2 C. Benson Manica <cb...@gmail.com>

> We have a project "foo" that builds several assemblies - let's say one of
> them is named "bar".  The resulting artifacts get named foo-VERSION-bar.
> The problem is that the tool that will be processing these artifacts really
> wants them to be named foo-bar-VERSION.  Is there a way to coax the
> assembly
> plugin (or something else) to get the artifacts named like this?  There are
> no Maven projects that depend on these assembled artifacts so the renaming
> isn't problematic from that perspective.  Since we need an immediate
> solution I am going to simply use the exec plugin to "mv" the artifacts as
> need be, but I'm hoping to be able to replace that with a less ugly
> solution.
>
> --
> C. Benson Manica
> cbmanica@gmail.com
>



-- 
Cesar De la Cruz Rojas
*
-----------------------------------------------------------------------------
*
Sennior Software Engineer
-----------------------------------------------------------------------------
Follow me in Facebook : http://www.facebook.com/aquiles.geo
Twitter http://twitter.com/ageo
Picture blog http://ageo.deviantart.com