tags:

views:

61

answers:

1

I have a dependency which is scoped as "system".

I'd like to know if there's a way to define the attached source and javadoc for the dependency. This seems like something that should've been taken care of, but I can't seem to fine any documentation on it or why it was neglected.

I am specifically looking for the configuration solution, not installing it to my local repo, or deploying it to a common repo. For the sake of this discussion, those options are out.

+2  A: 

Do you mean attach sources using m2eclipse?

If so, you just need to ensure the sources jar is in the same directory. I tried this by copying commons-io-1.4.jar to some other directory and setting the system path, if commons-io-1.4-sources.jar is in the same directory, m2eclipse finds and attaches the sources.

<dependency>
  <groupId>commons-io</groupId>
  <artifactId>commons-io</artifactId>
  <version>1.4</version>
  <scope>system</scope>
  <systemPath>C:\test\lib\commons-io-1.4.jar</systemPath>
</dependency>

And the source jar is

C:\test\lib\commons-io-1.4-sources.jar

I guess it'll work the same for javadoc, not tried it though.

Rich Seller
Interesting, and I guess this would be the same for the maven eclipse plugin. I don't have an opportunity to try this right now, but I will.
Spencer K