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

  • Home
  • SEARCH
  • 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 7861393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:42:51+00:00 2026-06-02T22:42:51+00:00

I have a lot of maven projects. I have two different global settings.xml for

  • 0

I have a lot of maven projects. I have two different global settings.xml for them which I need to merge. Both of them describes their repositories inside the profiles. I merged the two settings.xml by the mirrors and profiles tags.
One of the profiles is activated by the activeProfile tag in settings.xml file.

I want to ask you, how I can change the active profile in the different projects? Can I select it in the project pom.xml file?

Thanks,
Br, Stristi

  • 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. Editorial Team
    Editorial Team
    2026-06-02T22:42:56+00:00Added an answer on June 2, 2026 at 10:42 pm

    This document describes how profiles can be activated: Introduction to Build Profiles.

    You could activate profiles via environment variables, but if you have many projects, and want to apply profiles per-project basis, then it’s a fault solution to change environment variable before each separate project build execution. If you are working with IDE, you can configure launch configuration to set the property for each project, and you have to configure the correct mvn run command within a continuous integration for each project. However, that would make it impossible to build an aggregated build consisting of different projects that should be activated by different profiles.

    A possible workaround (which doesn’t seem to be elegant, but I’m pretty sure it will work) is activating profiles based on file presence, and managing such ‘marker files’ for different projects to activate the required one. For example:

    <profiles>
      <profile>
        <activation>
          <file>
            <exists>.profile-A</exists>
          </file>
        </activation>
        ...
      </profile>
    </profiles>
    

    Expected behavior: This profile gets activated if file with a name ‘.profile-A’ exists in a root folder of a project.

    However, at this point one more interesting question arises: what would be the behavior in case of aggregated build?

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

Sidebar

Related Questions

I have two different Maven-Based JSF Web Projects (Netbeans and Glassfish) one for admin
Right now, I have two Eclipse projects - they both use Maven 2 for
I have a significant number of Maven projects in Eclipse, with quite a lot
I have a number of Maven pom.xml files in various projects that contain a
I'm looking for applications that have rich maven pom(s) and can show lot of
I have lot of code in my Tornado app which looks like this: @tornado.web.asynchronous
At the moment, I have lot's of Java which does all kind of nifty
I've noticed that a lot of projects have the following structure: Project-A bin lib
I have a deep hierarchy of maven projects. The top level projects are pure
Problem: 20 different JAVA projects with a lot of inter-dependencies. Every time there is

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.