SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Ant Tutor.
   Jaiyalas
Ant
buildfile
is   XML
• one Project
has   • at least one   (default)   Target
      •   tasks
buildfile (XML)




                      =
                    Project

     Target         Target         Target


Task Task Task     Task Task      Task Task Task
Project
Setup Basic   Properties
               of
        Certain Project


              but not necessary
•name
•default                       as Properties

•basedir

• description                   as Element


           but not necessary
e.g.




       <project name="myPro" default="build" basedir=".">
         <description>This is my first project</description>
         ...
       </project>
Target
has   Attributes
•name
• depends
• if
              }   Condition
• unless
• description
Depends
   and

Condition
e.g.



       2   <target name=”A” />
       1   <target name=”B” />
       3   <target name=”C” depends=”B, A” />

       1   <target name=”A” />
       2   <target name=”B” depends=”A”/>
       3   <target name=”C” depends=”B, A” />
e.g.

       <condition property="myTarget.run">
         <and>
           <available file="foo.txt"/>
           <available file="bar.txt"/>
         </and>
       </condition>



                            =
if( fileExist(foo.txt) && fileExist(bar.txt))
    setProperty(myTarget.run)
e.g.



<target name="myTarget" depends="myTarget.check" if="myTarget.run">
  <echo>Files foo.txt and bar.txt are present.</echo>
</target>

<target name="myTarget.check">
  <condition property="myTarget.run">
     <and>
       <available file="foo.txt"/>
       <available file="bar.txt"/>
     </and>
  </condition>
</target>
Task
Function
dirname                  unjar
         property
echo            fail   javadoc
       javac java jar
checksum delete       move
 copy mkdir chmod    manifest
e.g.




       <property name="betadir" location="${basedir}/beta"/>
       <property name=”alphadir” location=”${betadir}/alpha”>
appendix




           Scala
e.g.
       <property name="scala.dir" location="scala-2.8.0.r18549-b20090823020847"/>
       <property name="scala.lib.dir" location="${scala.dir}/lib"/>

       <path id="project.classpath">
         <pathelement location="${scala.lib.dir}/scala-library.jar"/>
       </path>

       <taskdef resource="scala/tools/ant/antlib.xml">
          <classpath>
             <pathelement location="${scala.lib.dir}/scala-compiler.jar"/>
             <pathelement location="${scala.lib.dir}/scala-library.jar"/>
          </classpath>
       </taskdef>


       <target name="compile">
          <mkdir dir="${cls.build.dir}"/>
          <fsc srcdir="${src.dir}" destdir="${cls.build.dir}" classpathref="project.classpath"
               force="never" deprecation="yes" unchecked="yes">
             <include name="**/*.scala"/>
          </fsc>
       </target>

Weitere ähnliche Inhalte

Was ist angesagt?

AngulrJS Overview
AngulrJS OverviewAngulrJS Overview
AngulrJS OverviewEyal Vardi
 
Render API - Pavel Makhrinsky
Render API - Pavel MakhrinskyRender API - Pavel Makhrinsky
Render API - Pavel MakhrinskyDrupalCampDN
 
jQuery from the very beginning
jQuery from the very beginningjQuery from the very beginning
jQuery from the very beginningAnis Ahmad
 
Jooctrine - Doctrine ORM in Joomla!
Jooctrine - Doctrine ORM in Joomla!Jooctrine - Doctrine ORM in Joomla!
Jooctrine - Doctrine ORM in Joomla!Herman Peeren
 
Let's write secure Drupal code! - DrupalCamp Oslo, 2018
Let's write secure Drupal code! - DrupalCamp Oslo, 2018Let's write secure Drupal code! - DrupalCamp Oslo, 2018
Let's write secure Drupal code! - DrupalCamp Oslo, 2018Balázs Tatár
 
Let's write secure Drupal code! - Drupal Camp Poland 2019
Let's write secure Drupal code! - Drupal Camp Poland 2019Let's write secure Drupal code! - Drupal Camp Poland 2019
Let's write secure Drupal code! - Drupal Camp Poland 2019Balázs Tatár
 
Drupal Development (Part 2)
Drupal Development (Part 2)Drupal Development (Part 2)
Drupal Development (Part 2)Jeff Eaton
 
Filtering data with D2W
Filtering data with D2W Filtering data with D2W
Filtering data with D2W WO Community
 
Drupal 8: Forms
Drupal 8: FormsDrupal 8: Forms
Drupal 8: Formsdrubb
 
AngularJS - $http & $resource Services
AngularJS - $http & $resource ServicesAngularJS - $http & $resource Services
AngularJS - $http & $resource ServicesEyal Vardi
 
