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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:57:49+00:00 2026-06-18T02:57:49+00:00

How can I replace the content of a file just before maven-war-plugin uses it

  • 0

How can I replace the content of a file just before maven-war-plugin uses it to build a war?

the point is:

  • in tomcat started within eclipse and mvn tomcat:run i want to use development configuration. it should be on the classpath (e.g. in resource folder). so the file should be there in all phases up to test, but not during package phase
  • on bamboo, uat, prod server i want this configuration to be removed. it will be provided from classpath
  • but i don’t want to remove the file. we use shared servers so anyone can put file with same name on classpath (by accident e.g. application.properties). so i want this file to be inside war (so spring will not look for it outside of war) but it should be empty.
  • i don’t want to use profiles because i want to have same package working on all environments

so the question is: how can i replace file’s content during (or just before) building war

  • 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-18T02:57:51+00:00Added an answer on June 18, 2026 at 2:57 am

    i found maven replacer plugin it easily allows change file content

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

Sidebar

Related Questions

I was wondering if there is any way that I can replace substrings within
I want to make an ant target that can replace the content of a
I have the following formula: =ArrayFormula(SUM(Morten!$M4:$M400)) How can I replace Morten with the contents
How can replace values as array by replace in javascript. I want done replace
How can replace arabic number with latin number as that doesn't change number into
How i can replace any character except 0-9 a-z and and array of some
so 1GvG:s/..../g can replace over an entire buffer However, suppose I have multiple vim
How i can replace some characters when user type a sentence in EditText? For
I need to know how I can replace the last s from a string
Can I replace the maxlength attribute with something in CSS? <input type='text' id=phone_extension maxlength=4

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.