4

just a simple question: I need to add a Maven dependency to a Eclipse Plugin project. The project has not a POM file, so I converted it to a Maven one. Now I have plugin.xml file and pom.xml file. POM contains the dependency I need to satisfy, but it's ignored; I mean, I can't resolve an import in source code referring to that import.

Can you help me? ty

I read about Tycho plugin, but online configurations don't work.

2 Answers2

0

If I'm reading this correctly, you've just started by adding a Maven dependency to your project, but don't have the dependency available for Eclipse to validate your code against.

You will need to start a Maven build after you add a brand new dependency so that Maven can add that to your local cached repository. Once the Maven build is done, Eclipse should recognize your imports properly.

Ken Rachynski
  • 320
  • 1
  • 9
  • 1
    Thank you for helping, but it is an issue related to Eclipse plugins development, not just Maven building. I already have required artifacts in my .m2 repository and in .pom file (in the Eclipse plugin project) they are correctly referred, but it seems like the .pom file is ignored during build phase. – user1892236 Dec 10 '12 at 17:45
0

You may want to check whether the dependency you are looking for is available in the Eclipse Orbit.

The Orbit project is basically a repository of libraries to make them available for Eclipse Plug-in Development. What is especially nice in the Orbit libraries is that they also provide the sources. Thus, it is possible to view the implementation and get proper JavaDoc and so on.

Example

One can find the com.google.gson library using the update site

https://download.eclipse.org/tools/orbit/downloads/drops/R20190602212107/repository

Thereby, the part R20190602212107 refers to the Orbit build name that you find on the downloads page of the project.

mihca
  • 997
  • 1
  • 10
  • 29
  • You can also use the Eclipse Orbit project update sites to define a Target Platform for your Plug-in Project. – mihca Jul 02 '19 at 14:45