The Server Side Overview
Firstly I would like to inform you about my server side environment as following: -| # | Component | Version | Remarks |
| 1 | The operating system | Windows Vista | |
| 2 | The Java | JDK 1.6.0_21 | |
| 3 | Maven | 2.2.1 | |
| 4 | The Apache Tomcat | 6.0.29 | |
| 5 | The CollabNet Subversion | 1.3.0 | |
| 6 | MySQL | 5.1.50 | |
| 7 | XAMPP | 1.7.3 | Apache HTTP |
| 8 | Artifactory | 2.3.0 | Deployed at tomcat |
| 9 | Hudson | 1.384 | Deployed at tomcat |
| 10 | Bugzilla | 3.6.2 | Deployed at XAMPP |
| 11 | OpenDS | 2.2.0 | The User LDAP |
I use the “Artifactory” as a Maven Repository Manager. Why we need it? Please see further information here.
The Client Side Configuration
The client side need to be configured for supporting the Maven Repository Manager, too and here is the steps: -Configure the Maven Configuration Home
Overview
The Maven Configuration Home is a folder contains the maven configuration file “settings.xml”. There are 2 location by defaults as- The Maven Install: <MAVEN_HOME>/conf/settings.xml
- The User Install: <USER_HOME>/.m2/settings.xml
Steps
- Open the command line interface, for me the dos prompt from cmd.exe with the administrator permission.
- Change directory to your <USER_HOME> directory, for me is C:\Users\Charlee.Ch
- Create the directory/folder named “.m2” (dot m two) by using the following command: -
| Command |
| mkdir “.m2” |
- Open the web browser and go to the Artifactory application.
- On the left hand side menu, choose “Client Settings” --> “Maven Settings”
- On the right panel check the checkbox named “Mirror Any”, and select the “repo” from the drop down list.
- Click the “Generate Setting” button.
- The system will display the “Maven Settings” screen.
- Click the icon “Copy to Clipboard” and paste to your text editor.
- Add the following tag at the top (inside the
tag) :-
| Tag for mentioning the local repository folder |
| <localRepository><YOUR_DECIDED_FOLDER>localRepository> |
| Example: <localRepository>D:/M2/RepositorylocalRepository> |
At the moment we will download them from the remote repository via internet, later we will deploy our own resources to the repository manager and let other use us.
- Save it as “settings.xml” under the <USER_HOME>/.m2
Summary
At the moment my client is ready to be a Maven Client and is connected to the Maven Repository Manager. You can find more information about the configuration from the Maven website and the Artifactory website.Next I will use the IDE to work with this setting, please stay tuned as always.
ไม่มีความคิดเห็น:
แสดงความคิดเห็น