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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:52:37+00:00 2026-05-23T20:52:37+00:00

I am using Maven (3.x) to build an Android application within Hudson. I use

  • 0

I am using Maven (3.x) to build an Android application within Hudson. I use filtering/profiles to do text substition of the strings.xml file as part of the build.

So within the strings.xml, I will have entries such as:

<string name="app_name">${app_name}</string>

Within the pom.xml file, I have profile entries:

<profiles>
<profile>
    <id>local</id>
    <properties>
        <app_env>local</app_env>
        <app_name>Acme-loc</app_name>
    </properties>
</profile>  
<profile>
    <id>dev</id>
    <properties>
        <app_env>dev</app_env>
        <app_name>Acme-dev</app_name>
    </properties>
</profile>      
....

When I look inside the *.apk, the strings.xml file is substituted correctly. However, when installed in device, I see ${app_name} which leads me to believe that the substitution is happening after the compile of app (the R file is compiled before the substition). Has anyone used this approach successully and if so, how are you specifying which step of the build the substitution happens so that the substitution happens before the R file is compiled? Is there a better alternative to Maven filtering to achieve what I am looking for?

  • 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-05-23T20:52:38+00:00Added an answer on May 23, 2026 at 8:52 pm

    Either configure the maven-resources-plugin to fire in the generate sources phase, or use maven-replacer-plugin to do the replacement (which allows you to execute in any phase you wish).

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

Sidebar

Related Questions

I am using Maven (3.x) to build an Android application within Hudson. I use
I'm using the Maven Android Plugin to build my application. Actually, I'm building 3
I'm trying to build my application for GoogleAppEngine using maven. I've added the following
I'm using Hudson and Maven 2 for my automated build/CI. I can build fine
Unit test is in Java, using Maven to build & run. I can use
I'm trying to create an Android application in Eclipse using the Maven plugin and
I use Maven 3 to manage the build and release cycle of my Android
Im using maven to build a multi module project. But some projects are in
We are using Maven for a large build process (> 100 modules). We have
I'm using Maven in the context of another build-tool (leiningen for Clojure, but this

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.