Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ezhov-da/011cf47298fc4a4e178e5ce1b8bb1185 to your computer and use it in GitHub Desktop.
Save ezhov-da/011cf47298fc4a4e178e5ce1b8bb1185 to your computer and use it in GitHub Desktop.
java maven добавление jar файла в локальное хранилище
Ссылки:<br>
<a href="http://stackoverflow.com/questions/4955635/how-to-add-local-jar-files-in-maven-project">http://stackoverflow.com/questions/4955635/how-to-add-local-jar-files-in-maven-project</a><br>
<a href="https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html">https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html</a><br>
Вот так выглядит строка установки jar в локальный репозиторий:
[code:]CMD[:code]
mvn install:install-file
-Dfile=E:/runner_application/lib/jkeymaster-1.1.jar
-DgroupId=com.tulskiy
-DartifactId=keymaster
-Dversion=1.1
-Dpackaging=jar
-DgeneratePom=true
mvn install:install-file ^
-Dfile=C:/Users/rrnezh/Downloads/jansi-1.16.jar ^
-DgroupId=jansi ^
-DartifactId=jansi ^
-Dversion=1.16 ^
-Dpackaging=jar ^
-DgeneratePom=true
[/code]
Соответственно, запускать установку так:
[code:]CMD[:code]
E:\nb\java\maven\bin\mvn install:install-file -Dfile=E:/runner_application/lib/jkeymaster-1.1.jar -DgroupId=com.tulskiy -DartifactId=keymaster -Dversion=1.1 -Dpackaging=jar -DgeneratePom=true
[/code]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment