I am working with an eclipse product where we use a combination of a maven/tycho build system and OSGI: Equinox to build our product. I was wondering if there was a dedicated p2 repository for the flyway-core jar file?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There isn’t.
But you can add it as a pom dependency in an eclipse-repository project or a deployable feature project. Both of these project types build P2 repositories. You can then add that repository to your target platform.
I wrote a more general answer to the question of using third-party bundles with Tycho here.
Incidentally, I found that flyway-core 2.0.3 doesn’t work very well in an OSGi container, and specifically Eclipse. For example, it uses the TCCL (thread context class loader) for finding both your migrations and its internal scripts. I couldn’t find a way to get it to work without creating a URLClassLoader configured with the URL of my bundle with the migrations, and the URL of the flyway-core bundle. Logging is also difficult to configure in a robust way that can’t affect other OSGi bundles, because of the use of commons-logging.
My impression is that flyway is more effort than it’s worth in an OSGi environment right now. I’ve seen these issues reported on the Google Code project. It looks like the class-loading issue might get fixed, but logging isn’t accepted as a problem.