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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:56:59+00:00 2026-05-30T22:56:59+00:00

I am using an external builder feature in eclipse to call a bash script

  • 0

I am using an external builder feature in eclipse to call a bash script that will autogenerate BuildInfo.java class for my project (I’ve looked here on stackoverflow for a way to embed git-describe and date into an eclipse (non-ant!) build, but couldn’t find any), my the script looks like this:

#!/bin/bash

VERSION=$(git describe --tag)
DATE=$(date "+%Y-%m-%d")
TIME=$(date "+%H:%M")

echo "Version $VERSION, built on $DATE $TIME"

cat > src/com/bla/bla/BuildInfo.java <<DELIM
package com.bla.bla;

// Auto-generated, triggered by project build
public class BuildInfo {
    public static String version = new String("$VERSION");
    public static String date = new String("$DATE");
    public static String time = new String("$TIME");
}
DELIM

I configure the external builder to execute every build (even automatic ones) before the java/android builders. This scheme indeed works fine when I do full project clean, however when I update another file, even though Eclipse does execute my external builder, and BuildInfo class is indeed being regenerated, Eclipse still uses old cached version of the class for the final result, so I see old info, which can sometimes be worse than not having build info at all.

Do you have any idea how I can tell Eclipse this file is generated and it shouldn’t cache it at all, but load it from the disc after my external builder is done and before java builder? Is there any other elegant solution to get that data into the build?

Thank you!

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

    In Eclipse you can specify the resources that have changed after a custom built-tool ran.

    Go to your built-tool select Edit switch to the Refresh-Tab.
    Select Refresh resources upon completion, Specific resources… and add your auto-generated BuildInfo.java.

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

Sidebar

Related Questions

I am using the Eclipse CDT. I have configured the external Builder and I
I'm using Flash Builder 4.6 (Eclipse 3.7) and Git (eGit plugin). My project has
How do i pass three arguments using external interface in flash to a java
In my application I'm using an external library (Batik 1.7) that is made up
I have a need to create a transactional process using an external API that
I have issues to build a project using external libraries with Visual Studio 2010
In a project I'm working with we're using external services exposed by SOAP. In
I've been using Eclipse Classic with the ColdFusion Builder 2 Plug-ins and I was
I'm using git to track a project I'm developing in Flash Builder, and I'm
Im using Eclipse 3.4, EclipseMe 1.7.9. Im trying to deploy/create package a simple project

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.