Last active
December 11, 2015 09:58
-
-
Save baijian/4583430 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== | |
pom.xml file is essentially the project's metadata file | |
that describes the various aspects of the project. | |
It describes the project's name, group, version, | |
dependecies, and many other things. | |
=== | |
Ok, as we have create a project with maven and | |
import it into eclipse, when we develop the project | |
we want to use a jar file in our local repository(for example jzmq.jar), | |
so we add the jar file into our local repository first, | |
then edit the pom file to tell this project about this, | |
then tell eclipse this change. | |
If you want to use zeroMQ, you should install zeroMQ in | |
your system, then you should install jzmq.jar, now you | |
have your jzmq.jar, you want to add it to your local repository, | |
do as below: | |
>>mvn install:install-file -Dfile=/usr/local/share/java/zmq.jar | |
-DgroupId=com.sysdev.zeromq -DartifactId=zeromq -Dversion=3.2.2 | |
-Dpackaging=jar | |
Then you will see the prompt that maven have installed | |
zmq.jar to your local repository. | |
Then you can edit your pom.xml file to add | |
this jar file to the project you are developing. | |
Add below to your pom.xml in | |
<dependencies></dependecies> | |
<dependency> | |
<groupId>com.sysdev.zeromq</groupId> | |
<artifactId>zeromq</artifactId> | |
<version>3.2.3</version> | |
<scope>compile</scope> | |
</dependency> | |
ok, run | |
>>mvn eclipse:eclipse | |
to update it to your eclipse. | |
OK, you can use zeromq in your project after you import it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment