简体   繁体   中英

Issue creating Jar files (repository is from github)

Creating a Jar file:

I want to create Jar files from a Github Java repository. How can I create below Jar files?

Jars to create:

geo-ip-java.jar

hive-udf-geo-ip-jtg.jar

Git URL: https://github.com/edwardcapriolo/hive-geoip

I found we can create them as below syntax, but seems it is using maven to compile them:

jar cf jar_file.jar file.java

As this is a maven project (as seen that the file pom.xml exists) you can create the target artifact (in your case the jar file) by simply executing mvn package .

If you want to use the jar file in another maven project (as dependency) then it is more usefull to use mvn install as this also installs the artifact in your local repository.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM