开发者

How to solve Maven dependency on rt.jar for OS X?

开发者 https://www.devze.com 2023-01-19 11:28 出处:网络
I have the following dependency in my pom.xml <dependency> <groupId>javax.sql</groupId>

I have the following dependency in my pom.xml

 <dependency>
   <groupId>javax.sql</groupId>
   <artifactId>jdbc-stdext</artifactId>
   <version>2.0</version>
   <scope>system</scope>
   <systemPath>${java.home}/lib/rt.jar</systemPath>
</dependency>

My problem is I'm trying to build on a Mac (10.6.4) which doesn't have an rt.jar.

Is there a different system path I should be using for doing a build on OS X? Is there 开发者_如何学Goa clean way to specify this in my pom.xml with out breaking the pom for developers using windows?


The equivalent to this jar is /System/Library/Frameworks/JavaVM.framework/Home/bundle/Classes/classes.jar. But as this dependency is basically a dependency to the JRE, you don't really need it.

0

精彩评论

暂无评论...
验证码 换一张
取 消