Inserting an image from local directory in thymeleaf spring framework (with maven)

I want you to look into the Thymeleaf’s documentation of Standard URL Syntax and specifically the context-relative and server-relative url patterns. Context-relative URL: If you want to link resources inside your webapp then you should use context relative urls. These are URLs which are supposed to be relative to the web application root once it … Read more

Maven error in eclipse (pom.xml) : Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4

You need just to follow those steps: Right Click on your project: Run (As) -> Maven clean Right Click on your project: Run (As) -> Maven install After which, if the build fails when you do Maven Install, it means there is no web.xml file under WEB-INF or some problem associated with it. it really … Read more

–add-modules only on compilation [duplicate]

I made this answer a while ago where I answered this as an additional info to exposing non packages in Java-9 using Maven. The added part specifically focusses on using the standalone version of the java.xml.* APIs. To adapt to which you can probably start consuming the dependency on jaxb-api:2.3.0 which can be loaded … Read more

Parent pom and microservices

The ‘problem’ with a multi-module parent pom is that, without complicated profiles, it locks the modules in the same release cycle (assuming you’re using the Release Plugin, which you should be). The way I work with Maven is to have a parent pom that declares: common dependencies (logging APIs, JUnit, etc). common plugins. all dependencies … Read more

Is it possible to speed up maven artifacts downloading?

I know its an old question, but stumbled here from Google. I already had proxy in place, just needed to speed up with concurrent downloads. You can using mvn option: -Dmaven.artifact.threads=30 Source: Configuring Parallel Artifact Resolution By default, Maven 2.1.0+ will download up to 5 artifacts (from different groups) at once. To change the … Read more

java.lang.ClassNotFoundException: org.apache.jsp.index_jsp

It’s been a while since I posted this, but I thought I would show how I figured it out (as best as I recall now). I did a Maven dependency tree to find dependency conflicts, and I removed all conflicts with exclusions in dependencies, e.g.: <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging-api</artifactId> <version>1.1</version> <exclusions> <exclusion> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> </exclusion> </exclusions> … Read more

How to pass java code a parameter from maven for testing

This is the exact thing I was looking for my automation test and I got it working. Command Line argument mvn clean test -Denv.USER=UAT -Dgroups=Sniff My Pom Xml <?xml version=”1.0″ encoding=”UTF-8″?> <project xmlns=”″ xmlns:xsi=”” xsi:schemaLocation=””> <modelVersion>4.0.0</modelVersion> <groupId>TestNg</groupId> <artifactId>TestNg</artifactId> <version>1.0</version> <dependencies> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>6.8</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.12.4</version> <configuration> … Read more