blob: bd09504ea623621efed66dd70dd0f9bc69cd7d3e [file] [log] [blame]
-----
How to Build
-----
-----
June 2008
~~
~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements. See the NOTICE file
~~ distributed with this work for additional information
~~ regarding copyright ownership. The ASF licenses this file
~~ to you under the Apache License, Version 2.0 (the
~~ "License"); you may not use this file except in compliance
~~ with the License. You may obtain a copy of the License at
~~
~~ http://www.apache.org/licenses/LICENSE-2.0
~~
~~ Unless required by applicable law or agreed to in writing,
~~ software distributed under the License is distributed on an
~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~~ KIND, either express or implied. See the License for the
~~ specific language governing permissions and limitations
~~ under the License.
~~
How to Build
This page provides the information required by developers to download the Wink source files and to build the Wink from these sources.
The Wink is based on Java. It uses SVN as the source control, and Maven for building
the sources.
* Java
Setup environment variable JAVA_HOME to the point where your JDK 1.5.12 or newer is installed.
* SVN
The Wink project is an internal open source that uses the SVN of Collabnet
as its version control system.
In order to retrieve the sources of the project you will have to install a SVN client.
This page describes how to install the SVN client so you can checkout the SVN sources.
** Installing SVN
[[1]] Download and install the {{{http://subversion.tigris.org}latest SVN client version}}
[[2]] Define the environment variable <<<SVN_HOME>>> to point to the SVN client installation directory.
[[3]] Add <<<%SVN_HOME%\bin>>> to your PATH environment variable.
** Checkout Sources
Latest sources can be downloaded from: <<<https://svn.apache.org/viewvc/incubator/wink/trunk/>>>\
To checkout the latest sources, use the following command: <<<svn checkout https://svn.apache.org/viewvc/incubator/wink/trunk/>>>\
** Third-Party Clients (recommended)
* Subclipse (Eclipse plugin)
* TortoiseSVN (Windows)
** References
{{{http://svnbook.red-bean.com/en/1.1/ch09.html}Subversion Complete Reference}}
* Maven
The Wink project uses Maven to compile its sources.
In order to compile the sources of the project Maven must be installed.
** Installing Maven
[[1]] Download and install {{{http://maven.apache.org}Maven 2}} (at least version 2.0.9)
[[2]] Define the environment variable <<<M2_HOME>>> to point to the maven installation directory.
[[3]] Add <<<%M2_HOME%\bin>>> to your PATH environment variable.
** How To Build
*** Using Command Line
Standard compilation of the Wink project should be performed by executing the <<<mvn clean install>>> command
The Follwing section provides some basic maven commands:
* <<<mvn compile>>> : compiles all sources
* <<<mvn clean>>> : cleans the files and directories generated by maven during its build (under target directory)
* <<<mvn test>>> : compiles the sources and runs the unit tests
* <<<mvn package>>> : compiles the sources, runs the unit tests and generates the JAR files
* <<<mvn install>>> : compiles the sources, runs the unit tests, generates the JAR files and add it into your local repository.
* <<<mvn site>>> : compiles the sources, runs the unit tests and generates a site with reports including test results, code coverage, file history and much more.
[]
<<Note:>> For each command the user can add the option -Dmaven.test.skip in order to skip the unit tests handling.
e.g. <<<mvn clean install -Dmaven.test.skip>>>
*** Using Eclipse
The Eclipse Maven plugin is not recommended. It's easier to define an external tool to run maven:
[[1]] Open the External Tools Dialog (Run->External Tools->Open External Tools Dialog)
[[2]] Add a new launch configuration to the Program configurations
[[3]] Name it "Maven install"
[[4]] In the "Location" put: <<<${env_var:M2_HOME}/bin/mvn.bat>>>
[[5]] In the "Working Directory" put: <<<${container_loc}>>>
[[6]] In the "Arguments" put: <<<install>>>
[[7]] Go to the "Common" tab and check the "External Tools" checkbox that's in the "Display in favorites menu"
[[8]] To run the maven build, select the pom.xml and go to Run->External Tools->Maven install
** References
{{{http://maven.apache.org/guides/getting-started/index.html}Maven Getting Started Guide}}