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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:14:21+00:00 2026-05-23T22:14:21+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. Can I specify which step of the build the substitution happens?

  • 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-23T22:14:21+00:00Added an answer on May 23, 2026 at 10:14 pm

    In a standard maven build, resource filtering happens at process-resources, which comes before compile, which comes before package. It’s hard to say more without more details about how you have resource filtering set up and how your package is built.

    Edit: It looks like you’re probably generating the R.java file using the android plugin’s generate-sources goal, right? That’s most likely bound to the generate-sources phase. Your strings.xml doesn’t get filtered until the process-resources phase, which comes later in the build. You need to make sure that the android goal runs after the resource filtering happens and that it points at the output strings.xml file, not the source file.

    • 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.