|[tycho-user] Need help replacing "hard-stored" jars with maven dependencies|
The current state of the build is fine, but I discovered an issue that I have to fix, and I'm having lots of trouble with it.
If it matters, you can see the existing state of the code at https://github.com/davidmichaelkarr/yang-ide.git (branch "forkmaster").
I discovered that one of the modules has a "lib" folder with a handful of stored jars. I have to remove these jars and replace this with declarative dependencies. I noticed that the "slf4j" jar is available in the Eclipse p2 repo, so that should be easy to replace. The others are harder. The two "yang" artifacts are available in a public maven repo that I can reach. The "mapdb" and "antlr4" artifacts are available on Maven Central.
I understand that a single "reactor build" can either get p2 dependencies, or Maven dependencies, but not both in the same build. I assume a "reactor build" corresponds to a single project defined by a "pom.xml" file. I would also assume that a single "reactor build" could be part of a multi-module build, where the other modules only get p2 dependencies.
I've gotten other feedback on this problem, like "this is supposed to be possible, but I never got it to work".
I've gotten some help on this problem from the eclipse-dev mailing list (I only just now discovered tycho-user), which is how I found the following page: https://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts . I noted on the eclipse-dev mailing list some issues with this page that indicate it is somewhat out of date.
From this advice, I added a new module that just references the jars with Maven GAV coords and with a manifest that exports the required packages. This seems to build by itself, but I don't know if this is what I need.
There are still issues that I don't understand. I posted the following on the Eclipse forum that illustrates my current problems: https://www.eclipse.org/forums/index.php/t/1074071/ .
I see the "(out of sync)" thing with an error marker when I try to add the new module as a dependency of the original module that had the "lib" folder. Someone else saw the same thing several years ago (referenced in the posting), but the "simple" fix hasn't made a difference.
I also see the build failing, as it's not able to find the new module. I don't know if this is related to the "(out of sync)" problem, or something independent.
Some people have said that perhaps I need to add the new module to my target platform. I'm not convinced that makes any sense. Another of my existing plugins references two of the other existing plugins as dependencies. I would think that would be what I need here, as opposed to changing the target platform. In any case, I tried seeing how to add this new module to the target platform, but I don't see a way to do that.
Back to the top