ANT actual articles (1)
Amender: Huang Kai
E_mail: hk_sz@163.com
Forehead
Since the company is now undergoing the unit test case, the evacuation understands Ant and Junit technology. The following is the collection of the director of the people (considering the summary of my idea, maybe not fully express the original author I think, I will listen out all the articles of the article or books in the reference. Everyone has time to see the original text).
If you don't understand the ANT part of the parameters, please refer to the "Ant Theory" series or Ant comes with documents.
table of Contents
First, ANT use example
1.1 Copt Task via ANT submitted the recently updated file (according to the system time) file in the current directory to the specified directory
1.2 Develop Java programs with ANT
1.3 ANT combined with JUnit for software automatic test
1.4 ANT development and deployment web applications
1.5 ANT Packaging (JAR) application
1.6 ANT development EJB application
reference
First, ANT use example
1.4 ANT development and deployment web applications
1> Premise:
★ Complete the "JBuilder9 WebLogic 7 actual article", "because this is our instance of our packaging;
★ Copy the Filter's entire directory to the D disk, I use JBuilder to edit, so in addition to the CLASSES folder and Filter.war files, other reservations, the relevant directory structure we have to use is as follows:
D: / filter
SRC Java Source File Directory
Filter JSP file and configuration file directory
WEB-INF configuration file directory
2> Because it is not compiled in the JBuilder environment, the path to the servlet is required in the classpath. First of all, we are
Http://java.sun.com/products/serve/download.html
download
http://java.sun.com/webapps/download/Redirect/103537442/5847479377282807053505607246086069333228938633594669477228720286350602472859339008063305596058473206-4908/servlet-2_3-fcs-classfiles.zip
Then add the entire path containing servlet-2_3-fcs-classfiles.zip to ClassPath.
3> Create build.properties and filter.xml files in the D: / Filter directory.
The building contents of the build.properties are as follows:
WebLogic.user_Projects.Mydomain.Applications = C: / bea / user_projects / mydomain / applications
FILTER = Filter
Dest = classes.ant
SRC = SRC
The Filter.xml file content is as follows:
xml version = "1.0"?>
fileset>
The building contents of the build.properties are as follows:
WebLogic.user_Projects.Mydomain.Applications = C: / bea / user_projects / mydomain / applications
FILTER = Filter
Dest = classes.ant
SRC = SRC
WebLogic.Server = C: / bea / weblogic700 / server
Username = training
User.password = training
WebLogic.Filter = c: / bea / user_projects / mydomain / myserver / upload / filter
The Filter.xml file content is as follows:
xml version = "1.0"?>
Then, you can modify the code in the Login.jsp file under the Filter subdirectory, then run the Ant RedEploy -BuildFile filter.xml to redeploy, refresh the http: // localhost: 7001 / console / browser, check if the deployment is success.
Then refresh the http: // localhost: 7001 / filter / login.jsp Viewing the result of displaying the modified result is correct.
Finally, remove the Filter from the Web Applications, running Ant Delete -BuildFile Filter.xml to delete. Refresh http: // localhost: 7001 / console / browser, see if it is successful (click Mydomain / Deployments / Web Applications on the left).
reference
Ant use
Author: Unknown
Or site: http://php.igt.com.tw/Unit_116.htm
Develop Java programs using ANT
Author: cinc
Original site: http://www.douzhe.com/bbsjh/14/434.html
Automatically build test backup and release to project web with ANT implementation project
Author: beyondii
Or site: http://www.9cbs.net/develop/read_article.asp? Id = 20443
http://www.9cbs.net/develop/read_article.asp?id=20444
http://www.9cbs.net/develop/read_article.asp?id=20445http://www.9cbs.net/develop/read_article.asp?id=20446
Let compilation and test process automation
Author: Erik Hatcher
Or site: http://www-900.ibm.com/developerWorks/cn/java/j-junitmail/
"J2EE application development (WebLogic JBuilder"
Publishing House: Electronic Industry Press