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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:44:23+00:00 2026-05-29T05:44:23+00:00

What i want : Generate jar file with apps version in name, Ex :

  • 0

What i want :

Generate jar file with apps version in name, Ex : MyApps-1.3_Beta.jar

In my src folder , i have a file named “version.properties” which contain :

…
apps=MyApps
apps.version=1.3_Beta
…

i need to change value of property “dist.jar” to something like this :

dist/${apps}-${apps.version}.jar

build.xml :

<?xml version="1.0" encoding="UTF-8"?>
<project name="MyApps" default="default" basedir=".">
  <description>Builds, tests, and runs the project MyApps.</description>
  <target name="-pre-init">
      <property file="${src.dir}\MyApps\version.properties"/>
      <property name="dist.jar" value="dist/${apps}-${apps.version}.jar" />
   </target>
  <import file="nbproject/build-impl.xml"/>
  <import file="nbproject/profiler-build-impl.xml"/>
  <echo level="info">${dist.jar} instead of dist/${apps}-${apps.version}.jar</echo>
</project>

Echo output :

dist/${apps}-${apps.version}.jar instead of dist/MyApps-1.3_Beta.jar

The problem is that ${…} is not interpreted, and i don’t know why.

I can’t modify “build-impl.xml” because it can be regenerate by Netbeans (When i modify this file (all ${dist.jar}), it works but it’s not a good solution).

How can i change “dist.jar” property ?

NB: it’s not a problem if for change “dist.jar” I’m not using “project.properties”, project name and apps name can be different, but for “dist” folder it will be better to use it

  • 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-29T05:44:24+00:00Added an answer on May 29, 2026 at 5:44 am

    It looks like you’re not reading the properties file you want. Run Ant with the -verbose arg and you may see something like:

    [property] Loading src\MyApps\version.properties
    [property] Unable to find property file: src\MyApps\version.properties
    

    (In the text you say the properties file is in the src directory, but the buildfile is looking for it in src\MyApps.)

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

Sidebar

Related Questions

I want to read log4j.xml file which is outside the jar inside etc folder.
I want to generate random colours which can be attractive in pie charts.I have
I want to generate xml file from Struts action object. So that I have
I want to extract the version number from a file name generated outside of
I am working on a maven project which generate war file. I want to
I want to generate a classpath automatically with all the *.jar files contained under
Let's say I have a class of 30 students and want generate every possible
I want to generate random numbers manually. I know that every language have the
I want to generate a PDF file on server side, and then in response
So I have a Java Project in Eclipse for which I can generate a

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.