JavaScript in Drupal 7: What developers need to know
JavaScript in Drupal 7: What developers need to knowJavaScript in Drupal 7: What developers need to know
JavaScript in Drupal 7: What developers need to knowkatbailey
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuerymanugoel2003
 
JavaScript for Flex Devs
JavaScript for Flex DevsJavaScript for Flex Devs
JavaScript for Flex DevsAaronius
 
Drupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First StepsDrupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First StepsLuís Carneiro
 

Was ist angesagt? (20)

J query1
J query1J query1
J query1
 
AngulrJS Overview
AngulrJS OverviewAngulrJS Overview
AngulrJS Overview
 
J query
J queryJ query
J query
 
Render API - Pavel Makhrinsky
Render API - Pavel MakhrinskyRender API - Pavel Makhrinsky
Render API - Pavel Makhrinsky
 
jQuery from the very beginning
jQuery from the very beginningjQuery from the very beginning
jQuery from the very beginning
 
Jooctrine - Doctrine ORM in Joomla!
Jooctrine - Doctrine ORM in Joomla!Jooctrine - Doctrine ORM in Joomla!
Jooctrine - Doctrine ORM in Joomla!
 
Let's write secure Drupal code! - DrupalCamp Oslo, 2018
Let's write secure Drupal code! - DrupalCamp Oslo, 2018Let's write secure Drupal code! - DrupalCamp Oslo, 2018
Let's write secure Drupal code! - DrupalCamp Oslo, 2018
 
JQuery introduction
JQuery introductionJQuery introduction
JQuery introduction
 
What's new in Django 1.2?
What's new in Django 1.2?What's new in Django 1.2?
What's new in Django 1.2?
 
Let's write secure Drupal code! - Drupal Camp Poland 2019
Let's write secure Drupal code! - Drupal Camp Poland 2019Let's write secure Drupal code! - Drupal Camp Poland 2019
Let's write secure Drupal code! - Drupal Camp Poland 2019
 
Drupal Development (Part 2)
Drupal Development (Part 2)Drupal Development (Part 2)
Drupal Development (Part 2)
 
Filtering data with D2W
Filtering data with D2W Filtering data with D2W
Filtering data with D2W
 
Drupal 8: Forms
Drupal 8: FormsDrupal 8: Forms
Drupal 8: Forms
 
AngularJS - $http & $resource Services
AngularJS - $http & $resource ServicesAngularJS - $http & $resource Services
AngularJS - $http & $resource Services
 
jQuery PPT
jQuery PPTjQuery PPT
jQuery PPT
 
jQuery
jQueryjQuery
jQuery
 
JavaScript in Drupal 7: What developers need to know
JavaScript in Drupal 7: What developers need to knowJavaScript in Drupal 7: What developers need to know
JavaScript in Drupal 7: What developers need to know
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
JavaScript for Flex Devs
JavaScript for Flex DevsJavaScript for Flex Devs
JavaScript for Flex Devs
 
Drupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First StepsDrupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First Steps
 

Andere mochten auch

Program Language - Fall 2013
Program Language - Fall 2013 Program Language - Fall 2013
Program Language - Fall 2013 Yun-Yan Chi
 
for "Parallelizing Multiple Group-by Queries using MapReduce"
for "Parallelizing Multiple Group-by Queries using MapReduce"for "Parallelizing Multiple Group-by Queries using MapReduce"
for "Parallelizing Multiple Group-by Queries using MapReduce"Yun-Yan Chi
 
Genetic programming
Genetic programmingGenetic programming
Genetic programmingYun-Yan Chi
 
Examples for loopless
Examples for looplessExamples for loopless
Examples for looplessYun-Yan Chi
 
Semantic Genetic Programming Tutorial
Semantic Genetic Programming TutorialSemantic Genetic Programming Tutorial
Semantic Genetic Programming TutorialAlbertoMoraglio
 
Machine X Language
Machine X LanguageMachine X Language
Machine X LanguageYun-Yan Chi
 

Andere mochten auch (7)

Program Language - Fall 2013
Program Language - Fall 2013 Program Language - Fall 2013
Program Language - Fall 2013
 
for "Parallelizing Multiple Group-by Queries using MapReduce"
for "Parallelizing Multiple Group-by Queries using MapReduce"for "Parallelizing Multiple Group-by Queries using MapReduce"
for "Parallelizing Multiple Group-by Queries using MapReduce"
 
Genetic programming
Genetic programmingGenetic programming
Genetic programming
 
Examples for loopless
Examples for looplessExamples for loopless
Examples for loopless
 
Insert 2 Merge
Insert 2 MergeInsert 2 Merge
Insert 2 Merge
 
