Tips

Automatically update documentation with Github Actions

In some of my projects, I like to provide an accurate documentation. Which means that I want to have examples and documentation up to date. So, when I'm updating a library or a service I'm using in my code, I need to manually find and replace all the text to reflect the changes. This post describes how you can do this automatically using Github Actions, Maven and Dependabot.
2023-01-12
2023-10-23
6 min read
Featured Image

Using Log4J2 with Hibernate 4

I was trying to use Hibernate 4.3.8.Final with Log4J2 and I spent some hours to find why Hibernate was not using Log4J2 though it was declared in my pom.xml file. Actually, I hit issue JBLOGGING-107. The workaround is simply to add a more recent jboss-logging dependency than the one shipped by default with Hibernate 4.3.8.Final. <dependency> <groupId>org.jboss.logging</groupId> <artifactId>jboss-logging</artifactId> <version>3.2.1.Final</version> </dependency>
2015-03-05
1 min read

Utiliser Jetty 7 avec Maven

Jetty peut être très utile aux projets Maven, notamment dans la phase de tests d’intégration. Il faut souvent déployer l’application sur un serveur type JBoss puis lancer les tests. Avec Jetty, on dispose alors d’un conteneur léger qui permet de disposer des fonctionnalités essentielles d’un conteneur (webapp, datasource, …). Problème : avec la version 7 de Jetty, il faut gérer l’authentification. Sinon, on obtient une erreur du type : java.lang.IllegalStateException: No LoginService for org.eclipse.jetty.security.authentication.BasicAuthenticator@4095c5ec in ConstraintSecurityHandler@28f52a14@ J’ai trouvé la solution à ce problème sur le blog de Max Berger.
2010-02-25
1 min read

Problème Jetty / Maven sous Windows

Lorsqu’on souhaite lancer une WebApp avec le plugin Jetty sous Maven 2 depuis un PC sous windows on obtient une erreur référencée sous JIRA #JETTY-1063 : java.net.URISyntaxException: Illegal character in path at index 18: file:/C:/Documents and Settings/USER/.m2/repository/org/mortbay/jetty/jetty-maven-plugin/7.0.0.1beta2/jetty-maven-plugin-7.0.0.1beta2.jar Ce problème n’est résolu que sous Maven 3. Pour ceux qui souhaitent rester sous Maven 2 (Maven 3 est encore en version alpha), il faut modifier l’emplacement de la repository pour éviter le souci du caractère ESPACE présent dans le chemin C:\Documents and settings\USER\.
2010-02-24
1 min read