Hi Jeff,

Thanks for this but it is something we already tried. Although that does change the name of the generated jar file, the name is lost when it gets placed into the maven repository. When it gets installed, the name reverts to ${artifactId}-${version}.jar in a directory mad from ${groupId}. What I would need
is a <finalName> tag in the install plugin... and I could not see one.

Steve.

Jeff MAURY wrote:
Steve,

you can change the name of the JAR being generated through the finalName
tag: it specifies the name of the file being generated. By default, it is
equal to ${artifactId}-${version}.${packaging} so you may change it to:
${groupId}-${artifactId}-${version}.${packaging} for your purpose.

Jeff


On Jan 29, 2008 7:04 PM, Lee Meador <[EMAIL PROTECTED]> wrote:

1 isn't going to work because of how Maven finds files in the repo by
tracing down the file system path based on the group id and then going
down
the path some more based on the artifact id and expecting the jar file to
have a matching name.

The real solution is to change the artifactId, which you said would be
error
prone. It sounds like what you have is error prone already since your
build
process is having trouble telling jar files with the same name apart.

Sorry for no good news. Maybe someone else know more about it than i do.

-- Lee

On Jan 29, 2008 10:45 AM, Steve Found <[EMAIL PROTECTED]> wrote:

Hi all,

I have two  separate systems that I build using maven.

One has groupId:com.volantis.synergetics artifactId:repository-api
version:5.0-SNAPSHOT.  This system consists of around 50 artifacts.

The second has groupId:com.volantis.mcs  artifactId:repository-api
version:5.0-SNAPSHOT. This system consists of around 150 artifacts.

When I come to build an installer, the jar files are all copied into a
packaging directory, but as you can probably see, both jar files will be
called repository-api-5.0-SNAPSHOT.jar. Consequently, the second jar
will overwrite the first.

Now I could go and change all the artifactId's for this, but given that
there are many more than just 2 systems in the project this would be
very time consuming and prone to error.

What I want to do therefore is either :

1. Be able to set the name of the jar file when 'mvn install' installs
the generated jar the repository so that the jar files do not conflict
when the installer resolves it's dependancies. I tried setting the name
of the generated jar from each subsystem pom, but this was lost when the
jar was installed.

2. Be able to change the name of the jar when the dependancy is resolved
but without adding each and every dependancy to the installer POM. For
example... can I prepend volantis-synergetics- to every jar file that
has a groupId of com.volantis.synergetics ? In the above example then I
would get volantis-synergetics-repository-api.5.0-SNAPSHOT.jar and
volantis-mcs-repository-api.5.0-SNAPSHOT.jar.

Is there any way I can achieve these things through the install or
dependancy plugins ?

Regards,

  Steve.

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


--
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com





Reply via email to