Hadoop core 1.0.3 sources not found from maven project (and after manual attach)
I have a maven project with hadoop-core dependency that matches what is on apache site:
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-core</artifactId>
<version>1.0.3</version>
<exclusions>
<exclusion>
<artifactId>junit</artifactId>
<groupId>junit</groupId>
</exclusion>
</exclusions>
</dependency>
Now, the class files were downloaded by IJ correctly. But the source files are not.
(1) Why is maven not able to download sources?
(2) I attached the sources manually. But still when I go to hadoop core class it says sources not found. Why?
请先登录再写评论。
Maven is not able to download sources for "org.apache.hadoop:hadoop-core:1.0.3" because
central repository does not contain sources, see
http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.apache.hadoop%22%20AND%20a%3A%22hadoop-core%22
May be you have attached sources incorrectly. Please, take screenshot of properties of library "Maven: org.apache.hadoop:hadoop-core:1.0.3" in the Project
Structure dialog.
I was mistaken about which jar file the code was in : DBInputFormat is in the mapred jar not the core jar. So this was my mistake.