You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jose Gonzalez Gomez <jg...@gmail.com> on 2005/07/26 14:36:20 UTC

[M2] How to override artifact name in dependency?

Hi there,

I'd like to use the postgresql jdbc driver
(http://www.ibiblio.org/maven2/postgresql/postgresql/7.4.1/) as a
dependency in my project, but the artifact name
(postgresql-7.4.1-jdbc3.jar) doesn't follow the standard artifact name
used in maven. In Maven1 we had the <jar/> element inside
<dependency/> for such cases, but this doesn't seem to be present in
the Maven2 project descriptor. How must this be done now?

Thanks in advance, best regards
Jose

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


Re: [M2] How to override artifact name in dependency?

Posted by Brett Porter <br...@gmail.com>.
For this specific one, we need to add a <classifier /> tag to
<dependency />, which would specify the jdbc3 part. This is on the
assumption that, say, -jdbc2 was exactly the same project, just built
differently. For now there is no workaround.

In regards to <jar/> - ok, this is certainly due for a FAQ.

Similar to here:
http://maven.apache.org/faq.html#unversioned-jars

Basically, you don't change the name in the repository. The repository
must keep all the information. This includes the local repository.

However, when you come to use the file (eg distribute it), you can
rename it however you would like.

Cheers,
Brett

On 7/26/05, Jose Gonzalez Gomez <jg...@gmail.com> wrote:
> Hi there,
> 
> I'd like to use the postgresql jdbc driver
> (http://www.ibiblio.org/maven2/postgresql/postgresql/7.4.1/) as a
> dependency in my project, but the artifact name
> (postgresql-7.4.1-jdbc3.jar) doesn't follow the standard artifact name
> used in maven. In Maven1 we had the <jar/> element inside
> <dependency/> for such cases, but this doesn't seem to be present in
> the Maven2 project descriptor. How must this be done now?
> 
> Thanks in advance, best regards
> Jose
> 
> ---------------------------------------------------------------------
> 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: [M2] How to override artifact name in dependency?

Posted by Kenney Westerhof <fo...@neonics.com>.
On Tue, 26 Jul 2005, Jose Gonzalez Gomez wrote:

This is a case of a wrong artifact name on ibiblio. It should
be changed. You cannot change the artifact name in the pom.

What I did was download the jar manually and rename it in my
local repository. If other people use your project you best
file a JIRA issue about the wrong naming of the artifact on ibiblio.

-- Kenney

> Hi there,
>
> I'd like to use the postgresql jdbc driver
> (http://www.ibiblio.org/maven2/postgresql/postgresql/7.4.1/) as a
> dependency in my project, but the artifact name
> (postgresql-7.4.1-jdbc3.jar) doesn't follow the standard artifact name
> used in maven. In Maven1 we had the <jar/> element inside
> <dependency/> for such cases, but this doesn't seem to be present in
> the Maven2 project descriptor. How must this be done now?
>
> Thanks in advance, best regards
> Jose
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

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