{"id":1892,"date":"2017-12-06T10:19:18","date_gmt":"2017-12-06T10:19:18","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=1892"},"modified":"2021-02-27T09:30:36","modified_gmt":"2021-02-27T09:30:36","slug":"sample-apache-ant-assignment-try-it-out","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/sample-apache-ant-assignment-try-it-out\/","title":{"rendered":"Sample Apache ant assignment &#8211; try it out"},"content":{"rendered":"<p><strong>rajeshkumar created the topic: Sample Apache ant assignment &#8211; try it out<\/strong><br \/>\nClone the prject- <a href=\"http:\/\/github.com\/scmgalaxy\/helloworld-java-ant\">github.com\/scmgalaxy\/helloworld-java-ant<\/a> <\/p>\n<p>Duplicate 10 source file from HelloWorld.java<br \/>\nCreate a directory called &#8220;mybuild&#8221;<br \/>\nClean all 10 java class files if exist<br \/>\ncompile only 5 java files<br \/>\nCopy rest 5 files under folder called &#8220;no-need-to-compile&#8221;<br \/>\ncreate package of jar \/ war of the compiled files<br \/>\nNote: must use echo in all programs<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\">twitter.com\/RajeshKumarIn<\/a><\/p>\n<p><strong>crystal2904 replied the topic: Sample Apache ant assignment &#8211; try it out<\/strong>\n<project name=\"MyProject\" basedir=\".\" default=\"package\">\n<property name=\"src.dir\" value=\"src\"\/>\n<property name=\"build.dir\" value=\"mybuild\"\/>\n<property name=\"classes.dir\" value=\"${build.dir}\/classes\"\/>\n<property name=\"jar.dir\" value=\"${build.dir}\/jar\"\/>\n<property name=\"no-need-to-compile\" value=\"${build.dir}\/no-need-to-compile\" \/>\n<p><target name=\"clean\"><br \/>\n<echo message=\"We are in cleaning target.........\"\/><br \/>\n<delete dir=\"${build.dir}\"\/><br \/>\n<echo message=\"Cleaning is done...\"\t\/><br \/>\n<\/target><\/p>\n<p><target name=\"compile\" depends=\"clean\"><br \/>\n<echo message=\"Its time to compile only 5 files.... start Compiling\" \/><br \/>\n<mkdir dir=\"${classes.dir}\"\/><br \/>\n<javac includeantruntime=\"false\" srcdir=\"${src.dir}\" destdir=\"${classes.dir}\" ><br \/>\n<include name=\"HelloWorld.java\" \/><br \/>\n<include name=\"HelloWorld1.java\" \/><br \/>\n<include name=\"HelloWorld2.java\" \/><br \/>\n<include name=\"HelloWorld3.java\" \/><br \/>\n<include name=\"HelloWorld4.java\" \/><br \/>\n<\/javac><br \/>\n<echo message=\"Compiled.....\"\/><br \/>\n<\/target><\/p>\n<p><target name=\"mkdir\" depends=\"compile\"><br \/>\n<echo message=\"First Creating the directory\" \/><br \/>\n<mkdir dir=\"${no-need-to-compile}\"\/><br \/>\n<echo message=\"Directory Created\"\/><br \/>\n<\/target><\/p>\n<p><target name=\"copy\" depends=\"mkdir\"><br \/>\n<echo message=\"Going to copy the remaining filw which are not compiled to ${no-need-to-compile} folder\" \/><br \/>\n<copy todir=\"${no-need-to-compile}\" ><br \/>\n<fileset dir=\"${src.dir}\" ><br \/>\n<exclude name=\"HelloWorld.java\" \/><br \/>\n<exclude name=\"HelloWorld1.java\" \/><br \/>\n<exclude name=\"HelloWorld2.java\" \/><br \/>\n<exclude name=\"HelloWorld3.java\" \/><br \/>\n<exclude name=\"HelloWorld4.java\" \/><br \/>\n<\/fileset><br \/>\n<\/copy><br \/>\n<echo message=\"Files are moved\" \/><br \/>\n<\/target><\/p>\n<p><target name=\"package\" depends=\"copy\"><br \/>\n<echo message=\"Now building the jar .... \" \/><br \/>\n<mkdir dir=\"${jar.dir}\"\/><br \/>\n<jar destfile=\"${jar.dir}\/${ant.project.name}.jar\" basedir=\"${classes.dir}\"><\/p>\n<p><\/jar><br \/>\n<echo message=\"You know something jar is built\"\/><br \/>\n<\/target><\/p>\n<p><target name=\"clean-build\" depends=\"clean,package\"\/><\/p>\n<\/project>\n<p><strong>rajeshkumar replied the topic: Sample Apache ant assignment &#8211; try it out<\/strong><br \/>\nThere are some issues in terms of understanding the requirement but its a good start to you.<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\">twitter.com\/RajeshKumarIn<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>rajeshkumar created the topic: Sample Apache ant assignment &#8211; try it out Clone the prject- github.com\/scmgalaxy\/helloworld-java-ant Duplicate 10 source file [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[419],"tags":[420],"class_list":["post-1892","post","type-post","status-publish","format-standard","hentry","category-apache-ant-build-management-tools","tag-apache"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Sample Apache ant assignment - try it out - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/sample-apache-ant-assignment-try-it-out\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Sample Apache ant assignment - try it out - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"rajeshkumar created the topic: Sample Apache ant assignment &#8211; try it out Clone the prject- github.com\/scmgalaxy\/helloworld-java-ant Duplicate 10 source file [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/sample-apache-ant-assignment-try-it-out\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2017-12-06T10:19:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-27T09:30:36+00:00\" \/>\n<meta name=\"author\" content=\"scmgalaxy K\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"scmgalaxy K\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/sample-apache-ant-assignment-try-it-out\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/sample-apache-ant-assignment-try-it-out\\\/\"},\"author\":{\"name\":\"scmgalaxy K\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"headline\":\"Sample Apache ant assignment &#8211; try it out\",\"datePublished\":\"2017-12-06T10:19:18+00:00\",\"dateModified\":\"2021-02-27T09:30:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/sample-apache-ant-assignment-try-it-out\\\/\"},\"wordCount\":129,\"commentCount\":0,\"keywords\":[\"Apache\"],\"articleSection\":[\"Apache Ant\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/sample-apache-ant-assignment-try-it-out\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/sample-apache-ant-assignment-try-it-out\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/sample-apache-ant-assignment-try-it-out\\\/\",\"name\":\"Sample Apache ant assignment - try it out - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"datePublished\":\"2017-12-06T10:19:18+00:00\",\"dateModified\":\"2021-02-27T09:30:36+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/sample-apache-ant-assignment-try-it-out\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/sample-apache-ant-assignment-try-it-out\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/sample-apache-ant-assignment-try-it-out\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sample Apache ant assignment &#8211; try it out\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\",\"name\":\"scmgalaxy K\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"caption\":\"scmgalaxy K\"},\"sameAs\":[\"http:\\\/\\\/www.DevOpsSchool.com\"],\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/scmgalaxy\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Sample Apache ant assignment - try it out - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/sample-apache-ant-assignment-try-it-out\/","og_locale":"en_US","og_type":"article","og_title":"Sample Apache ant assignment - try it out - scmGalaxy","og_description":"rajeshkumar created the topic: Sample Apache ant assignment &#8211; try it out Clone the prject- github.com\/scmgalaxy\/helloworld-java-ant Duplicate 10 source file [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/sample-apache-ant-assignment-try-it-out\/","og_site_name":"scmGalaxy","article_published_time":"2017-12-06T10:19:18+00:00","article_modified_time":"2021-02-27T09:30:36+00:00","author":"scmgalaxy K","twitter_card":"summary_large_image","twitter_misc":{"Written by":"scmgalaxy K","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/sample-apache-ant-assignment-try-it-out\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/sample-apache-ant-assignment-try-it-out\/"},"author":{"name":"scmgalaxy K","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"headline":"Sample Apache ant assignment &#8211; try it out","datePublished":"2017-12-06T10:19:18+00:00","dateModified":"2021-02-27T09:30:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/sample-apache-ant-assignment-try-it-out\/"},"wordCount":129,"commentCount":0,"keywords":["Apache"],"articleSection":["Apache Ant"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/sample-apache-ant-assignment-try-it-out\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/sample-apache-ant-assignment-try-it-out\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/sample-apache-ant-assignment-try-it-out\/","name":"Sample Apache ant assignment - try it out - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"datePublished":"2017-12-06T10:19:18+00:00","dateModified":"2021-02-27T09:30:36+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/sample-apache-ant-assignment-try-it-out\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/sample-apache-ant-assignment-try-it-out\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/sample-apache-ant-assignment-try-it-out\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Sample Apache ant assignment &#8211; try it out"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102","name":"scmgalaxy K","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","caption":"scmgalaxy K"},"sameAs":["http:\/\/www.DevOpsSchool.com"],"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/scmgalaxy\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/1892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=1892"}],"version-history":[{"count":2,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/1892\/revisions"}],"predecessor-version":[{"id":1895,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/1892\/revisions\/1895"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=1892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=1892"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=1892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}