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 8653237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:29:44+00:00 2026-06-12T14:29:44+00:00

in Eclipse, i have a MVN project A that depends on mvn project B-C-D

  • 0

in Eclipse,
i have a MVN project A that depends on mvn project B-C-D

Project B contains a mysettings.xml in wich I have a property like this:
<iduser>${my.iduser}</iduser>

I have a maven profile called “deployment” that sets the iduser prop. to “ADMIN”.
When I launch a maven clean package specifying “deployment” profile, in mysettings.xml I find <iduser>ADMIN</iduser>

I then created a new profile called “mytest” that sets that property to “TESTUSER”.

If I call mvn -Dtest=MyClassTest -P mytest on project C, seems like maven does not replace ${my.iduser} in project B mysettings.xml file.

Does anyone know how to get this running in test phase?
Thanks

  • 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-12T14:29:45+00:00Added an answer on June 12, 2026 at 2:29 pm

    Maven won’t do what you’re hoping for. The mysettings.xml file will get put into Project B’s jar file using whatever profile you specified when you built Project B, and the ${my.iduser} placeholder will be gone (filtered out). It won’t come from project B’s source directory.

    I’ve never found a satisfactory way to do this with Maven. If mysettings.xml is a Spring config file, you can use the PropertySourcesPlaceholderConfigurer at runtime, rather than Maven filtering at build time.

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

Sidebar

Related Questions

I have several Maven projects in eclipse that depends on each other. Some of
I have a maven web project that imported into eclipse. I have another maven
I have a Maven project that so far used to compile without problems. Today,
I have a multi-module Maven project that is a Java web application. I am
I have a project (built from an AppFuse template) that requires Maven 2.2.1. So
Eclipse Helios: 40+ project working set, using maven (mvn-eclipse plugin) to generate eclipse project
I've got an Eclipse Maven project for spring-data-jpa and QueryDsl. I seem to have
I have an Android Maven project using maven-eclipse-plugin and android-maven-plugin. Since it grabs the
In my project, I have a resources directory ( src/main/resources ) that contains properties
I have a maven pom file for an open source project. This pom file

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.