Hướng dẫn cài đặt apache ant macbook
I am trying to install ANT on a Mac laptop. I installed Java 8 Then downloaded ANT and unzip it to /Users/ANT/ In .bash_profile I put export PATH=${PATH}:/Users/ANT/bin But when I try to call an ant from the command (ant –version) line I recieve zsh: command not found: ant Any ideas? Thank you! asked Apr 14, 2022 at 18:49 1 Based on the error message it appears that you are running the command from Z shell (zsh) but you've added the path to Since you are using zsh, you'll need to add answered Apr 14, 2022 at 20:33 Based on error message "command not found: ant", seem to path is not properly set in environment variables. Thêm vào đường dẫn đên thưc mục bin của ant (Nằm trong thư mục apache-ant). Ví dụ như đường dẫn giống mình ;C:\Program Files\apache-ant-1.9.4\bin Nhớ trước đường dẫn phải có dấu ";" để phân cách các Path khác. Xong khởi động lại. Kiểm tra bằng cách mở cmd (WIN + R >> nhập cmd >> Enter) nhập dòng lệnh sau ant -version Nếu hiện ra phiên bản của Ant thì hoàn thành. 2. UbuntuTải gói .tar.gz Sau đó giải nén chỗ nào đó tùy bạn nhưng nhớ đường dẫn đến đó nhá. Tiếp theo vào Home nhấn tổ hợp phím Ctrl + H để hiện những thư mục, file ẩn lên. Tiếp đến là tìm và mở file .profile lên Thêm 2 dòng sau vào cuối file export ANT_HOME=/home/viruses/Programs/apache-ant-1.9.4 export PATH=$PATH:/home/viruses/Programs/apache-ant-1.9.4/bin trong đó /home/viruses/Programs/apache-ant-1.9.4 là đường dẫn đến thư mục mình vừa giải nén. /home/viruses/Programs/apache-ant-1.9.4/bin là đường dẫn đến thưc mục bin nằm trong thư mục Apache Ant vừa giải nén. Copy xong lưu lại rồi khởi động lại máy. Tiếp theo nhập dòng lệnh The main known usage of Apache Ant is the build of Java applications. Ant supplies a number of built-in tasks allowing to compile, assemble, test and run Java applications. Ant can also be used effectively to build non Java applications, for instance C or C++ applications. Ant is pretty useful as a build tool, for Java build tools I would recommend to look into other build tools such as Maven and Gradle. In the Salesforce use case, we can use the traditional ant tool for metadata deployment. We recommend to look into Salesforce DX for deployments. Other use cases, we still use ant for dataloader jobs if you want to script the CRUD operations. I created a video for installing apache ant on Mac running on MacOS Sierra and here is the steps to follow along. How to Install Ant on Mac
Other Notes: If you are getting an error when you run any commands:
If you like this tutorial on how to install ant on mac, subscribe to my Youtube channel for more how to video tutorials. |