开发者

Maven dependency of type/classifier bin not showing up in runtime classpath

I have a project that is using an artifact that I've uploaded into a local Maven repo with the type and classifier bin. I want to rely on this artifact at runtime, and want to reference the file via the classpath.

As a point of reference, my project defines a dependency such as:

<dependency>
  <groupId>my.site</groupId>
  <artifactId>binary-dependency</artifactId>
  <version>1.0</version>
  <type>bin</type>
  <classifier>bin</classifier>
</dependency>

When I run mvn dependency:build-classpath, I can see the artifact listed. However, in my code, calling System.println("java.class.path") does not include this, both in Eclipse using m2e and via M开发者_StackOverflowaven on the command line.

Any idea why this won't show up in the classpath?


Is it jar? Then type should be jar.

And if it's not jar, how do you expect it to be added to classpath?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