Maven add an external jar to repositories

If you want to be able to add external jar files from your local machine to maven, do these:

mvn install:install-file -Dfile=sqljdbc4.jar -DgroupId=com.microsoft.jdbc -DartifactId=jdbc -Dversion=4 -Dpackaging=jar -DgeneratePom=true

2. In your pom.xml

		<dependency>
			<groupId>com.microsoft.jdbc</groupId>
			<artifactId>jdbc</artifactId>
			<version>4</version>
		</dependency>

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s