How to maintain a maven project with quartz-1.8.6 and quartz-2.x? - maven-2

I need to use both quartz-1.8.6 and quartz-2.x.x dependencies in the same maven 3 project.
The reason for keeping 1.8.6 is that it's used by a large amount of code and new features are considered to written in spring, and in this case quartz-2.x come into play.
So the question is: how can I keep both these dependencies in the same project ? Maybe add some exclusions?

do you really need to use both of them at the same time
generally the classes may be deprecated. but usage will still be allowed.
You see whole idea of using maven is to avoid multiple jar of same API.
I will suggest code changes and completely using quartz 2.x API.
I was getting similar issue when I used lucene and was switching from 2.2 to 2.8/3, there were not just deprecated methods but many lucene classes were removed i the 2.8 API. I still ended in upgrading the API than using duplicate dependent jars

Related

How to use Kotlin in a library without forcing consumers to take Kotlin Stdlib as a dependency?

I am working on a Java-based library, and I'd like to start using Kotlin. However, there are over 10k known direct consumers, and I don't want to introduce a new dependency to all of the consumers.
For consumers that are already using Kotlin, I especially don't want to force them to upgrade or downgrade their Kotlin Stdlib version in order to use the latest version of the library, or introduce a classpath conflict of any sort.
Is it possible to use Kotlin in a way that doesn't "export" a new dependency to all of the library consumers?
My question is similar to
Using Kotlin libraries as dependencies in a Java project, but it (a) does not have an accepted answer, and (b) is trying to completely hide the existence of Kotlin types from Java consumers whereas I'm just trying to avoid causing any conflicting dependency requirements.
I'm currently using Maven, but wanting to switch to Gradle. A solution that works for Maven or Gradle is acceptable since using Kotlin is of greater importance than using a particular build system.
I ask the above question to avoid posing an XY Problem. My theoretical solution is to shade/relocate a specific version of the Kotlin Stdlib—but is it even possible, given that the Kotlin Stdlib seems to have some special treatment in the Kotlin compiler?
There is almost an exact match of this question on the Kotlinlang discussion board (What is the proper way to repackage/shade Kotlin dependencies), but it also does not have an answer.

Another instance of symfony2 for API

I'm developing medium/large project and currently I will have to write API for it.
Project is currently on 2.2.11 because it don't need to be on the newest version and because of many installed modules it's hard to not crash something or module integrity can be broken.
I have found symfony rest edition https://github.com/gimler/symfony-rest-edition which looks pretty nice. The question is, installing another instance of symfony2 (with DB from my project) only for API is good practise? Or doing it in my current symfony instance is better option?
It's not bad, many instances can be plugged to the same DB.
As you will share entities between those 2 instances, you should isolate them in a bundle that is embedded by the 2 instances, and versioned apart each instance. So that entities and repositories are shared and synchronized between the 2 projects.
You should check out dependencies of the symfony-rest-edition and try requiring them in your project. It's quite possible that you can get most of the components in one project, without having to duplicate code or adding deployment stages.
For example, the master branch of FOSRestBundle supports Symfony ~2.2, see composer.json.
And globally, having duplicate code is not good. It's better to have everything in one project rather than dividing it. What if you'd have to change an entity or introduce new business logic? You'd have to make the change in two projects instead of one, or subdividing the codebase.

Adding an SQL extension to a precompiled Lua 5.2 project

I have looked into at least 6 different SQL Lua extensions, and they all seem to have their latest version compatible with up to version 5.1 of Lua. I have had zero success in implementing any of them into my current project which uses Lua 5.2, with the best case scenario ending in either silent program crashes or attempt to call global 'module' (a nil value).
I am not the original project owner, so I am trying not to be forced into changing the source code for it (though more recently, I have even gone down that road now).
And often times, it is unclear if these crashes are related to the way the project itself operates, the way the project implements Lua (as a static library), the way that Lua tries to implement it's extensions, the way the extensions implement their dependencies, a versioning conflict, or some sort of crazy combination of each. It's practically impossible to debug a silent crash in this manner, because the source of evil could literally be anything.
As the answer states in this question, I have even tried supporting the module function (which most lua sql extensions utilize, but was deprecated in 5.2), but the program still crashes or just complains about a seemingly infinite amount of missing dependencies. And after spending hours of tracking down (what would seem to be) all of the dependencies it would complain about, it still crashes.
Changing the project's source code to use the Lua 5.1 source appears to break the functionality of the project, resulting in various compiler errors regarding missing 5.2-related functions. Linking the MySQL C/C++ connector to the project results in rather vague runtime errors, which seem to conflict with the way the project implements Lua 5.2.
Are there ANY sqlite/MySQL extensions out there which actually work with Lua 5.2 on a 32-bit Windows machine? Preferably, "out-of-the-box" precompiled binaries with Lua source/ffi bindings?
OR alternatively, are there any clear instructions on how to get this set up properly, without having to scavenge through separate instructions across the web for each required assembly?

Is there a Maven plugin to generate AS3 classes from Java for BlazeDS?

I'm looking for a maven plugin that would generate ActionScript3 classes from Java classes in order to access them by object remoting.
I've seen FlexMojo but it uses the GraniteDS generator which create some problems when it comes to map Enum objects (which can be fix through a workaround that is describe here : http://dev.c-ware.de/confluence/display/PUBLIC/Flexmojos+generated+AS3+model+with+Enum+support+using+BlazeDS?focusedCommentId=7634946&#comment-7634946 if you've googled your way here this might be useful) when working with BlazeDS.
Everything that I found so far are people who explain how to generate VO classes on flex side using Flash Builder 4, but this solution can not be used in an industrial development environment.
Take a look also on http://flex-annotations.aixcept.net/examples/actionscript.html
I also found this one, and while it is not a maven plug-in it could possibly be turned into one:
https://sourceforge.net/projects/cleartoolkit/
It was created by the guys who authored the book "Enterprise Development with Flex". Look for the utility DTO2Fx.

LinFu version in NHibernate 2.1

I'm migrating the data layer of our application to NH version 2.1.0 (from 2.0.1) and noticed the use of LinFu. I discovered that framework and want to use it in other pieces of the application, especially I want to use the LinFu.Reflection.dll, which requires a reference to LinFu.DynamicProxy and here comes the trouble, the 1.0 final version of LinFu that I can find on google.code is not the same version used by NHibernate itself. Do I need to rebuild NHibernate.ByteCode.LinFu.dll changing the reference to the available version? If not, what else?
I have faced the same problem a few days ago. There's a tool named ILMERGE that merges .NET DLL-files, and that way you should be able to have several versions of the same DLL in your application.
Unfortunately I haven't tested the tool yet, I didn't get around to it, but I'll test in the next week.
But Rhino Mocks for example, has a binary with all dependencies included: http://ayende.com/projects/rhino-mocks/downloads.aspx, so it seems doable.