Migrating from Ant to Gradle are very easy and the importBuild method from AntBuilder . We are only having to add the reference existing ant build XML file and all ant tasks can now is executed a s Gradle tasks. We can automatically rename the Ant tasks if we want to avoid task name collisions with Gradle task
If you use the ant script to create war files, if the project contains files with Chinese file names, the names of these files in the war files will become garbled, if you use myeclipse to deploy Tomcat and compress it into war, the same problem also exists.
After checking on the Internet for a long time, I finally found the solution. I added the encoding = "GBK
tasks, each of which is done through a Java class that implements a particular interface.Benefits of AntAnt is a subproject in the Apache Software Foundation Jakarta Directory, which has the following advantages.Cross-platform. Ant is written in the Java language and is shown to have a good cross-platform nature.Simple to operate. Ant is made up of a built-in task and optional tasks. The
In daily project development, we often need to package for testing, especially in windows, while in Linux.
In this case, many programmers need to pack a package and pack a package later. These packages may be large. In fact, only the code is changed, while the jar package is basically unchanged.
Of course, many people may say automated testing. Well, what we need to do today is the first step of automated testing.
At this time, I can use ant to packag
Run ant from the command line:
To call ant from a command prompt, you just need to type a separate ant. If you do this, ant will use the default generated file. The default target specified in the generated file is the target to be generated by ant. You can also specify many
e disk, and you can see the results of the run, as shown in the following illustration:
Because the value of the Basedir is set, the value of the Basedir property becomes the value that the reader sets. The reader can remove the Basedir attribute of the project element and then run ant to see the results, at which point the Basedir value becomes E: "The parent directory of the ant component file."
Sometime
Another exam connection: http://www.huihoo.com/java/hello-ant/index.html (ANT practice Eric (ericwq@263.net) 1. Ant is what? 2. install ant 3. run ant 4. compile build. XML 5. built-in task (Internet) 6. ear task (Internet) 7. war Task (Internet) 8. JUnit task (Internet) ---
Original article:Http://hi.baidu.com/yuanzhifeng/blog/item/bd431ff4b6f11f6dddc474e4.html
I. antDetailed Command Execution Parameters
-Buildfile Specify the position and name of the component to be executed.
-Find Find the component file and execute the file.
-Help,-P:Show antCommand help information. Show ant in command line-HIs short.
-Version:Show ant.
-Diagnostics: Show antThe running environment and de
follows:Struts_demo+ -- JSP|+ -- SRC|+ -- WEB-INF| + -- Classes|| + -- Lib|| + -- Web. xml|+ -- Build. xml
Each build. xml file contains one project and at least one target. Target contains the task element, which is a piece of executable code. Each task element has an ID attribute for reference in files. Ant has a built-in task set available for use, such as the property, javac, and war used in the above file, to complete setting properties, compili
SQL obtains all user names, database names, all table names, all field names, and field types. 2009 - 03 - 14 10 : 48 1 . Get all user names: Select Name From Sysusers Where Status = ' 2 ' And Islogin = ' 1 ' Islogin = ' 1 ' AccountIslogin = ' 0 ' RoleSta
Some time ago I needed some English names, so I searched the internet and found some English names to share with you. I hope they will help you in your work and study!
Common names:
Male name
Andy
Bill
Charles
David
Gary
George
Henry
Jack
Jim
John
Jones
Louis
Mike
Nick
Peter
Richard
Robert
Roberts
Roger
Rogers
Taylor
First, let's look at a sample XML file:
We can see that XML annotations can be used throughout the generated file to improve clarity. Ant also defines its own description elements and description attributes, which can be used to provide more structured comments.
Ant attributes:
Attributes in ant are similar to variables in programming languages. They all have
: From the above, we can see that the value of the default property is defined here as Saybasedir, that is, when the ant command is run, if the target executed by default is not specified, Saybasedir of the target is executed, and the value of the Basedir property is defined as E : "apache-ant-1.7.0, after entering the e-disk, run the ant command to see the resu
Ant is a sub-project of Apache's Java sub-project "Jakarta". You can select the current version, window version
After decompression, ant_home is used for convenient access. Make sure that you have set java_home.Set ant_home = D: \ Java \ kit \ ant \ jakarta-ant-1.5.1 This Is My directory
Hello ant
We need to develop a
If you need to execute another ant project by using the ant command in a component file, or you want to execute the component file of the subitem of the project. Now ant is a core task. Simply put, the ant task is equivalent to executing the component file through the ant co
Android Application Development efficient tool set 1 --- ant build simple Android project, android1 --- ant
In java compilation, ant is used to compile Java projects. Today, it is extended to use it to build Android projects. In fact, the principle is the same, and only the form of change is used. Ant builds a jar pack
. during the development process, one or several of these building processes are often repeated. If you perform these building processes manually, it will be very cumbersome, especially when the program size is very large. In this case, using software build tools saves a lot of trouble, while Apache ant is an excellent Java-based software build tool.
2. Apache ant
Apache antIs a Java-based build tool. In
development. By default, the ant build file is named build. XML, and other names can also be used. The name is passed to ant as a parameter during running. Build files can be placed anywhere. The general practice is to put it in the top-level directory of the project, so that the project can be concise and clear. The following is a typical project hierarchy.
(1)
Ant is an automated build tool for software testing, compiling, packaging, and deployment, and is a subproject in the Apache Software Foundation Jakarta Directory with the following benefits:
Platform-based
Ant is written in the Java language and has a good cross-platform nature.
Simple operation
Ant consists of a default task and seve
The blog "ant-using ant to build a simple Java project (i)" demonstrates building a simple Java project using ant Tools, followed by this example to further learn Ant:The above example requires running multiple ant commands to run the main function in the test class, can you simplify the need to run the command? The an
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.