Issue
When opening a class included through a Maven dependency, Eclipse tells me that the containing .jar
file has got no source attachment.
But in the directory in which the .jar
file resides, there is also as corresponding -sources.jar
file.
Do you have any hints regarding the solution of this problem?
Is there a way to tell Eclipse where it should automatically look for the source attachment?
Edit: In the Eclipse .classpath
file, the sourcepath
value is set for external archives, but not for ours. But both jar
s and sources file reside in the same repo.
The property -Declipse.useProjectReferences=false
is also set.
Solution
The problem was that there were already sources.jar-not-available
files for certain projects in my local repository.
I've deleted them and now the attachment of source files is working. Obviously Eclipse respectively the Maven Eclipse plugin doesn't look for source attachments as long as these marker files exist.
If it hadn't been for the comment from K. Claszen I'd have never came up with this solution.
Answered By - user321068