Creating New Projects and Modules

Creating New Projects and Modules

In addition to the parent POM, the java-parent-project contains bash scripts for creating new monolithic and multi-module project as well as adding new modules to a multi-module project.

To use these scripts, you'll need to have java-parent-project checked out.

These tools are only meant to be used by Shibboleth developers.

Creating a New Monolithic Project

To create a monolithic project, execute the following command from the directory in which you wish the project to be created. Do not create any directory structure related to the project, the script will take care of all of it.

1 java-parent-project/bin/create-project-monolithic.sh

This script will prompt for the SVN URL to which the project will be committed and the name Maven group ID for the project. Note, the string after the last '/' in the URL becomes the projects ID. So, for example, an SVN URL of https://svn.shibboleth.net/extensions/my-project will have a project ID of my-project.

Once completed you'll end up with a project named for the group ID that is under SVN control and contains all the Eclipse configurations and a skeletal POM file that properly inherits from the parent POM.

Creating a New Multi-module Project

To create a monolithic project, execute the following command from the directory in which you wish the project to be created. Do not create any directory structure related to the project, the script will take care of all of it.

1 java-parent-project/bin/create-project-multimodule.sh

This script will prompt for the SVN URL to which the project will be committed and the name Maven group ID for the project. Note, the string after the last '/' in the URL becomes the projects ID. So, for example, an SVN URL of https://svn.shibboleth.net/extensions/my-project will have a project ID of my-project.

Once completed you'll end up with a project named for the project ID that is under SVN control. It will contain a parent project directory with proper Maven and Eclipse settings, a skeletal POM that properly inherits from the Shibboleth Parent POM, a template for per-module POM files.

Add a New Module to a Project

To add a new module to a project, execute the following script in the top level directory of the project (i.e. within the directory that contains the *-parent directory).

1 java-parent-project/bin/add-module.sh

This script will prompt for the maven artifact ID for the module.

Once the script has completed you'll end up with a directory named with the maven artifact ID that contains the properly Maven and Eclipse configuration files and a skeletal POM file that properly inherits from the project's parent POM file. You will then need to add the new module to the list of project modules within the project's parent POM once you're ready for it to be built when the full project is built.