简体   繁体   English

我可以在Maven Central上上传tools.jar吗?

[英]Can I upload tools.jar on Maven Central?

My application uses the JDI debugger classes, which are in tools.jar . 我的应用程序使用tools.jar的JDI调试器类。 I want the application to be packaged as standalone using Maven (ie creating a foo-with-dependencies.jar ). 我希望使用Maven将应用程序打包为独立程序(即创建foo-with-dependencies.jar )。

However, tools.jar is not on Maven Central. 但是, tools.jar不在Maven Central上。

Popular solution on Stack Overflow is not valid, since the <scope>system</scope> prevents tools.jar to be put in foo-with-dependencies.jar . 由于<scope>system</scope>禁止将tools.jar放入foo-with-dependencies.jar ,因此,关于Stack Overflow的流行解决方案无效。

Are there any licensing reasons for the absence of tools.jar on Maven central? Maven Central上缺少tools.jar是否有任何许可原因? Can I upload tools.jar on Maven Central ? 我可以在Maven Central上上传tools.jar吗?

Only releases can be uploaded to the central repository, that means files that won't change and that only depend on other files already released and available in the repository. 只能将发行版上载到中央存储库,这意味着文件不会更改,并且仅取决于存储库中已发布并可用的其他文件。

There are some requirements for the minimal information in the POMs that are in the central repository. 对于中央存储库中的POM中的最少信息有一些要求。 The updated list of requirements can be found here . 更新的要求列表可以在此处找到。

Well, your case is on top of guide central repository upload . 好吧,您的案例是在指南中央存储库上传之上的。 No. It's against basic requirements. 不,这违反了基本要求。

You can upload tools.jar to Maven Central if you're the owner or the license let's you do that. 如果您是所有者或许可证,可以将tools.jar上载到Maven Central。

According to Maven Apache you can add tools.jar to the pom.xml in a following way: 根据Maven Apache的说法,您可以通过以下方式将tools.jar添加到pom.xml中:

  <profiles>
    <profile>
      <id>default-tools.jar</id>
      <activation>
        <property>
          <name>java.vendor</name>
          <value>Sun Microsystems Inc.</value>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>com.sun</groupId>
          <artifactId>tools</artifactId>
          <version>1.4.2</version>
          <scope>system</scope>
          <systemPath>${java.home}/../lib/tools.jar</systemPath>
        </dependency>
      </dependencies>
    </profile>
  </profiles>

This still means, that the tools.jar isn't available in Maven Central and it looks like it'll never be there. 这仍然意味着, tools.jar在Maven Central中不可用,并且看起来永远不会存在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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