Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Apache Maven Cookbook
  • Toc
  • feedback
Apache Maven Cookbook

Apache Maven Cookbook

By : Raghuram Bharathan
4.2 (5)
close
Apache Maven Cookbook

Apache Maven Cookbook

4.2 (5)
By: Raghuram Bharathan

Overview of this book

If you are a Java developer or a manager who has experience with Apache Maven and want to extend your knowledge, then this is the ideal book for you. Apache Maven Cookbook is for those who want to learn how Apache Maven can be used for build automation. It is also meant for those familiar with Apache Maven, but want to understand the finer nuances of Maven and solve specific problems.
Table of Contents (13 chapters)
close
12
Index

Selectively building modules


When a project has a number of modules, there may be situations when we might want to selectively build modules. One such situation could be because the module might run only on specific machines. Another reason could be that a module may have long-running tests that may make sense only in test servers.

Let us see how we can selectively build modules by using the profile feature of Maven.

How to do it...

  1. Open a multi-module project that has two modules (two-multi-module), namely common-one and dev-two.

  2. In the parent pom, add one project to the modules section:

      <modules>
          <module>common-one</module>
      </modules>
  3. Define a profile and include both modules:

    <profiles>
          <profile>
              <id>dev</id>
              <modules>
                  <module>common-one</module>
                  <module>dev-two</module>
              </modules>
          </profile>
      </profiles>
  4. Run the Maven...

bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete