Blog Archives

♥ Creating a Maven profile to compile using a different JDK version tutorial

Profiles are very handy in maven to use different JDK versions, include different files for different environments, etc.

Step 1: Say you have a pom.xml file using Java 7 to compile.

Step 2: Say now you want to compile using Java 1.5.

Read more ›

Tags:

20+ Maven plugins listed for an enterprise Java (i.e. a JEE) project

In Maven, there are build and the reporting plugins. Build plugins will be executed during the build, and they should be configured in the “build” element.

What is a “Plugin Architecture”?

In this architecture, a core application defines an interface,

Read more ›



Maven assembly & Shade plugins examples & uber jar creation

Maven assembly plugin is primarily intended to allow users to aggregate the project output along with its dependencies, modules, site documentation, and other files into a single distribution archive like zip, tar, tar.gz, war, etc. Another example where this is handy is to create deployable files for different environments like myapp-1.10-SNAPSHOT-dev.zip,

Read more ›



Maven assembly plugin examples

This extends the Maven assembly plugin with additional examples to create an assembly by controlling what artifacts get included in the archive.

Example 1: dev-assembly.xml

The datasource and properties files are packaged for DEV environment.

Example 2: dev-assembly.xml

Control what maven dependency jars and class files are included in the archive.

Read more ›



Part 1: Creating an empty multi module maven project structure

Enterprise projects will have multi maven modules.

Step 1: Create simple-app-parent is a package of type “pom”

press “Y” for all the questions.

Step 2: cd into your newly created root dir “simple-app-parent”

Step 3: Create a child module “simple-app-service”,

Read more ›



Part 2- Adding dependency jars to multi-module MVN project

This extends Part 1: Creating an empty multi module maven project structure.

Dependency Management allows you to consolidate and centralize the management of dependency versions without adding dependencies which are inherited by all children. The dependencyManagement control the versions of artifacts used in transitive dependencies.

Read more ›



Part 3- Adding plugins to multi-module MVN project to perform specific tasks

This extends Part 1: Creating an empty multi module maven project structure and Part 2- Adding dependency jars to multi-module MVN project. The “pluginManagement” defines the settings for plugins that will be inherited by modules in your build. Let’s define the jaxb2 plugin in the parent pom file “simple-app-parent/pom.xml”

Read more ›



By topics – 800+ Q&As ♥ Free ♦ FAQ

open all | close all

Java 200+ FAQs – Quick Brushup

open all | close all

100+ Java Tutorials step by step

open all | close all

13+ Tech Key Areas to standout

open all | close all

Java coding exercises

open all | close all
Top