最近在做AST相关的工作,看了网上很多教程,发现很多都没有说怎么引入org.eclipse.jdt.core这个包,最后再在官网发现了引入方法:
<!-- https://mvnrepository.com/artifact/org.eclipse.jdt/org.eclipse.jdt.core -->
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
<version>3.15.0</version>
</dependency>
// https://mvnrepository.com/artifact/org.eclipse.jdt/org.eclipse.jdt.core
compile group: 'org.eclipse.jdt', name: 'org.eclipse.jdt.core', version: '3.15.0'
// https://mvnrepository.com/artifact/org.eclipse.jdt/org.eclipse.jdt.core
libraryDependencies += "org.eclipse.jdt" % "org.eclipse.jdt.core" % "3.15.0"
<!-- https://mvnrepository.com/artifact/org.eclipse.jdt/org.eclipse.jdt.core -->
<dependency org="org.eclipse.jdt" name="org.eclipse.jdt.core" rev="3.15.0"/>
// https://mvnrepository.com/artifact/org.eclipse.jdt/org.eclipse.jdt.core
@Grapes(
@Grab(group='org.eclipse.jdt', module='org.eclipse.jdt.core', version='3.15.0')
)
;; https://mvnrepository.com/artifact/org.eclipse.jdt/org.eclipse.jdt.core
[org.eclipse.jdt/org.eclipse.jdt.core "3.15.0"]
# https://mvnrepository.com/artifact/org.eclipse.jdt/org.eclipse.jdt.core
'org.eclipse.jdt:org.eclipse.jdt.core:jar:3.15.0'
最后我还是在eclipse中使用了maven引入的,成功解决问题。
附上官方原址:
mvnrepository Java Development Tools Core » 3.15.0