Eclipse cannot find source attachments

When I open a class included through the Maven dependency, Eclipse tells me that the containing .jarfile has no source attachment.

But in the directory in which the file is located .jar, there is also a corresponding -sources.jarfile.

Do you have any hints regarding the solution to this problem?

Is there a way to tell Eclipse where it should automatically search for the original attachment?

Edit: In the Eclipse file, the .classpathvalue is sourcepathset for external archives, but not for ours. But both files jarand sources are in the same repo.

Also set property -Declipse.useProjectReferences=false.

+3
source share
6 answers

, sources.jar-not-available .

, . , Eclipse, , Maven Eclipse , .

K. Claszen .

+1

, downloadSources maven-eclipse-plugin pom.xml:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-eclipse-plugin</artifactId>
    <configuration>
        <downloadSources>true</downloadSources>
        <downloadJavadocs>true</downloadJavadocs>
        ...
    </configuration>
</plugin>
0

m2eclipse Maven Eclipse, javadocs m2eclipse:

> > Maven >

0

, (4.5) , (sources.jar-not-available ). , eclipse , repo, mvn eclipse:eclipse .

, .

0

, Maven, Download Sources.

-1

maven , mvn eclipse: eclipse, eclipse, . enter image description here

lib, 'M2_REPO', .

-1
source

All Articles