maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ansgar Konermann <>
Subject Re: need info about Maven
Date Wed, 04 Jan 2012 23:08:56 GMT
Am 04.01.2012 19:45, schrieb Shamitha Reddy:
> the Microsoft JDBC Driver for SQL Server, can be made available within Maven

Hi Shamitha,

some introductory information what Maven is and how it is used can be
found in various places, for example [1] [2] [3]

Your customer most likely wants to use Maven to build Java projects, and
use your JDBC driver "the Maven way", that is, pull the JAR file into
the compilation or runtime classpath using Maven's "dependency mechanism".

This is commonly and most easily done by uploading it into a corporate
maven repository, managed by some Repository Manager like Nexus [4],
Artifactory [5] or Archiva [6]. They all have a mechanism to upload JAR
files which were not built/deployed by Maven. The only thing you or your
customer have to take care of is to assign a unique identifier to this
JAR file. For Maven, this 'identifier' is a structured one, consisting
of groupId, artifactId and a version (and a type, but this is 'jar' by
default, and thus does not need to be specified explicitly). This is the
approach I'd recommend. Each Maven installation is then set up in a way
that all requests to provide dependency artifacts (i. e. library JAR
files) automatically go to the central repository manager, which
distributes these artifacts to the maven installations on demand. This
is a one-time setup effort and can be automated.

If your customer wants to avoid the effort to set up a repository
manager, you can also install the JAR file into Maven's local artifacts
cache (so-called 'local repository'), by default living under
$HOME/.m2/repository. This is typically done using the
maven-install-plugin and its 'install-file' goal [7]. This might look
easier at first, but since there is no corporate-wide repository
manager, this step has to be performed on *each* Maven installation
which should be used to compile/run Java code which employs your JDBC
driver. Depending on organisation size, this can become cumbersome,
especially when your JDBC driver is updated (you need to re-do this for
the new version). You should ask your customer if they have already set
up a corporate-wide Maven repository manager. Most likely, if they're
not totally new to Maven and already doing serious software development
with it, they'll have one anyway.

Another option is to make your JAR file compatible with the requirements
of "the world-wide central library of Maven artifacts", or "Maven
Central" for short. This means some more preparation from your side [8]
and is only advisable if your product is intended to be used by a wide
audience, preferrably as open source software. Your JAR file could then
be deployed to Maven Central and any Maven installation could
automatically pull it from there, without the need for uploading it to a
corporate repository manager first.

Best regards



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message