Configure Pom. XML in Maven 2.
Pom. xml file (for practical use ):
<Project xmlns = "http://maven.apache.org/POM/4.0.0"
Xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
Xsi: schemalocation = "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<Modelversion> 4.0.0 </modelversion>
<! -- Groupid: the unique identifier of a project or organization, and the path generated during configuration is also generated,
For example, the relative path generated by com. mycompany. app is/COM/mycompany/APP -->
<Groupid> Asia. banseon </groupid>
<! -- Artifactid: general name of the project -->
<Artifactid> banseon-maven2 </artifactid>
<! -- Packaging: Packaging mechanism, such as pom, jar, Maven-plugin, EJB, war, ear, rar, par -->
<Packaging> jar </packaging>
<! -- Version: Project version -->
<Version> 1.0-Snapshot </version>
<! -- Project name, used for Maven-generated documents -->
<Name> banseon-Maven </Name>
<! -- Which website can find this project and prompt that if the maven resource list does not exist, you can search for it directly on this website. MAVEN->
<URL> http://www.baidu.com/banseon </URL>
<! -- Project description, used for Maven-generated documents -->
<Description> A Maven project to study maven. </description>
<! -- Developer information -->
<Developers>
<Developer>
<ID> Hello World </ID>
<Name> banseon </Name>
<Email> banseon@126.com </Email>
<Roles>
<Role> Project Manager </role>
<Role> effecect </role>
</Roles>
<Organization> demo </organization>
Http://hi.baidu.com/banseon <organizationurl> </organizationurl>
<Properties>
<Dept> NO </DEPT>
</Properties>
<Timezone>-5 </timezone>
</Developer>
</Developers>
<! -- Similar to developers -->
<Contributors> </contributors>
<! -- The Mail list related to this project, used for subscription and other information -->
<MailingLists>
<Mailinglist>
<Name> demo </Name>
<! -- Link mail -->
<Post> banseon@126.com </post>
<! -- Mail for subscribe the project -->
<Subscribe> banseon@126.com </subscribe>
<! -- Mail for Unsubscribe the project -->
<Unsubscribe> banseon@126.com </Unsubscribe>
<Archive>
Http:/hi.baidu.com/banseon/demo/dev/
</Archive>
</Mailinglist>
</MailingLists>
<! -- Name and URL of the project's problem management system (Bugzilla, Jira, scarab, or any problem management system you like). In this example, Jira -->
<Issuemanagement>
<System> Jira </system>
<URL> http://jira.baidu.com/banseon </URL>
</Issuemanagement>
<! -- Organization information -->
<Organization>
<Name> demo </Name>
<URL> http://www.baidu.com/banseon </URL>
</Organization>
<! -- License -->
<Licenses>
<License>
<Name> Apache 2 </Name>
<URL> http://www.baidu.com/banseon/LICENSE-2.0.txt </URL>
<Distribution> repo </distribution>
<Comments> A business-friendly OSS license </comments>
</License>
</Licenses>
<! --
-The Software Configuration Management Tab allows you to configure your code library for Maven web sites and other plug-ins.
-If you are using CVS or subversion, the source repository page can also provide detailed and tool-related instructions on how to use the code library.
-The following is an example of a typical SCM configuration.
-->
<SCM>
<! -- Resources of the project on SVN -->
<Connection>
SCM: SVN: The http://svn.baidu.com/banseon/maven/banseon/banseon-maven2-trunk (Dao-trunk)
</Connection>
<Strong connection>
SCM: SVN: http://svn.baidu.com/banseon/maven/banseon/dao-trunk
</Login connection>
<URL> http://svn.baidu.com/banseon </URL>
</SCM>
<! -- Used to configure Distribution Management and configure the corresponding product release information. It is mainly used for publishing. After MVN deploy is executed, it indicates the location to be released. -->
<Distributionmanagement>
<! -- Configure to File System -->
<Repository>
Banseon-maven2
<Name> banseon maven2 </Name>
<URL> file: // $ {basedir}/target/deploy </URL>
</Repository>
<! -- Use SSH2 configuration -->
<Snapshotrepository>
Banseon-maven2
<Name> Banseon-maven2 snapshot repository </Name>
<URL> SCP: // svn.baidu.com/banseon:/usr/local/maven-snapshot </URL>
</Snapshotrepository>
<! -- Use SSH2 configuration -->
<Site>
<ID> banseon-site </ID>
<Name> business API website </Name>
<URL>
SCP: // svn.baidu.com/banseon:/var/www/localhost/banseon-web
</URL>
</Site>
</Distributionmanagement>
<! -- Dependency -->
<Dependencies>
<Dependency>
<Groupid> JUnit </groupid>
<Artifactid> JUnit </artifactid>
<Version> 3.8.1 </version>
<! -- Scope description
-Compile: default range, used for compilation
-Provided: similar to compiling, but supports the JDK or container, similar to classpath.
-Runtime: used during execution
-Test: used for test tasks
-System: the corresponding elements must be provided externally. Obtained Through systempath
-Systempath: used only in the range of system. Provide the corresponding path
-Optional: The annotation is optional. When the project itself is dependent. Used for continuous dependency
-->
<Scope> test </scope>
<! --
-Systempath: used only in the range of system. Provide the corresponding path
-Optional: The annotation is optional. When the project itself is dependent. Used for continuous dependency
-->
<! --
<Type> jar </type>
<Optional> true </Optional>
-->
</Dependency>
<! --
-Tells Maven that you only include the specified project, not the relevant dependencies. This factor is mainly used to solve version conflicts.
-The following dependency indicates that the project acegi-security depends on the org. springframework. XXX project, but we do not need to reference these projects.
-->
<Dependency>
<Groupid> org. acegisecurity </groupid>
<Artifactid> acegi-Security </artifactid>
<Version> 1.0.5 </version>
<Scope> runtime </scope>
<Exclusions>
<Exclusion>
<Artifactid> spring-core </artifactid>
<Groupid> org. springframework </groupid>
</Exclusion>
<Exclusion>
<Artifactid> spring-support </artifactid>
<Groupid> org. springframework </groupid>
</Exclusion>
<Exclusion>
<Artifactid> commons-logging </artifactid>
<Groupid> commons-logging </groupid>
</Exclusion>
<Exclusion>
<Artifactid> spring-jdbc </artifactid>
<Groupid> org. springframework </groupid>
</Exclusion>
<Exclusion>
<Artifactid> spring-remoting </artifactid>
<Groupid> org. springframework </groupid>
</Exclusion>
</Exclusions>
</Dependency>
<Dependency>
<Groupid> org. springframework </groupid>
<Artifactid> spring </artifactid>
<Version> 2.5.1 </version>
<Scope> runtime </scope>
</Dependency>
<Dependency>
<Groupid> org. springframework </groupid>
<Artifactid> spring-Web </artifactid>
<Version> 2.5.1 </version>
<Scope> runtime </scope>
</Dependency>
<Dependency>
<Groupid> postgresql </groupid>
<Artifactid> postgresql </artifactid>
<Version> 8.2-504. jdbc4 </version>
<Scope> runtime </scope>
</Dependency>
<Dependency>
<Groupid> com. Oracle </groupid>
<Artifactid> ojdbc6 </artifactid>
<Version> 11.1.0.6 </version>
<Scope> runtime </scope>
</Dependency>
</Dependencies>
<! --
-Maven proxy, a local repository, replaces the jar list on the maven.apache.org website. When downloading the jar list, you must first find the site
-If the resource is found, download it. Otherwise, go to the jar list website. For multiple teams, the download speed and personal storage space can be saved.
-->
<Repositories>
<Repository>
<ID> banseon-repository-proxy </ID>
<Name> banseon-repository-proxy </Name>
<URL> http: // 192.168.1.169: 9999/Repository/</URL>
<Layout> default </layout>
</Repository>
</Repositories>
For the POM configuration of Maven, see the following
Http://mvnrepository.com/artifact/com.ibm/com.ibm.mqjms/5.3.07
<Dependency>
<Groupid> com. IBM </groupid>
<Artifactid> com. IBM. mqjms </artifactid>
<Version> 5.3.07 </version>
</Dependency>