简体   繁体   English

Eclipse-找不到JUnit5源-如何添加JUnit5源代码?

[英]Eclipse - JUnit5 Source not found - How to add JUnit5 source code?

Where to find and how to add JUnit5 src.jar or src.zip into Eclipse to view the JUnit5 Source Code? 在哪里找到以及如何将JUnit5 src.jar或src.zip添加到Eclipse中以查看JUnit5源代码?

When I try to access the source code from JUnit on a JUnit package I get a 'Source not found' Message. 当我尝试从JUnit包上的JUnit访问源代码时,出现“找不到源”消息。

Where can I find the Source Code? 在哪里可以找到源代码?

If found how can I attach it? 如果找到我该如何附上它? Since in Eclipse > Java Build Path > JUnit5 > junit.jar > Source attachment > is non modifiable (won't let me edit it). 由于在Eclipse中> Java构建路径> JUnit5> junit.jar>源附件> 是不可修改的 (不允许我对其进行编辑)。

I could not find any info on this on either Eclipse or JUnit Website. 我在Eclipse或JUnit网站上都找不到关于此的任何信息。

Info on Eclipse Version:
Eclipse Java EE IDE for Web Developers.
Version: Oxygen.2 Release (4.7.2)

If you are using Maven or Gradle to pull in your dependencies on JUnit Jupiter, you can configure the Maven or Gradle Buildship plugins in Eclipse to automatically download the source JARs. 如果使用Maven或Gradle引入对JUnit Jupiter的依赖关系,则可以在Eclipse中配置Maven或Gradle Buildship插件以自动下载源JAR。

However, if you're just using a project that you created directly in Eclipse without Maven or Gradle build support, then I don't know how to attach the source JARs. 但是,如果您仅使用直接在Eclipse中创建的项目,而没有Maven或Gradle构建支持,那么我不知道如何附加源JAR。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM