Thanks Lee... I had a feeling this would be the case :D So I have
witten myself a perl script to go around all the poms and change the
artifactId's for all the dependancies. The joy of legacy code :)
Lee Meador 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]
<mailto:[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]
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
--
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com
<http://leemeador.com>