Category Archives: Development Tools

Solving Eclipse/maven error : dependency/ a.b.c (managed from x.y.z)

If Eclipse/M2E reports a maven dependency version conflict, with message “managed from x.y.z” (ex : “jooq/ 3.7.1 (managed from 3.6.0)“), the conflicting dependency is defined by an ancestor of the current maven project (could be its parent, great-parent, great-great-parent, etc.).

For example, let’s say maven signals a dependency conflict for a spring-boot 1.3 application. Version 3.7.1 of the JOOQ library is used while you specified version 3.6.0 (which is a pain because JAVA 7 is targeted, while JOOQ 3.7.1 only supports JAVA 8).

The error returned by the SpringBoot application is :
[code]
java.lang.UnsupportedClassVersionError: org/jooq/SQLDialect :
Unsupported major.minor version 52.0
[/code]

JOOQ is used by a dependency of the spring-boot application. The main application itself has no reference to JOOQ.

Indeed :

  1. project A declares a maven dependency on JOOQ 3.6.0 :
    [code lang=xml]

    org.jooq
    jooq
    3.6.0

    [/code]
    datawarehouse-jooq-dependency
  2. project B declares a maven dependency on project A, and defines spring-boot-starter-parent as a parent
    In project B dependencies, Eclipse/M2E flags JOOQ as “version 3.7.1 (managed from 3.6.0)” while version 3.6.0 is expected.
    feedbackrestservices-jooq-dependecy
  3. spring-boot-starter-parent has spring-boot-dependencies as a parent, which itself manages dependencies for JOOQ
    spring-boot-dependencies-managed-dependencies-jooq
    [code lang=xml]

    org.jooq
    jooq
    ${jooq.version}

    [/code]

To fix it, you could add a jooq 3.6.0 dependency to project B, so that the maven dependency conflict solving strategy uses this version since it is the nearest dependency. But that would be ugly. A cleaner solution consists in overriding the jooq.version property defined in spring-boot-starter-parent, as documented here :
[code lang=xml] 3.6.0 [/code]

How to compare C++ builder/Delphi DFM binary files with Tortoise SVN ?


With antique versions of Delphi or C++ builder (<= 4), the DFM files – which define the structure of the application forms – are stored as binary files.
Binary files are a hassle because they prevent any batch processing, search, etc… But only with version control do they become a real pain in the ass. Versions can’t be compared, which makes conflict solving almost impossible. And conflicts happen often because Delphi and C++ builder modifiy DFM files for any reason (ex : moving a form around).

If you use Tortoise SVN and strugle with DFM conflicts, here is a solution to automate DFM comparison : Continue reading

Wattpad API requests must contain a valid browser User-Agent header

Recently, I’ve been playing with the Wattpad API. I was interested in collecting stats about the most popular publications.
Wattpad_logo_svg
Even though the API is simple and well documented, all attempts to use it through a python script failed. Requests were rejected with a “403 Access forbidden” HTTP error. My first intuition was that the basic authentication was incorrectly specified, but despite the API samples, I couldn’t figure out what was wrong with it.

Using WireShark to sniff the API sample requests would have helped solving the issue, but since the API only supports https, sniffing wasn’t an option (I later realized that I could have simply disabled https, just to sniff the request, since I didn’t care about the response).

Eventually, the problem came from the User-Agent header. The python script used a default User-Agent, which was rejected by the Wattpad server. Impersonating a legitimate browser (ex : chrome) solved the issue, requests were immediately accepted.

Below is a Python sample.
Continue reading

The 10 Most Popular Issue Trackers

I was looking for an issue tracking/project management software, and stumbled upon this wikipedia page comparing the features of 43 of the most common ones. A bunch of features can be useful, but you won’t care about them if the job can’t be done easily and quickly, or if you fail to install the software and that there’s no one to tell you what you did wrong.

So, I looked for the most popular issue trackers. Continue reading