Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Problem understanding ant syntax

 
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could somebody please explain this syntax to human language, so I can understand what these syntaxes do







I also need to see the native ant syntax and man made variables. Thank you very much.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In all three command, anything that starts with a -D sets a system property, which is a value that can be used within the Ant build script. Doing this is a good way to write a single generalized build script that can handle multiple build task, or build multiple things. It also enables a build on one PC to be easily adapted to another PC where files might be in different locations (that appears to be the case here since the properties are being set to file locations.) For example, this property:

-Dbuild.mods=C:\AmFam_Custom\build\build_mods.xml

sets the build.mods property to the value "C:\AmFam_Custom\build\build_mods.xml". Thus the build will expect to find that file in that location.

The items without a -D are build targets. For example, in the first command PrepareBuildFiles is a target. There will be a <target> directive in the build.xml file that has this name. That is where the build starts.
 
Hendra Kurniawan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
-Dbuild.mods=C:\AmFam_Custom\build\build_mods.xml

and what does build.mods do? what's that? some sort of parameter? is it custom or native?
thank you.
 
Hendra Kurniawan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the ant syntax typed in the console


And this is the snippet .


so the ant syntax in the console will call CreateBuildFiles? yes? thank you
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hendra Kurniawan wrote:and what does build.mods do? what's that? some sort of parameter? is it custom or native?


I have no idea. This is specific that build.xml, it is not something inherent in Ant. You will have to ask the person who created the build.xml what this means.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hendra Kurniawan wrote:so the ant syntax in the console will call CreateBuildFiles? yes?


Yes.

And that in turn will call the CreateBuildFiles in the build/PrepareBuildFiles.xml script.
 
It's exactly the same and completely different as this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic