Apache ant interview questions

rajeshkumar created the topic: Apache ant interview questions
Links to all Apache Ant Task – ant.apache.org/manual/tasklist.html

Question 1. Write a ant build.xml and call one batch file from build.xml. batch file should create one directory.

Question 2. Write a ant build.xml which should copy the files and folders from another and create a tar file.

Question 3. Linux – Write a ant build.xml which should create 5 files and five folders and change the file permission to all files to 644 and folder to 755.

Question 4. Write a two build.xml named with “build1.xml” and “build2.xml”. Each build.xml will compile one java program but build2.xml should be called from build1.xml.

Question 5. Go through all these questions mentioned in the url below and try to find an answer and provide your answer as part of comments.
www.scmgalaxy.com/index.php?option=com_k…d-answers&Itemid=120
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

sribhavani_u replied the topic: Apache ant interview questions
Question1
========



Question2
=========







Question 3
=========





files created







Folders created










permissions changed files:644 folders:755

Question4
=========
q4build1










q4build2



nineetha replied the topic: Apache ant interview questions
QUESTION 1



[/b]

QUESTION 2









QUESTSION 3























QUESTION 4 target









rajeshkumar replied the topic: Apache ant interview questions
Good work. I checked last week and its nice.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Sample Apache ant assignment – try it out

rajeshkumar created the topic: Sample Apache ant assignment – try it out
Clone the prject- github.com/scmgalaxy/helloworld-java-ant

Duplicate 10 source file from HelloWorld.java
Create a directory called “mybuild”
Clean all 10 java class files if exist
compile only 5 java files
Copy rest 5 files under folder called “no-need-to-compile”
create package of jar / war of the compiled files
Note: must use echo in all programs
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

crystal2904 replied the topic: Sample Apache ant assignment – try it out





































rajeshkumar replied the topic: Sample Apache ant assignment – try it out
There are some issues in terms of understanding the requirement but its a good start to you.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Sample Apache ant project for begginers

rajeshkumar created the topic: Sample Apache ant project for begginers
Pre-
1. clone the src code from – github.com/scmgalaxy/Javatest1
2. Create a proper build structure via ant

Write a two build.xml –
One(Name of the file – Build.xml)
Second(Name of the file – myfile.xml)

You should do the following things in build.xml
1. copy the src file from clone folder to build folder
2. change the permission of file to current user
3. create a build folder strcuture needed. use your knowledge
4. Comiple the source code
5. Call build file – myfile.xml

You should do the following things in myfile.xml
1. Zip the compiled file.
2. Create a jar file.
3. Delete the .class file
4. Sleep for 10 sec
5. create a directory using exec.(Not ant tasks)
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

harsha924 replied the topic: Sample Apache ant project for begginers
Hi Rajesh,

Here is my assignment.

Regards,
Harsha

File Attachment:
File Name: MyAntProje…rsha.zip
File Size:5 KB
MyAntProject-Harsha

Tagged :

Apache ant programming Exercise

rajeshkumar created the topic: Apache ant programming Exercise
Apache ant programming excercise

FIRST
Download Ant from the Apache Software Foundation and install it.

Exercise Question 1

Pre-
1. clone the src code from – github.com/scmgalaxy/SampleJavaFiles
2. Create a proper build structure via ant

Write a two build.xml –
One(Name of the file – Build.xml)
Second(Name of the file – myfile.xml)

You should do the following things in build.xml
1. copy the src file from clone folder to build folder
2. change the permission of file to current user
3. create a build folder strcuture needed. use your knowledge
4. Comiple the source code
5. Call build file – myfile.xml

You should do the following things in myfile.xml
1. Zip the compiled file.
2. Create a jar file.
3. Delete the .class file
4. Sleep for 10 sec
5. create a directory using exec.(Not ant tasks)

Exercise Question 2

Clone the prject- github.com/scmgalaxy/helloworld-java-ant

Duplicate 10 source file from HelloWorld.java
Create a directory called “mybuild”
Clean all 10 java class files if exist
compile only 5 java files
Copy rest 5 files under folder called “no-need-to-compile”
create package of jar / war of the compiled files
Note: must use echo in all programs

Exercise Question 3
Write a ant build.xml and call one batch file from build.xml. batch file should create one directory.

Exercise Question 4

Links to all Apache Ant Task – ant.apache.org/manual/tasklist.html

Exercise Question 5
Write a ant build.xml and call one batch file from build.xml. batch file should create one directory.

Exercise Question 6
Write a ant build.xml which should copy the files and folders from another and create a tar file.

Exercise Question 7
Linux – Write a ant build.xml which should create 5 files and five folders and change the file permission to all files to 644 and folder to 755.

Exercise Question 8
Write a two build.xml named with “build1.xml” and “build2.xml”. Each build.xml will compile one java program but build2.xml should be called from build1.xml.

Exercise Question 9
Go through all these questions mentioned in the url below and try to find an answer and provide your answer as part of comments.
www.scmgalaxy.com/index.php?option=com_k…d-answers&Itemid=120

Exercise Question 10.
Write a ant script which will create a directory called “hptraining” as part of target called “training”

