Tuesday, July 15, 2014

Create and configure the commons module in J2ee projects

How to create and configure the commons module in J2EE projects using maven

Step 1:  Create the commons project exampl: velsCommons with all the necessary util classes....

Step 2:  Include the velsCommonsproject as dependency in child projects pom.xml file as below.


     <?xml version="1.0" encoding="UTF-8"?>

       <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org
           /2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0





Step 3: Change your maven settings.xml(<USER_HOME>/.m2/settings.xml) to look for the referenced(commons module) jars in your local repository.

Location of the settings.xml file is C:/Users/<login name>/.m2 in windows...

<?xml version="1.0" encoding="utf-8"?>

Note :  Incase if you are facing any class not found issue (class from commons module is not found) during the child module deployment. Make you have the WAS server publish settings as follows (server publish resources settings).

Choose the option " Run server with resources on Server".

While configuring the maven task  for the common module bamboo plan:

Use below goals for maven task in bamboo plan:   clean deploy

1 comment: