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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:22:05+00:00 2026-06-11T04:22:05+00:00

My requirments are as follow : – we are having four environments(dev,uat,prod,stag) – currently

  • 0

My requirments are as follow :
– we are having four environments(dev,uat,prod,stag)
– currently we are having 5 property files(log4j.properties for example) one for each
environment like : log4j_dev.properties, log4j_uat.properties, log4j_prod.properties, log4j_stag.properties
– all the above files have most of the things in common, just some 4 to 5 properties are different in each file.

my current requirments is that we have to put all the properites in a common file(log4j.properties for example ) and the environment specific file would contain only
the specific 4 to 5 property . during build time these files should be merged and a new file should be created containing all these properties .

I tried maven-config-processor-plugin thats working fine with mavne 2 , but its not compatible with maven3 . Currently we are using maven3 so i need some alternative approach .
Is there any alternative to maven config-processor or i need to write some new maven plugin for doing so .

Any suggestions plz .

  • 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-11T04:22:06+00:00Added an answer on June 11, 2026 at 4:22 am

    Have you tried to use maven-resources-plugin and the filtering option on resources

    Here is an example :

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.4.3</version>
        <executions>
        <execution>
            <id>copy-resources</id>
            <phase>validate</phase>
            <goals>
                <goal>copy-resources</goal>
            </goals>
            <configuration>
                <filters>
                    <filter>src/main/filters/${target.filter}.properties</filter>
                </filters>
                <resources>          
                    <resource>
                        <directory>src/main/resources</directory>
                        <filtering>true</filtering>
                    </resource>
                    <resource>
                        <directory>src/test/resources</directory>
                        <filtering>true</filtering>
                    </resource>
                </resources>              
            </configuration>            
            </execution>
        </executions>
    </plugin>
    

    Then you have a directory src/main/filters. For each of your environment you add a filter_env.properties.
    In it, you put your key you want to variabilize, like this

    ys.client.service.port=8511
    ys.client.service.url=http://localhost/yoda-client/service/yoda
    ys.env=dev
    

    And finally, in your properties file, you add variables instead of real values. The plugin will replace values with the filters ones :

    ys.client.service.port=${ys.client.service.port}
    ys.client.service.url=${ys.client.service.url}
    ys.environment=${ys.env}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a problem getting my android dev environment setup in Windows 7. I
We are currently building architecture for thin-client bookkeeping application. It should follow two main
I have a requirement to return xml as follow <row id=1> <cell>1</cell> <cell>setup/pagemst</cell> <cell>Page
I follow the C family (PHP is a wannabe!) requirement that a statement that
I recently shifted to a new organization that follow Agile mode of development. The
First of all, this is a follow-up question to Should I use WCF or
This is something of a follow up from a previous question . The requirements
I want to understand class files and inner/nested classes a bit better and I'm
Currently my Django project has a huge readme doc, that any developer, whishing to
I've got a passthrough NDIS intermediate driver, consisting of two .inf files (one standard

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.