Exercise Question 11.
Write a ant script which will copy some files to keep under directory called “myfiles” and make sure you are renaming one file with yourname.txt.

Exercise Question 12.
Modify a script from 3, and introduce your name thorugh command line and display using ant.

Exercise Question 13.
Write some source code that is part of a package. Now write an Ant build file to compile, jar and javadoc the package.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Apache Subversion 1.7 has Arrived | What’s new in Subversion 1.7 ?

apache-subversion-17

Apache Subversion 1.7 has Arrived

Subversion 1.7.0 has been officially released today.  With the release of Subversion 1.7 comes the release of Subversion Edge 2.1.0.  This release of Subversion Edge brings you the server binaries for Subversion 1.7.0 as well as the latest release of Apache httpd.  In addition to the inclusion of the Subversion 1.7 server binaries this release of Subversion Edge brings a number of other nice improvements including the addition of a complete 64-bit Windows binary stack.  As with all previous Subversion Edge releases you can simply update your existing installation from the Subversion Edge web console.  There are no other special considerations, the update mechanism handles all details.

I encourage all users to update their Subversion Edge servers to this release so that you and your users can enjoy the new features brought from this release as well as the improved performance and fixes that comes with Subversion 1.7.  Look for updates to your favorite Subversion clients to follow shortly.

Source: http://blogs.collab.net/subversion/2011/10/subversion-1-7-0-released/

Tagged : / / / / / / / / / / / / / / / /

Apache web server Installation Guide, know how to Install Apache web server on Windows 7?

apache-web-server-on-windows-7-installation-guide

After a quick detour to install Notepad++, I’m on my way to installing Magento. Before I can get into the meat of it, though, I do require a few prerequisites.

From the installation instructions, installing Magento requires:

  • Apache 1.3.x or Apache 2
  • PHP 5.2.0 and above with Safe mode off
  • MySQL 4.1.20 and above

After a brief search, I happened upon a very handy site (Yes, my current dev machine runs Windows 7). No sense reinventing the wheel, so these instructions should do nicely.

I’ve chosen the latest stable release, 2.2.17, MD5-verified and ready to install.

Always one to put the right foot forward… The first thing I’ve done is to immediately download the wrong version (src) instead of the neatly prepped installer (msi) as per the instructions. Round 1 goes to my eagerness, but after a neat revisit to the Apache download page, I’m off in the right direction.

After kicking off the Apache installer, my first instinct was to twitch at the frozen installer progress (Did the instructions forget about that ghastly Windows 7 User Account Control?), but after only a brief pause, the UAC prompt has displayed and the Apache web server installation is back on track.

None the worse for wear, time for the next step.

PHP

I’ve pretty much kaboshed most of the PHP installation instructions, mostly due to its avoidance of the handy PHP for Windows installer. Pointing the installer to the Apache web server’s cgi-bin folder seems like a good idea.

A configuration change…

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = “./”
; On windows:
extension_dir = “ext” ; Uncommented (removed the semicolon at the beginning of) this line

… and I’m back to the instructions. After an update to my environment variables, looks like it’s time for a reboot… and sleep.

I’ll be leaving the MySQL install (and testing Apache web server and PHP) ’til tomorrow.

Tagged : / / / / / / / / / / / / / / / / /

Apache Interview Questions – Apache Job Interview Kit

apche-interview-questions-answers

Apache Interview Questions – Apache Job Interview Kit

On a fresh install, why does Apache have three config files – srm.conf, access.conf and httpd.conf? – The first two are remnants from the NCSA times, and generally you should be ok if you delete the first two, and stick with httpd.conf.

What’s the command to stop Apache? – kill the specific process that httpd is running under, or killall httpd. If you have apachectl installed, use apachectl stop.

What does apachectl graceful do? – It sends a SIGUSR1 for a restart, and starts the apache server if it’s not running.
How do you check for the httpd.conf consistency and any errors in it? – apachectl configtest

When I do ps -aux, why do I have one copy of httpd running as root and the rest as nouser? – You need to be a root to attach yourself to any Unix port below 1024, and we need 80.

But I thought that running apache as a root is a security risk? – That one root process opens port 80, but never listens to it, so no user will actually enter the site with root rights. If you kill the root process, you will see the other kids disappear as well.

Why do I get the message “… no listening sockets available, shutting down”? – In Apache 2 you need to have a listen directive. Just put Listen 80 in httpd.conf.

How do you set up a virtual host in Apache?
<VirtualHost www.techinterviews.com>
ServerAdmin admin@techinterviews.com
DocumentRoot /home/apache/share/htdocs/hostedsites
ServerName www.techinterviews.com
ErrorLog /home/apache/logs/error/hostedsites/error_log
TransferLog /home/apache/logs/access/hostedsites/access_log
</VirtualHost>

What is ServerType directive? – It defines whether Apache should spawn itself as a child process (standalone) or keep everything in a single process (inetd). Keeping it inetd conserves resources. This is deprecated, however.

What is mod_vhost_alias? – It allows hosting multiple sites on the same server via simpler configurations.

