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

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). 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.

Regards,
Emmanuel

[1] http://blog.vogella.com/2013/01/03/tycho-advanced/
[2] https://www.eclipse.org/lists/tycho-user/msg04368.html

Le 25/08/2019 à 17:11, Steinar Bang a écrit :
Running "mvn clean install -X" in a bundle project (modeler/bundles/modeler.core)
shows that neo4j-java-driver seems to be added to the target platform
during a maven build:
 https://gist.github.com/steinarb/35e74c2ecf359e3c77f6446dc546b64f

See eg.
 https://gist.github.com/steinarb/35e74c2ecf359e3c77f6446dc546b64f#file-maven-log-modeler-core-L302
and
 https://gist.github.com/steinarb/35e74c2ecf359e3c77f6446dc546b64f#file-maven-log-modeler-core-L337
and
 https://gist.github.com/steinarb/35e74c2ecf359e3c77f6446dc546b64f#file-maven-log-modeler-core-L562

However adding neo4j to the target platform isn't picked up by the m2e
tycho adapter or made permanent in any way.  The only files that contain
the text neo4j, are the README.org file and the top pom.xml:
 sb@lorenzo:~/workspaces/ws01/modeler$ find . -type f | grep -v ".git" | xargs grep neo4j
 ./README.org:For installing on other systems than debian based GNU/linux systems, see [[https://neo4j.com/docs/operations-manual/current/installation/][the Neo4J documentation]].
 ./README.org:For [[https://neo4j.com/docs/operations-manual/current/installation/linux/debian/#debian-add-repository][installing on debian or ubuntu]], do:
 ./README.org:      wget -O - https://debian.neo4j.org/neotechnology.gpg.key | apt-key add -
 ./README.org:      echo 'deb https://debian.neo4j.org/repo stable/' | tee -a /etc/apt/sources.list.d/neo4j.list
 ./README.org: 2. Install neo4j community edition:
 ./README.org:      echo "neo4j-enterprise neo4j/question select I ACCEPT" | debconf-set-selections
 ./README.org:      echo "neo4j-enterprise neo4j/license note" | debconf-set-selections
 ./README.org:      apt install neo4j=1:3.5.8
 ./pom.xml:            <groupId>org.neo4j.driver</groupId>
 ./pom.xml:            <artifactId>neo4j-java-driver</artifactId>
 sb@lorenzo:~/workspaces/ws01/modeler$

So I'm still unclear of how this is supposed to work...?

There has to be something that fetches and includes the neo4j bundle for
the finished eclipse plug-in.  And I can't see what that something is.

Thanks!

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/tycho-user

Back to the top