使用包含的专有库构建 maven 项目 [英] build maven project with propriatery libraries included

查看:37
本文介绍了使用包含的专有库构建 maven 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何创建 maven pom,这将使项目可构建,我可以直接在我的项目中包含专有 jars,而不必从存储库中获取它们吗?以前有人这样做过吗?

How to create maven pom, which will make project buildable, can I include propriatery jars with my project directly without having to take them from repository? anyone did this before ?

我不想通过使用依赖项 jar 构建程序集来使其可运行,我希望它是可构建的.因此,任何拥有此项目的人都可以构建它,即使在任何存储库中都找不到 jar.

I don't want to make it runnable by building assembly with dependencies jar, I want it to be buildable. So anyone having this project is able to build it, even if jars are nowhere to be found at any repository.

推荐答案

1 您可以将那个 jar 包含在应用程序的类路径中
2你可以通过

1 Either you can include that jar in your classpath of application
2 you can install particular jar file in your maven reopos by

mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> 
    -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>

这篇关于使用包含的专有库构建 maven 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