Ant النملة (java software) from Apache Foundation is a popular build tool (often used successfully with other release management tasks) which replaces make. (برنامج جافا) من اباتشي المءسسه هي اداة بناء الشعبية (وكثيرا ما تستخدم بنجاح مع الافراج عن المهام الاداريه الأخرى) الذي يحل محل تقدم.

“Apache Ant is a Java-based build tool. "اباتشي النملة هو جافا - القائمة اداة بناء. In theory, it is kind of like Make, but without Make’s wrinkles. ومن الناحية النظريه ، وهو نوع من مثل تقديم ، ولكن من دون تقديم 'sالتجاعيد. "

Included in Ant are optional tasks like نمله المدرجه في المهام مثل اختياريه FTP بروتوكول انتقال الملف & Telnet. & تلنت. For example the FTP Task allows you to communicate with FTP servers (get / put / list etc.). على سبيل المثال بروتوكول نقل الملفات المهمة يتيح لك الاتصال لخدمة بروتوكول نقل الملفات (الحصول على / وضع / قائمة وما الى ذلك).

Unfortunately they don’t work out of box and not well documented. وللاسف لا يعملون خارج الاطار وغير موثقه جيدا. In this article we will explain the whole procedure in six simple steps. ونحن في هذه المادة سوف يشرح العملية بأكملها في ست خطوات بسيطة.

To use them follow the steps below: لاستخدامها اتباع الخطوات الواردة ادناه :

  1. Download تنزيل jakarta-oro جاكرتا - اورو and و commons-net - المشاعات صافي library. المكتبه.
    Note: The links above allow you to download the version I tested them with. ملاحظه : وصلات اعلاه تسمح لك تنزيل نسخة الاول اختبار لهم.
  2. Create a lib directory for your project if you have not already done so. إنشاء مكتبة دليل للمشروع الخاص بك اذا كنت لم تفعل ذلك.
  3. Extract the jar file jakarta-oro*.jar from استخراج الجره الملف جاكرتا - جرة من اورو *. jakarta-oro جاكرتا - اورو library you have downloaded and copy it to the lib directory you created. المكتبه قمت بتنزيل نسخة الى مكتبه دليل قمت بانشائه.
    Note: ملاحظه :
    • If you have downloaded from the links in step 1 then the exact file name is jakarta-oro-2.0.8.jar اذا كان لديك تنزيلها من الروابط في الخطوة 1 ثم على وجه الدقه هو اسم الملف جاكرتا - أورو - 2.0.8.jar
    • Ensure that the file is copied to the lib directory and not to any of its sub-directories الملف ضمان ان يتم نسخها الى مكتبه دليل وليس إلى أي من دون ادلة
  4. Extract the jar file commons-net*.jar file from جرة استخراج ملف المشاعات - صافي جرة الملف من *. commons-net - المشاعات صافي library you have downloaded and copy it to the lib directory. المكتبه قمت بتنزيل نسخة الى مكتبه دليل.
    Note: ملاحظه :
    • If you have downloaded from the links in step 1 then the exact file name is commons-net-1.4.0.jar اذا كان لديك تنزيلها من الروابط في الخطوة 1 ثم الدقيق المشاعات هو اسم الملف - صافي - 1.4.0.jar
    • Ensure that the file is copied to the lib directory and not to any of its sub-directories الملف ضمان ان يتم نسخها الى مكتبه دليل وليس إلى أي من دون ادلة
  5. Add the ftp taskdef at the top: اضافة بروتوكول نقل الملفات في اعلى taskdef :
  6. Add the appropriate task to your build.xml file. اضافة مناسبة مهمة لbuild.xml الملف الخاص بك. An example task to upload a directory is as follows: ومن الامثله المهمة لتحميل الدليل على النحو التالي :

  7. Run Ant by including the lib directory in classpath. نمله البعيد من قبل بما في مكتبه دليل classpath. An example would be: وربما يكون المثل :
     ant -lib lib upload النملة - مكتبة مكتبة تحميل 

    Note: I just had to include the lib directory to ensure all its jar files are automatically included. ملاحظه : انا فقط قد لتشمل مكتبه دليل لضمان الجره جميع الملفات اليه آليا.

Note: ملاحظه :

  • The same procedure can be used to run Ant Telnet and RExec Tasks. نفس الاجراء يمكن ان تستخدم لتشغيل التلنت والنملة rexec المهام. Only the task name and parameters in build.xml file will change. فقط اسم والمعالم المهمة في build.xml الملف التغيير. Check the corresponding manuals for details. التحقق من الادله للحصول على تفاصيل المقابلة.
  • I have promoted the use of lib directory (within project) to keep your jar files. لقد شجعت استخدام مكتبه دليل (في اطار المشروع) ان تبقى جرة الملفات الخاصة بك. This makes your jar files available only to your project. وهذا يجعل من الملفات الخاصة بك جرة متاحة فقط للمشروع الخاص بك. There are two other alternatives. وهناك بدائل اخرى اثنين. First you can keep them in %ANT_HOME%\lib directory. اولا يمكنك الاحتفاظ بها في ant_home ٪ ٪ \ مكتبه دليل. This makes them available to all projects for all users in that machine. وهذا يجعلها متاحة للجميع المشاريع لجميع المستخدمين فى هذا الجهاز.
    You can also keep them in ${user.home}/.ant/lib . يمكنك ايضا الاحتفاظ بها في $ () user.home /.ant / مكتبة.

    The location of ${user.home}/.ant/lib is somewhat dependent on the JVM. موقع user.home $ () /.ant / مكتبة نوعا ما تعتمد على jvm. On Unix systems ${user.home} maps to the user’s home directory whilst on recent versions of Windows it will be somewhere such as C:\Documents and Settings\username\.ant\lib. على انظمة الينكس $ () user.home خرائط المستخدم الى الصفحه الرئيسية دليل على حين ان الاصدارات الاخيرة من ويندوز وسيكون مكان ما مثل جيم : \ المستندات والاعدادات \ اسم المستخدم \. نمله \ مكتبه.

Enjoy! يتمتع!