Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Trying to add a pom dependency to the target platform

>>>>> Emmanuel Chebbi <emmanuel.chebbi@xxxxxxxxxx>:

> Sorry, my bad for misunderstanding.
> Since Tycho is able to build the project (from the CLI) I start to suspect that the M2E Tycho connector does not behave well with POM-first projects. I have found an article<> [1<>] by Dirk Fauth where he says the following (talking about using <pomDependencies>):

>   *   "Doing this of course has the downside, that the target platform used for the build and the one used at development time are not the same anymore."

> His suggestion to overcome the issue is to:

>   1.  Download the JAR,
>   2.  Add it to the target platform as a "Directory location" so that it is a) ignored by Tycho and b) resolved by Eclipse IDE.

> I tested, and it works (neo4j is resolved from both Eclipse IDE and
> the CLI).

Thanks it worked for me as well.  I used the following directory and
this worked for me on linux:

With this directory eclipse was able to pickup both neo4j-java-driver
and its source jar.

(of course, it requires having the HOME environment variable on windows,
but I have that anyway, since so many unixish/linuxy tools relies on
having the HOME variable set)

> I also tried to wrap the neo4j JAR as a new OSGi bundle and it works
> too. It's not really elegant and requires to download the JAR, but
> maybe there's no other way? See also this discussion on the Tycho
> mailing list<>
> [2<>] for
> possible alternatives.

Hm... by "the neo4j JAR", do you mean the actual neo4J database?
(because that one is not an OSGi bundle and would require wrapping).

I decided not to try to include neo4j proper into eclipse, but instead
try to use the neo4j-java-driver (which _is_ a bundle) and run the neo4j
server as a separate process.

(Back in 2015 when I previously was tinkering with this project, I
rebundled neo4j before adding it to the target platform.  But I wasn¨'t
really successful)

Thanks again! You have been very helpful! :-)

Back to the top