Home » Tag Archives: Apache Maven

Tag Archives: Apache Maven

Getting version string from a Maven based web application

apache-maven-logo

When you package a maven project, it will automatically generate a pom.properties file inside that will contains the version, artifactId and groupId information. These are handy to have and to display for your web application at runtime. One can use a method like following to retrive it. public class Application { private String version; public String getVersion() { if (version ...

Read More »

Java EE, Docker and Maven (Tech Tip #89)

docker-logo

Java EE applications are typically built and packaged using Maven. For example, github.com/javaee-samples/javaee7-docker-maven is a trivial Java EE 7 application and shows the Java EE 7 dependency: <dependencies> <dependency> <groupId>javax</groupId> <artifactId>javaee-api</artifactId> <version>7.0</version> <scope>provided</scope> </dependency> </dependencies> And the two Maven plugins that compiles the source and builds the WAR file: <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> </configuration> </plugin> ...

Read More »

Unit And Integration Test Reports For Maven Projects In SonarQube

apache-maven-logo

Since SonarQube 4.2. the test report isn’t generated by the Sonar Maven Plugin during a Maven build (see SonarQube’s blog post) . Therefore, the test report has to be generated by another plugin before Sonar Maven Plugin collects the information for the SonarQube server. Here, Jacoco Maven Plugin can help. It has the possibility to generate test report that are ...

Read More »

There is a Mojo in My Dojo (How to write a Maven plugin)

apache-maven-logo

I have been up to my armpits involved using Maven at work.  For good number of developers I will hear, “So what.”  The difference is that I normally work in environments where I do not have access to the Internet directly.  So when I say I have been using Maven a lot, it means something. Dependency Hell To be fair, ...

Read More »

Geb Gems: Running Geb Spock tests with Maven

apache-maven-logo

Geb is framework which makes it easy to create functional tests for your application. Since you can use Groovy, Spock and the elegance of the JQuery selector, you can setup solid functional test very easy. In this blogpost we will make a simple test which will test a functional part of the JDriven website. We will start our test with configuring the ...

Read More »

Creating a DSL for AWT’s Robot

apache-maven-logo

The Java SDK ships with the class java.awt.Robot that allows the automation of keyboard and mouse input as well as the creation of screen captures. When you want to write a small test application that simulates user input or you just want to automate the input of some recurring text, this features comes in handy. But you do not want ...

Read More »

Automatic promotion of artifacts to Maven Central from Gradle

apache-maven-logo

Quick tutorial how to promote/release artifacts in a Gradle project to Maven Central, without clicking in the Nexus GUI with Gradle Nexus Staging Plugin. Introduction Maven Central (aka The Central Repository) is (probably) the world’s largest set of open source artifacts used by Java and JVM-based projects. It was founded by the creators of Apache Maven and it has been ...

Read More »

Prevent ‘No plugin found’ in multi-module maven

apache-maven-logo

Defining a maven plugin on a submodule in a multi-module maven project can give us a ‘No plugin found’ error. Especially if we have a multi-module project and we want to apply a maven plugin in only one specific module this error occur pretty often. Let’s say we have a multi-module root pom which looks like this.       ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close