• <small id='s5gGg'></small><noframes id='s5gGg'>

    <tfoot id='s5gGg'></tfoot>
  • <legend id='s5gGg'><style id='s5gGg'><dir id='s5gGg'><q id='s5gGg'></q></dir></style></legend>

    1. <i id='s5gGg'><tr id='s5gGg'><dt id='s5gGg'><q id='s5gGg'><span id='s5gGg'><b id='s5gGg'><form id='s5gGg'><ins id='s5gGg'></ins><ul id='s5gGg'></ul><sub id='s5gGg'></sub></form><legend id='s5gGg'></legend><bdo id='s5gGg'><pre id='s5gGg'><center id='s5gGg'></center></pre></bdo></b><th id='s5gGg'></th></span></q></dt></tr></i><div id='s5gGg'><tfoot id='s5gGg'></tfoot><dl id='s5gGg'><fieldset id='s5gGg'></fieldset></dl></div>

      • <bdo id='s5gGg'></bdo><ul id='s5gGg'></ul>

        Maven 私有依赖

        Maven private dependencies(Maven 私有依赖)
        <tfoot id='aa07o'></tfoot>

            • <bdo id='aa07o'></bdo><ul id='aa07o'></ul>
                <tbody id='aa07o'></tbody>

              1. <legend id='aa07o'><style id='aa07o'><dir id='aa07o'><q id='aa07o'></q></dir></style></legend>

                <small id='aa07o'></small><noframes id='aa07o'>

                <i id='aa07o'><tr id='aa07o'><dt id='aa07o'><q id='aa07o'><span id='aa07o'><b id='aa07o'><form id='aa07o'><ins id='aa07o'></ins><ul id='aa07o'></ul><sub id='aa07o'></sub></form><legend id='aa07o'></legend><bdo id='aa07o'><pre id='aa07o'><center id='aa07o'></center></pre></bdo></b><th id='aa07o'></th></span></q></dt></tr></i><div id='aa07o'><tfoot id='aa07o'></tfoot><dl id='aa07o'><fieldset id='aa07o'></fieldset></dl></div>

                • 本文介绍了Maven 私有依赖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  有没有办法为其他人不可见的项目指定私有依赖项?

                  Is there a way to specify private dependency for a project that will not be visible to others?

                  我想要达到的效果与排除功能非常相似,但略有不同 - 用户根本不应该意识到这种依赖关系,因此不必明确使用此排除.

                  What I'm trying to achieve is pretty much similar to what exclusion does, but with one slight difference - user should not be aware of that dependency at all and, thus, won't have to use this exclusion explicitly.

                  如果这是不可能的(这很可能是真的),那么有什么特别的原因吗?

                  And if this is not possible (which, most likely, is true), then is there any particular reason why?

                  推荐答案

                  可选的依赖听起来像你想要的.将依赖项标记为 optional 并且您将在构建时拥有它,但用户不会自动将该库包含为传递依赖项.

                  Optional dependencies sound like what you want. Mark a dependency as optional and you'll have it when you build, but users won't automatically have that library included as a transitive dependency.

                  参见 Maven - 可选依赖和依赖排除 了解更多详情.

                  See Maven - Optional Dependencies and Dependency Exclusions for more details.

                  'provided' 在这里并不是理想的解决方案;这意味着需要一个依赖项,但是它将由您的工件的任何用户提供.'optional' 表示依赖项仅对某些功能是必需的.

                  'provided' is not the ideal solution here; that means that a dependency is required, but that it will be provided by any user of your artifact. 'optional' means that the dependency is only required for some functionality.

                  这篇关于Maven 私有依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Maven JAVA_HOME environment variable is not defined correctly, but it is(Maven JAVA_HOME 环境变量未正确定义,但它是)
                  Java System Environment Variable(Java 系统环境变量)
                  Java -classpath option(Java -classpath 选项)
                  Read environment variable in SpringBoot(在 SpringBoot 中读取环境变量)
                  Tomcat 8 - context.xml use Environment Variable in Datasource(Tomcat 8 - context.xml 在数据源中使用环境变量)
                  Issue with JAVA_HOME(JAVA_HOME 的问题)
                • <i id='4sT2Y'><tr id='4sT2Y'><dt id='4sT2Y'><q id='4sT2Y'><span id='4sT2Y'><b id='4sT2Y'><form id='4sT2Y'><ins id='4sT2Y'></ins><ul id='4sT2Y'></ul><sub id='4sT2Y'></sub></form><legend id='4sT2Y'></legend><bdo id='4sT2Y'><pre id='4sT2Y'><center id='4sT2Y'></center></pre></bdo></b><th id='4sT2Y'></th></span></q></dt></tr></i><div id='4sT2Y'><tfoot id='4sT2Y'></tfoot><dl id='4sT2Y'><fieldset id='4sT2Y'></fieldset></dl></div>

                    <small id='4sT2Y'></small><noframes id='4sT2Y'>

                      <tbody id='4sT2Y'></tbody>
                      • <bdo id='4sT2Y'></bdo><ul id='4sT2Y'></ul>
                        <legend id='4sT2Y'><style id='4sT2Y'><dir id='4sT2Y'><q id='4sT2Y'></q></dir></style></legend>
                        <tfoot id='4sT2Y'></tfoot>