You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Julius Hamilton <ju...@gmail.com> on 2021/08/14 11:27:03 UTC

Initial file for Ant

I would like to study the source code for YaCy, a peer to peer open source
search engine. On their GitHub, it details that the tool is built from
source with "ant clean".

I looked through the YaCy project repository but I wasn't able to pick out
which initial file ant would look for to begin a configuration, building
and installation procedure, analogous to the command "make" looking for a
makefile.

Is there a specific file ant looks for? Or does it work a different way?

Thanks very much,
Julius

Re: [External] : Re: Initial file for Ant

Posted by Dave Brosius <da...@oracle.com>.
The project name among other defines a property that can be used throughout the script referenceable by ${ant.project..name}

That Curly syntax Returns the value of the property.

As for ant, the two main items in a file or property definitions and task definitions. Property definitions just sent the value of a property that can be used later. Task definitions map to some piece of java code that executes. Inside of a test definition you have various XML elements that represent Java code. Some of the XML elements are baked into ant but some are user supplied pieces of code. To associate an XML tag, with some Java code of your own oh, you will see a taskdef element.

In this case, Tstamp is a piece of code that will inject the time and date based on a format into a property.

Any XML segments that start with task, can be executed from the command line by doing

ant name

Where name is the name of the tesk
________________________________
From: Julius Hamilton <ju...@gmail.com>
Sent: Saturday, August 14, 2021 10:08 PM
To: Ant Users List <us...@ant.apache.org>
Subject: [External] : Re: Initial file for Ant

Thanks very much.
I am working my way through the docs, and I could also use some additional
support if possible.

I am looking at a build.xml file with some parts such as these:



<project name="YaCy" default="all" basedir=".">
  <description>
      YaCy - a Peer to Peer Web Search Engine
        </description>
  <!--

I was curious, how does Ant use information such as this, for example a
project name? Is this information used in the build?

  <!-- defining the timestamp format -->
    <tstamp>
        <format property="REPL_DATE_FORMAT" pattern="yyyymmdd" />
          </tstamp>

And is this just a way of defining a variable in XML, called "tstamp"?
Which of "format" and "property" are specific xml commands vs. just
attributes being named?

 Thanks very much,
Julius


On Sat, Aug 14, 2021, 14:10 Jaikiran Pai <ja...@apache.org> wrote:

> Hello Julius,
>
> Ant looks for build.xml in the current directory (the directory from
> where you trigger the ant command). More details are available in our
> docs https://urldefense.com/v3/__https://ant.apache.org/manual/index.html__;!!ACWV5N9M2RV99hQ!b_x6VoIQSjoneOAyHAM4JQxn1rl_XR3H3zAK_BkSKfSawRWd19ZWw7fz11dNlBr6bQ$
>
> -Jaikiran
>
> On 14/08/21 5:03 pm, Julius Hamilton wrote:
> > I would like to study the source code for YaCy, a peer to peer open
> source
> > search engine. On their GitHub, it details that the tool is built from
> > source with "ant clean".
> >
> > I looked through the YaCy project repository but I wasn't able to pick
> out
> > which initial file ant would look for to begin a configuration, building
> > and installation procedure, analogous to the command "make" looking for a
> > makefile.
> >
> > Is there a specific file ant looks for? Or does it work a different way?
> >
> > Thanks very much,
> > Julius
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Re: Initial file for Ant

Posted by Julius Hamilton <ju...@gmail.com>.
Thanks very much.
I am working my way through the docs, and I could also use some additional
support if possible.

I am looking at a build.xml file with some parts such as these:



<project name="YaCy" default="all" basedir=".">
  <description>
      YaCy - a Peer to Peer Web Search Engine
        </description>
  <!--

I was curious, how does Ant use information such as this, for example a
project name? Is this information used in the build?

  <!-- defining the timestamp format -->
    <tstamp>
        <format property="REPL_DATE_FORMAT" pattern="yyyymmdd" />
          </tstamp>

And is this just a way of defining a variable in XML, called "tstamp"?
Which of "format" and "property" are specific xml commands vs. just
attributes being named?

 Thanks very much,
Julius


On Sat, Aug 14, 2021, 14:10 Jaikiran Pai <ja...@apache.org> wrote:

> Hello Julius,
>
> Ant looks for build.xml in the current directory (the directory from
> where you trigger the ant command). More details are available in our
> docs https://ant.apache.org/manual/index.html
>
> -Jaikiran
>
> On 14/08/21 5:03 pm, Julius Hamilton wrote:
> > I would like to study the source code for YaCy, a peer to peer open
> source
> > search engine. On their GitHub, it details that the tool is built from
> > source with "ant clean".
> >
> > I looked through the YaCy project repository but I wasn't able to pick
> out
> > which initial file ant would look for to begin a configuration, building
> > and installation procedure, analogous to the command "make" looking for a
> > makefile.
> >
> > Is there a specific file ant looks for? Or does it work a different way?
> >
> > Thanks very much,
> > Julius
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Re: Initial file for Ant

Posted by Jaikiran Pai <ja...@apache.org>.
Hello Julius,

Ant looks for build.xml in the current directory (the directory from 
where you trigger the ant command). More details are available in our 
docs https://ant.apache.org/manual/index.html

-Jaikiran

On 14/08/21 5:03 pm, Julius Hamilton wrote:
> I would like to study the source code for YaCy, a peer to peer open source
> search engine. On their GitHub, it details that the tool is built from
> source with "ant clean".
>
> I looked through the YaCy project repository but I wasn't able to pick out
> which initial file ant would look for to begin a configuration, building
> and installation procedure, analogous to the command "make" looking for a
> makefile.
>
> Is there a specific file ant looks for? Or does it work a different way?
>
> Thanks very much,
> Julius
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Initial file for Ant

Posted by Julius Hamilton <ju...@gmail.com>.
I would like to study the source code for YaCy, a peer to peer open source
search engine. On their GitHub, it details that the tool is built from
source with "ant clean".

I looked through the YaCy project repository but I wasn't able to pick out
which initial file ant would look for to begin a configuration, building
and installation procedure, analogous to the command "make" looking for a
makefile.

Is there a specific file ant looks for? Or does it work a different way?

Thanks very much,
Julius