|Re: Project (preferably Maven) using JDT [message #671955 is a reply to message #671945]
||Thu, 19 May 2011 12:58
| Samuel Cox
Registered: May 2011
Deepak Azad wrote on Thu, 19 May 2011 07:45|
On 5/19/2011 3:52 PM, firstname.lastname@example.org wrote:
> I would like to use the JDT's AST stuff in a program I'm writing. My
> preferred programming environment is vim + Maven + sbt. I do use Eclipse
> for debugging and refactoring;)
> So, does anyone know of the best approach to adding the JDT as a
> dependency to a Maven project? Ideally, I'd just add the JDT dependency.
> If that is not an option, will someone give me some pointers on getting
> started (e.g. you should use the Eclipse IDE:)?
> Many thanks.
- Do you want pointers on AST or other JDT API's? (This question can be
- Or do you want to know how to build with Maven? (For this you should
go to Maven forum)
I need pointers on how to use AST and/or other JDT API's in a Java project. My preference is to use Maven, but I can use many other tools (e.g. Eclipse).
Pointers to documentation would be fine.
I don't need any help with normal Eclipse+Maven type questions.
Edit - I thought of another way to phrase this. I want to use JDT's AST class in my Java program. As such, I'll need all things required to use this class on my classpath. I'm trying to figure out how to get this list. Since I like Maven, I'd like to just add some-Maven-repo that has Eclipse JDT artifacts (i.e. jars) in it; however, I can adopt to other tools if I need to.
[Updated on: Thu, 19 May 2011 13:10]
Report message to a moderator
|Re: Project (preferably Maven) using JDT [message #672298 is a reply to message #672293]
||Fri, 20 May 2011 15:39
| Paul Webster
Registered: July 2009
Samuel Cox wrote on Fri, 20 May 2011 10:49|
Paul, I had looked at that. Unless I'm missing something, that just has the code using the AST API. I'll eventually get to that.
Yes, because you asked "Is there a sample project and/or documentation that demonstrates using JDT in a normal (i.e. not Eclipse plugin) Java project?"
Anyhow, I just kept adding jars from an Eclipse 3.6.2 Class download until I could run without errors. Not ideal, but I'm just playing at this point.
Thanks for trying to help.
We do try
That being said, what do you think is missing? You have an example of a java-only program that uses the JDT AST. Is it the maven component that's missing? We have the repo at http://maven.eclipse.org, but eclipse is only sorting out a consistent publishing policy right now.
As for finding dependencies, it's compile, run, add jar . I had to use jars for:
and an extra, org.eclipse.swt.gtk.linux.x86_64. I only need the SWT one because that example is compiling and launch SWT. The example itself was written against a much earlier version of eclipse, and some of the bundles have since split.
|Re: Project (preferably Maven) using JDT [message #672311 is a reply to message #672298]
||Fri, 20 May 2011 16:15
| Samuel Cox
Registered: May 2011
I do see your point, but, by sample project, I meant one that told me what the dependencies are. I guess I've been too long in Maven world;) Also, I think the thread is so long that maybe it wasn't clear what I really needed. I wasn't looking for help understanding the API. I was looking for help compiling code that uses the API.|
I had to do exactly what you said (compile/run, find dep, add dep, repeat) to get going. It wasn't that painful, and I probably should have gone down that path before bothering you guys with all this. Eventually, I'll be putting this all into a Maven project. I'll fight that pain later though.
Once I make sure the API will do what I want, I'll see if I can resolve all dependencies from your maven.eclipse.org site.
Hopefully, there will only be API questions from now on!
Powered by FUDForum
. Page generated in 0.02462 seconds