Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 119047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:35:28+00:00 2026-05-11T03:35:28+00:00

In our infrastructure, we have lots of little Java projects built by Maven2. Each

  • 0

In our infrastructure, we have lots of little Java projects built by Maven2. Each project has its own pom.xml that ultimately inherits from our one company ‘master’ parent pom.

We’ve recently started adding small profiles to our parent pom, disabled by default, that, when enabled, execute a single plugin in a conventional manner.

Examples:

  • The ‘sources‘ profile executes the maven-source-plugin to create the jar of project sources.
  • The ‘clover‘ profile executes the maven-clover2-plugin to generate the Clover report. It also embeds our Clover license file so it need not be re-specified in child projects.
  • The ‘fitnesse‘ profile executes the fitnesse-maven-plugin to run the fitnesse tests associated with the project. It contains the fitnesse server host and port and other information that need not be repeated.

This is being used to specify builds in our CI server like:

mvn test -P clover mvn deploy site-deploy -P fitnesse,sources 

and so on.

So far, this seems to provide a convenient composition of optional features.

However, are there any dangers or pitfalls in continuing on with this approach (obvious or otherwise)? Could this type of functionality be better implemented or expressed in another way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T03:35:28+00:00Added an answer on May 11, 2026 at 3:35 am

    You seem slightly suspicious towards that approach, but you’re not really sure why – after all, it is quite convenient. Anyway, that’s what I feel about it: I don’t really know why, but it seems somewhat odd.

    Let’s consider these two questions: a) what are profiles meant for? b) what are the alternative approaches we should should compare your approach with?

    Regarding a), I think profiles are meant for different build or execution environments. You may depend on locally installed software, where you would use a profile to define the path to the executable in the respective environments. Or you may have profiles for different runtime configurations, such as ‘development’, ‘test’, ‘production’. More about this is found on http://maven.apache.org/guides/mini/guide-building-for-different-environments.html and http://maven.apache.org/guides/introduction/introduction-to-profiles.html.

    As for b), ideas that come to my head:

    1. triggering the plug-ins with command line properties. Such as mvn -Dfitnesse=true deploy. Like the well known -DdownloadSources=true for the eclipse plugin, or -Dmaven.test.skip=true for surefire. But that would require the plugin to have a flag to trigger the execution. Not all the plug-ins you need might have that.
    2. Calling the goals explicitly. You can call several goals on one command line, like ‘mvn clean package war:exploded’. When fitnesse is executed automatically (using the respective profile), it means its execution is bound to a lifecycle phase. That is, whenever that phase in the lifecycle is reached, the plugin is executed. Rather than binding plugin executions to lifecycle phases, you should be able to include the plugin, but only execute it when it is called explicitly. So your call would look like ‘mvn fitnesse:run source:jar deploy’.

    The answer to question a) might explain the ‘oddness’. It is just not what profiles are meant for.

    Therefore, I think alternative 2 could actually be a better approach. Using profiles might become problematic when ‘real’ profiles for different execution or build environments come into play. You would end up with a possibly confusing mixture of profiles, where profiles mean very different things (e.g. ‘test’ would denote an environment while ‘fitnesse’ would denote a goal). If you would just call the goals explicitly, I think that would be very clear and flexible. Remembering the plugin/goal names should not be more difficult that remembering the profile names.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have many projects in my company and every project has its own set
In our infrastructure we have several nodes with different capabilities (in terms of services).
Our application is a Java-GWT application that uses Guice-Persist and Guice-Servlet extensively. We have
Our company produces cross-platform software and we have Bamboo instance which is building projects
Our Django project is getting huge. We have hundreds of apps and use a
We have several modules in our application. I have a project with a group
As our automated test infrastructure grows, we have a need to automatically manage the
Our infrastructure guys have told me that it's not possible to assign SSL Cert.
We are looking to integrate Memcached into our infrastructure, but have a security concern
I've got a somewhat unique problem due to our infrastructure. I have two offline

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.