2016-10-05 7 views
0

내 응용 프로그램은 tools.jar에있는 JDI 디버거 클래스를 사용합니다. 응용 프로그램을 Maven (즉, foo-with-dependencies.jar 만들기)을 사용하여 독립 실행 형으로 패키지해야합니다.Maven Central에서 tools.jar를 업로드 할 수 있습니까?

그러나 tools.jar은 Maven Central에 없습니다. <scope>system</scope>foo-with-dependencies.jar에 넣어 될 tools.jar 방지하기 때문에 스택 오버플로

인기 solution은 유효하지 않습니다.

Maven Central에서 tools.jar이 없다는 라이센스 문제가 있습니까? Maven Centraltools.jar을 올릴 수 있습니까?

+0

https://maven.apache.org/guides/mini/guide-central-repository-upload.html – xenteros

+0

참조 http://opensource.stackexchange.com/questions/4569/can-we-redistribute-openjdk -tool-jar –

답변

1

릴리스는 중앙 저장소에 업로드 할 수 있습니다. 즉, 변경되지 않고 저장소에서 이미 릴리스되어 사용 가능한 다른 파일에만 의존하는 파일을 의미합니다.

중앙 저장소에있는 POM의 최소 정보 요구 사항이 있습니다. 업데이트 된 요구 사항 목록은 here입니다.

글쎄, 귀하의 케이스는 guide central repository upload 위에 있습니다. 아닙니다. 기본적인 요구 사항에 위배됩니다.

소유자 또는 라이센스가있는 경우 tools.jar을 Maven Central에 업로드 할 수 있습니다.

Maven Apache에 따르면 당신은 다음과 같은 방법으로 pom.xmltools.jar을 추가 할 수 있습니다 다음 tools.jar 메이븐 중앙에서 사용할 수없는 것으로,

<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> 

여전히 의미이하고있을 수 없을거야 것 같습니다 .

+0

주된 이유는 대부분 Oracle JDK 라이센스입니다. 런타임 또는 JDK를 배포 할 수 있으며 tools.jar와 같은 구성 요소를 개별적으로 배포하는 것은 금지됩니다. http://stackoverflow.com/questions/22305686/is-it-safe-to-distribute-tools-jar-along-with-a-java-application-bundle – Gimby