What does htpasswd do? – It creates a new user in a specified group, and asks to specify a password for that user.
If you specify both deny from all and allow from all, what will be the default action of Apache? – In case of ambiguity deny always takes precedence over allow.

 

Tagged : / / / / / / / / / / / / / / / /

Apache and HTTP Interview Questions and Answers – Interview Guide

apache-and-http-interview-question-answers

Apache and HTTP Interview Questions and Answers – Interview Guide

List of Apache and HTTP Interview Questions: –

<!– /* Font Definitions */ @font-face {font-family:”Cambria Math”; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:””; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:”Calibri”,”sans-serif”; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:minor-bidi;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:”Times New Roman”; mso-bidi-theme-font:minor-bidi;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:1388797391; mso-list-template-ids:-480605428;} ol {margin-bottom:0in;} ul {margin-bottom:0in;} –>

  1. On a fresh install, why does Apache have three config files – srm.conf, access.conf and httpd.conf? – The first two are remnants from the NCSA times, and generally you should be ok if you delete the first two, and stick with httpd.conf.
  2. What’s the command to stop Apache? – kill the specific process that httpd is running under, or killall httpd. If you have apachectl installed, use apachectl stop.
  3. What does apachectl graceful do? – It sends a SIGUSR1 for a restart, and starts the apache server if it’s not running.
  4. How do you check for the httpd.conf consistency and any errors in it? – apachectl configtest
  5. When I do ps -aux, why do I have one copy of httpd running as root and the rest as nouser? – You need to be a root to attach yourself to any Unix port below 1024, and we need 80.
  6. But I thought that running apache as a root is a security risk? – That one root process opens port 80, but never listens to it, so no user will actually enter the site with root rights. If you kill the root process, you will see the other kids disappear as well.
  7. Why do I get the message “… no listening sockets available, shutting down”? – In Apache 2 you need to have a listen directive. Just put Listen 80 in httpd.conf.
  8. How do you set up a virtual host in Apache?
    <VirtualHost www.techinterviews.com>
    ServerAdmin admin@techinterviews.com
    DocumentRoot /home/apache/share/htdocs/hostedsites
    ServerName www.techinterviews.com
    ErrorLog /home/apache/logs/error/hostedsites/error_log
    TransferLog /home/apache/logs/access/hostedsites/access_log
    </VirtualHost>
  9. What is ServerType directive? – It defines whether Apache should spawn itself as a child process (standalone) or keep everything in a single process (inetd). Keeping it inetd conserves resources. This is deprecated, however.
  10. What is mod_vhost_alias? – It allows hosting multiple sites on the same server via simpler configurations.
  11. What does htpasswd do? – It creates a new user in a specified group, and asks to specify a password for that user.
  12. If you specify both deny from all and allow from all, what will be the default action of Apache? – In case of ambiguity deny always takes precedence over allow.
Tagged : / / / / / / / / / / / / / / / / / / /

Apache Continuum Version 1.3.6 Beta 1 – What’s new in Apache Continuum ?

apache-continuum-version-136-beta-1

The Apache Continuum team have released a beta of Apache Continuum 1.3.6.

Apache Continuum is a continuous integration server, which offers automated builds, role-based security, release management and integration with build tools and source control management systems. The project aims to improve quality and maintain a consistent build environment.

This beta introduces updates to the error handling if deleting a project fails, and has fixed the invalid links when generating pdf of continuum-docs. Untested platforms have been removed from the installation docs, and the LDAP configuration documentation has been updated.

A PDF version of the Continuum docs is planned for some point in the future. See the Release Notes for more information.

Tagged : / / / / / / / / / / / / / / / / /

What is Apache Ant? – Apache ant Overview

apache-ant

What is an apache ant?
Apache Ant is a Java-based build tool. In theory, it is kind of like Make, but without Make’s wrinkles.

Why another build tool when there is already make, gnumake, nmake, jam, and others?
Because all those tools have limitations that Ant’s original author couldn’t live with when developing software across multiple platforms.
Make-like tools are inherently shell-based — they evaluate a set of dependencies, and then execute commands not unlike what you would issue in a shell. This means that you can easily extend these tools by using or writing any program for the OS that you are working on. However, this also means that you limit yourself to the OS, or at least the OS type such as UNIX, that you are working on.
Makefiles are inherently evil as well. Anybody who has worked on them for any time has run into the dreaded tab problem. “Is my command not executing because I have a space in front of my tab!!!” said the original author of Ant way too many times.
Tools like Jam took care of this to a great degree, but still have yet another format to use and remember.
Ant is different. Instead of a model where it is extended with shell-based commands, Ant is extended using Java classes. Instead of writing shell commands, the configuration files are XML-based, calling out a target tree where various tasks get executed. Each task is run by an object that implements a particular Task interface.
Granted, this removes some of the expressive power that is inherent by being able to construct a shell command such as `find . -name foo -exec rm {}`, but it gives you the ability to be cross platform — to work anywhere and everywhere. And hey, if you really need to execute a shell command, Ant has an task that allows different commands to be executed based on the OS that it is executing on.

Tagged : / / / / / / / / / / / / / /