锘??xml version="1.0" encoding="utf-8" standalone="yes"?> The display tag library uses Maven for build and documentation and tries to conform to general Maven project layout. If you are used to working on a maven-driven project you should feel comfortable with it. Here is a description of the file and folder organization. The strong names refer to project specific setting/files. 鍏ㄩ儴report鍙傝?Maven Generated Reports Plug in Goal Description ear ear construire une archive de type ear deploy d茅ployer un fichier ear dans un serveur d'application ejb ejb deploy jalopy format java compile compiler des sources jar cr茅er une archive de type .jar javadoc jnlp pdf g茅n茅rer la documentation du projet au format PDF site generate g茅n茅rer le site web du projet deploy copier le site web sur un serveur web test match ex茅cuter des tests unitaires war init war deploy
Magic Maven translation release錛?BR>
涓嬭澆鍦板潃錛?nbsp; http://www.tkk7.com/Files/jinfeng_wang/MagicMaven.zip
2銆佸鏋滀綘鎯沖湪瀹㈡埛绔痙ebug鎬庝箞鍔烇紵閭h繕鏄渶瑕佸皢lib搴撴嫹璐濆埌鏈湴銆傜幇鍦ㄥ彧鑳界粺涓鏄犲皠緗戠粶紜洏銆傞偅灝辨槸鍦ㄥ紑鍙戠殑鏃跺欐槸涓縐嶆柟寮忥紝鍦ㄥ彂甯冪殑鏃跺欏張鏄竴縐嶆ā寮忋俶aven瀵瑰紑鍙戠殑甯姪騫朵笉鏄緢澶э紝鏈夋剰涔夌殑鍐呭鍦ㄤ簬maven浼?xì)鈥滃己榪濊姹備綘灝介噺鍒嗗紑projcet涔嬮棿鐨勫悇灞傘?BR>
3銆乵aven鐨勫悇artifact 涔嬮棿鐨勪緷璧栭棶棰樸俶aven artifact 鐨剉ersion鍐沖畾涓嶱OM涓殑currentversion錛岃屾病鐢ㄨ兘澶熷拰CVS鐨剉ersion榪炴帴璧鋒潵銆傚鏋滃湪寮鍙戣繃紼嬩腑錛屼細(xì)鐢熸垚A銆丅涓や釜artifact錛孉渚濊禆浜嶣錛屼絾鏄疊緇忚繃鏀瑰姩鍚庯紝緙栬瘧A銆丅錛屾鏃禡aven騫朵笉鑳借嚜鍔ㄥ彂瑙塀宸茬粡鏀瑰姩榪囥傚彧瑕乵aven鍦╮epository鍙戠幇浜咮.currentversion.jar錛岄偅涔堝畠?yōu)兏嶄細(xì)灏咮閲嶆柊鎵撳寘錛宮aven榪樻槸蹇呴』閫氳繃縐嶇浜哄伐鎵嬫鎵嶈兘澶熷畬鎴愬厛緙栬瘧B(tài)鍐嶇紪璇慉銆傚湪嫻嬭瘯鐨勬椂鍊欎篃鏄姝ゃ傛諱箣錛屽繀欏昏繕鏄渶瑕佷漢涓虹殑鍙備笌鎵嶈兘淇濊瘉欏哄簭鐨勬紜紝鎵嶈兘淇濊瘉浣犳墍浣跨敤鐨勫簱錛屾槸鏈鏂扮殑搴撱?BR>
4銆佸鏋渕aven鍙兘鎻愪緵涓涓猺epository鐨勫姛鑳藉拰鍒╃敤POM鍑忓皯script鐨勫姛鑳斤紝閭g敤maven騫插悧鍛紵浣曞喌姣忎釜developer榪橀渶瑕佽嚜宸辨満鍣ㄤ笂鎷ユ湁repository銆傚鏋滆maven鎻愪緵浜嗚澶氱殑plugin錛岄偅涔堢幇鍦ㄧ殑ant涔熷彲浠ユ敮鎸侊紝鍙槸鏈兘姝e紡鎴愬艦銆?BR>
鎴戠殑鎰忔濇槸璇達(dá)細(xì)maven甯︽潵鐨勫唴瀹瑰茍涓嶆槸ant鐨勫畬鍏ㄦ浛浠e搧錛屾湁鏃跺欑敋鑷抽渶瑕佷漢宸ュ弬涓庢墠鑳借maven瀹屾垚浠誨姟銆傚綋鐒?dòng)灱宮aven鎻愪緵jelly錛岃嚜宸卞啓script錛屼絾閭d笉鏄張楹葷儲(chǔ)浜嗕箞錛?BR>
//maven 鍙互鍏堟帓闃熷摝錛岄棶棰?瑙e喅浜?/FONT>Overview
Common Directory Layout
Directory or file name
Content
Comment
LICENSE.txt
The license for the project.
This file contains the license that applies to the project.
project.xml
Maven project descriptor
This file contains the basic project configuration for maven (project name, developers, urls, dependencies, etc).
project.properties
A file defining project specific properties.
This file can be used to override maven default properties for the core and properties for the various plugins. It can also be used to define any maven properties used by a project. The properties defined in this file should be applicable to most users of your project, as opposed to custom properties for a specific build/user which should be defined in ${project.home}/build.properties
.
maven.xml
Maven configuration for defining build goals
This file contains the default maven goals for the project, plus added pre-post operations to be performed.
src/
Source code
This is the main directory for all the source code, subdivided in subdirectory to separate different "kind" of code.
src/java
Java source code
This directory contains all the java source code both for the library and the example webapp.
src/webapp
Example webapp source
This directory contains all the code (JSP, images, web.xml configuration) for the example webapp.
src/tld
tld
This directory contains the tag library definition file (tld), which is added in the library jar and in the examples war during the build.
xdocs/
Documentation files in XML format.
Maven projects use Jelly/JSL to transform documentation files in XML into HTML. Project documentation should be placed in this directory. Maven converts all XML files in this directory using JSL. Non-XML files (and directories) are copied without modification to permit the inclusion of "other" types of documentation (including images). The generated HTML files automatically inherit the Maven look-and-feel by default.
xdocs/navigation.xml
Navigation links for site.
Maven projects use Jelly stylesheets to transform documentation files in XML into HTML (XHTML for the most part). This file includes the navigation links that are added to each xdoc transformed in the xdocs
directory.
checkstyle.xml
Checkstyle configuration file
Configuration file containing checkstyle settings used during generation of reports. Maven-Generated Layout
Directory name
Content
Comment
target/
Contains compiled classes and JARs.
The contents of the target/ directory should be enough to use the project. This directory contains the final JAR and WAR that are generated.
target/classes
Contains compiled classes.
The target/classes directory contains all compiled classes. This directory is used when packaging the final JAR for a project.
target/generated-docs
Contains Maven generated xdocs.
The target/generated-docs directory contains all of the Maven-generated xdocs. All content generated by Maven is first converted to xdoc format, so the same stylesheet used to transform the rest of the site can be used on generated content. The contents of this directory are transformed and stored in the docs/ directory.
target/docs
Documentation files intended for the website publication.
The docs/ directory contains only generated documentation that is intended to be published as the project's website. This directory includes the Velocity/DVSL generated HTML files, JavaDocs, cross-referenced sources, and various generated reports. Generally, all documentation is stored in the xdocs/ directory and then "transformed" into this directory. The specific documents that Maven generates are described below.
target/docs/index.html
Starting point for browsing the documentation.
Browsing the documentation locally should yield the same results as browsing the documentation on the project's home page.
target/docs/apidocs
API documentation.
Maven automatically generates JavaDocs for projects using the JavaDoc utility. Placing the API documentation under docs/apidocs/ makes it slightly easier for other documentation files under docs/ to reference API documentation and vice versa.
target/docs/xref
Cross-referenced source code.
Maven automatically generates cross-referenced source code that enables easy browsing of an entire source tree. Placing the cross-referenced sources under docs/xref/ makes it slightly easier for other documentation files under docs/ to reference API documentation and vice versa.
target/docs/mail-lists.html
Mailing list documentation.
Maven automatically generates a list of mailing lists based on the information provided in the project descriptor.
target/docs/team-list.html
The list of project team members.
Maven automatically generates a list of project team members based on the information provided in the project descriptor.
target/docs/dependencies.html
The list of dependencies.
Maven automatically generates a list of dependencies based on the information provided in the project descriptor.
target/docs/changelog.html
The CVS change log.
Maven automatically generates a change log from CVS log messages. This log is currently limited to the past 30 days (but will be configurable in the future).
target/docs/file-activity-report.html
The File Activity Report.
Maven automatically generates a log from your SCM listing file changes in the last 30 days.
target/docs/developer-activity-report.html
The Developer Activity Report.
Maven automatically generates a log from your SCM listing changes per developer in the last 30 days.
target/docs/jdepend-report.html
Metric report.
Maven automatically generates a report on various source code metrics. This report can provide further insight into a project.
target/docs/checkstyle-report.html
Checkstyle report.
Maven automatically generates a report on the results of Checkstyle. This report provides assurance that the coding conventions for your project are being followed.
娉曟枃鍝?:)
浣犲彲浠ヨ嚜宸?maven -g >goal.txt 鏌ョ湅鎵鏈夊懡浠?
5銆佽繍琛?/SPAN>maven鍛戒護(hù)錛屽嵆鍙敓鎴愪竴緋誨垪鐨勬枃浠?/SPAN>
6銆佽繍琛?/SPAN>maven genapp 鍗沖彲鐢熸垚嫻嬭瘯鏂囦歡錛岃嚜鍔ㄤ笅杞芥枃浠訛紝鐒跺悗灝卞彲浠?/SPAN> maven java:compile浜嗐?/SPAN>
7. default.properties涓繙紼?/FONT>repository閲嶆柊璁劇疆: maven.repo.remote = http://apache.linuxforum.net/dist/java-repository,http://dist.codehaus.org/,http://mirrors.sunsite.dk/maven/,http://public.planetmirror.com/pub/maven,http://www.ibiblio.org/maven,http://www.ganet.org/maven/,http://test.topicus.nl/maven/
maven tutorial :
http://www-900.ibm.com/developerWorks/cn/java/j-maven/
http://www.theserverside.com/articles/article.tss?l=MavenMagic
浣跨敤涓鏋滄湁闂,鍙互鍙傝冧笅闈㈡枃绔?/FONT>. :) http://java.mblogger.cn/layout/posts/5731.aspx
浣嗘垜涓嬭澆鐨勬簮浠g爜鍜屽師鏂?/FONT>"Figure 3 "鐨勭洰褰曠粨鏋勪笉涓鑷?/FONT>, 鍙湁涓変釜鐩綍:service, Foobar-Web,ear. 鎵ц緇撴灉涓嶆紜?/FONT>.
鎴戝垎鍒湪榪欎笁涓洰褰曚笅,鍒嗗埆鎵цmaven, 鍓嶄袱涓凡緇忓畬鎴?/FONT>,浣嗘槸鍦?/FONT>ear鐩綍涓嬫墽琛?/FONT>maven鍛戒護(hù),鍒欐姤閿欏涓?/FONT>:
"Case-sensitive issue: The dependency xerces:xerces has a case problem. The dependency was either retrieved in the past with the wrong case or has been specified with the wrong case in your project.xml file. Fix your project.xml or update your local repository with the properly-cased file and try again."
璁╀漢閮侀椃鐨勬槸, 鎴戞妸repository閲岄潰鐨?/FONT>xerces鐩綍鍒犻櫎,榪樻槸鍙彲浠ュ畬鎴愬墠涓ゆ,絎笁姝ユ姤鍚屼竴涓敊璇?/FONT>.
鎴戝皢姣忎釜depency鐨?/FONT>properties鍏冪礌鍒犻櫎,灝卞彲浠ヤ簡 sucessful :(
鍙互璇鋒暀涓涓嬩箞?