Semantic Genetic Programming Tutorial
Semantic Genetic Programming TutorialSemantic Genetic Programming Tutorial
Semantic Genetic Programming Tutorial
 
Machine X Language
Machine X LanguageMachine X Language
Machine X Language
 

Ähnlich wie Any tutor

Apache ant
Apache antApache ant
Apache antkoniik
 
Ant_quick_guide
Ant_quick_guideAnt_quick_guide
Ant_quick_guideducquoc_vn
 
Introduction to Apache Ant
Introduction to Apache AntIntroduction to Apache Ant
Introduction to Apache AntShih-Hsiang Lin
 
Introduction To Ant
Introduction To AntIntroduction To Ant
Introduction To AntRajesh Kumar
 
Metaprogramovanie #1
Metaprogramovanie #1Metaprogramovanie #1
Metaprogramovanie #1Jano Suchal
 
Using JIRA to build a culture of innovation - Atlassian Summit 2012
Using JIRA to build a culture of innovation - Atlassian Summit 2012Using JIRA to build a culture of innovation - Atlassian Summit 2012
Using JIRA to build a culture of innovation - Atlassian Summit 2012Atlassian
 
Training in Android with Maven
Training in Android with MavenTraining in Android with Maven
Training in Android with MavenArcadian Learning
 
Metaprogramming + Ds Ls
Metaprogramming + Ds LsMetaprogramming + Ds Ls
Metaprogramming + Ds LsArrrrCamp
 
Improving your Gradle builds
Improving your Gradle buildsImproving your Gradle builds
Improving your Gradle buildsPeter Ledbrook
 
Introducing CakeEntity
Introducing CakeEntityIntroducing CakeEntity
Introducing CakeEntityBasuke Suzuki
 
E3 appspresso hands on lab
E3 appspresso hands on labE3 appspresso hands on lab
E3 appspresso hands on labNAVER D2
 
E2 appspresso hands on lab
E2 appspresso hands on labE2 appspresso hands on lab
E2 appspresso hands on labNAVER D2
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overviewYehuda Katz
 

Ähnlich wie Any tutor (20)

Apache ant
Apache antApache ant
Apache ant
 
Ant_quick_guide
Ant_quick_guideAnt_quick_guide
Ant_quick_guide
 
Intro to-ant
Intro to-antIntro to-ant
Intro to-ant
 
Ant
AntAnt
Ant
 
Week3
Week3Week3
Week3
 
Build Scripts
Build ScriptsBuild Scripts
Build Scripts
 
Introduction to Apache Ant
Introduction to Apache AntIntroduction to Apache Ant
Introduction to Apache Ant
 
Introduction To Ant
Introduction To AntIntroduction To Ant
Introduction To Ant
 
Apache ant
Apache antApache ant
Apache ant
 
Metaprogramovanie #1
Metaprogramovanie #1Metaprogramovanie #1
Metaprogramovanie #1
 
Using JIRA to build a culture of innovation - Atlassian Summit 2012
Using JIRA to build a culture of innovation - Atlassian Summit 2012Using JIRA to build a culture of innovation - Atlassian Summit 2012
Using JIRA to build a culture of innovation - Atlassian Summit 2012
 
Jquery 2
Jquery 2Jquery 2
Jquery 2
 
Training in Android with Maven
Training in Android with MavenTraining in Android with Maven
Training in Android with Maven
 
Metaprogramming + Ds Ls
Metaprogramming + Ds LsMetaprogramming + Ds Ls
Metaprogramming + Ds Ls
 
Improving your Gradle builds
Improving your Gradle buildsImproving your Gradle builds
Improving your Gradle builds
 
Introducing CakeEntity
Introducing CakeEntityIntroducing CakeEntity
Introducing CakeEntity
 
Apache Ant
Apache AntApache Ant
Apache Ant
 
E3 appspresso hands on lab
E3 appspresso hands on labE3 appspresso hands on lab
E3 appspresso hands on lab
 
E2 appspresso hands on lab
E2 appspresso hands on labE2 appspresso hands on lab
E2 appspresso hands on lab
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overview
 

Mehr von Yun-Yan Chi

Tezos Taipei Meetup #2 - 15/06/2019
Tezos Taipei Meetup #2 - 15/06/2019Tezos Taipei Meetup #2 - 15/06/2019
Tezos Taipei Meetup #2 - 15/06/2019Yun-Yan Chi
 
Traversing on Algebraic Datatype
Traversing on Algebraic DatatypeTraversing on Algebraic Datatype
Traversing on Algebraic DatatypeYun-Yan Chi
 
Data type a la carte
Data type a la carteData type a la carte
Data type a la carteYun-Yan Chi
 
Paper presentation: The relative distance of key point based iris recognition
Paper presentation: The relative distance of key point based iris recognitionPaper presentation: The relative distance of key point based iris recognition
Paper presentation: The relative distance of key point based iris recognitionYun-Yan Chi
 
Deriving a compiler and interpreter for a Multi-level
Deriving a compiler and interpreter for a Multi-level Deriving a compiler and interpreter for a Multi-level
Deriving a compiler and interpreter for a Multi-level Yun-Yan Chi
 
Number System in Haskell
Number System in Haskell Number System in Haskell
Number System in Haskell Yun-Yan Chi
 
Constructing List Homomorphisms from Proofs
Constructing List Homomorphisms from ProofsConstructing List Homomorphisms from Proofs
Constructing List Homomorphisms from ProofsYun-Yan Chi
 

Mehr von Yun-Yan Chi (7)

Tezos Taipei Meetup #2 - 15/06/2019
Tezos Taipei Meetup #2 - 15/06/2019Tezos Taipei Meetup #2 - 15/06/2019
Tezos Taipei Meetup #2 - 15/06/2019
 
Traversing on Algebraic Datatype
Traversing on Algebraic DatatypeTraversing on Algebraic Datatype
Traversing on Algebraic Datatype
 
Data type a la carte
Data type a la carteData type a la carte
Data type a la carte
 
Paper presentation: The relative distance of key point based iris recognition
Paper presentation: The relative distance of key point based iris recognitionPaper presentation: The relative distance of key point based iris recognition
Paper presentation: The relative distance of key point based iris recognition
 
Deriving a compiler and interpreter for a Multi-level
Deriving a compiler and interpreter for a Multi-level Deriving a compiler and interpreter for a Multi-level
Deriving a compiler and interpreter for a Multi-level
 
Number System in Haskell
Number System in Haskell Number System in Haskell
Number System in Haskell
 
Constructing List Homomorphisms from Proofs
Constructing List Homomorphisms from ProofsConstructing List Homomorphisms from Proofs
Constructing List Homomorphisms from Proofs
 

Any tutor

  • 1. Ant Tutor. Jaiyalas
  • 3. is XML
  • 4. • one Project has • at least one (default) Target • tasks
  • 5. buildfile (XML) = Project Target Target Target Task Task Task Task Task Task Task Task
  • 7. Setup Basic Properties of Certain Project but not necessary
  • 8. •name •default as Properties •basedir • description as Element but not necessary
  • 9. e.g. <project name="myPro" default="build" basedir="."> <description>This is my first project</description> ... </project>
  • 11. has Attributes
  • 12. •name • depends • if } Condition • unless • description
  • 13. Depends and Condition
  • 14. e.g. 2 <target name=”A” /> 1 <target name=”B” /> 3 <target name=”C” depends=”B, A” /> 1 <target name=”A” /> 2 <target name=”B” depends=”A”/> 3 <target name=”C” depends=”B, A” />
  • 15. e.g. <condition property="myTarget.run"> <and> <available file="foo.txt"/> <available file="bar.txt"/> </and> </condition> = if( fileExist(foo.txt) && fileExist(bar.txt)) setProperty(myTarget.run)
  • 16. e.g. <target name="myTarget" depends="myTarget.check" if="myTarget.run"> <echo>Files foo.txt and bar.txt are present.</echo> </target> <target name="myTarget.check"> <condition property="myTarget.run"> <and> <available file="foo.txt"/> <available file="bar.txt"/> </and> </condition> </target>
  • 17. Task
  • 19. dirname unjar property echo fail javadoc javac java jar checksum delete move copy mkdir chmod manifest
  • 20. e.g. <property name="betadir" location="${basedir}/beta"/> <property name=”alphadir” location=”${betadir}/alpha”>
  • 21. appendix Scala
  • 22. e.g. <property name="scala.dir" location="scala-2.8.0.r18549-b20090823020847"/> <property name="scala.lib.dir" location="${scala.dir}/lib"/> <path id="project.classpath"> <pathelement location="${scala.lib.dir}/scala-library.jar"/> </path> <taskdef resource="scala/tools/ant/antlib.xml"> <classpath> <pathelement location="${scala.lib.dir}/scala-compiler.jar"/> <pathelement location="${scala.lib.dir}/scala-library.jar"/> </classpath> </taskdef> <target name="compile"> <mkdir dir="${cls.build.dir}"/> <fsc srcdir="${src.dir}" destdir="${cls.build.dir}" classpathref="project.classpath" force="never" deprecation="yes" unchecked="yes"> <include name="**/*.scala"/> </fsc> </target>