Space: Apache BVal (https://cwiki.apache.org/confluence/display/BeanValidation)
Page: Building 
(https://cwiki.apache.org/confluence/display/BeanValidation/Building)


Edited by Matt Benson:
---------------------------------------------------------------------
h2. Java

You will need a recent version of Java SE 5 or 6 from Sun installed to build 
and run the JUnit tests.
The IBM 5 or 6 SDK should also work and will be supported as best as possible.
Other Java vendors or Java SE 7 may work, so please ping the [Mailing Lists] if 
you encounter problems.

h2. Maven

h3. Command Line Builds

These instructions describe how to check out the current BVal trunk source code 
(from the Subversion source code management repository) and build it (using the 
Apache Maven 2 build tool). They are written for use from the console, and are 
known to work on Windows, Linux and MacOSX.

 # Ensure that you have Java installed and in your path by running: {{java 
-version}}
 # Install the build tool, Apache Maven 2.2.1 or later, from 
http://maven.apache.org/. If it is installed correctly, typing {{mvn -v}} from 
the console will result in the text {{Maven version: 2.2.1}}
 # Install Subversion v1.4.x or later from http://subversion.apache.org/. If it 
installed correctly, typing the following command should output help 
information: {{svn help}} or {{svn --version}}
 # Create a new directory you want to do your work in, then change to that 
directory from the console.
 # Check out the sources by running: {{svn co 
https://svn.apache.org/repos/asf/incubator/bval/trunk bval-trunk}}. It will 
check out the sources to a bval-trunk directory.
 # Change to the bval-trunk directory, which has already been created in the 
previous step.
 # Build the code by running: {{mvn install}}. The first time you run the 
build, many dependencies are automatically resolved and downloaded. *It is 
common for dependency downloading to fail the first time, which will fail the 
build.* If any of these dependency downloads fail, just re-run the command. You 
may also want to add a maven central mirror repository to your 
{{~/.m2/setting.xml}} file if download times are consistently slow or fail (see 
http://maven.apache.org/guides/mini/guide-mirror-settings.html)


h2. Eclipse with Command-line Maven utilities

# Checkout the source as described above
# Build the source using Maven as described above
# Create the Eclipse Metadata - \\
{noformat}
mvn eclipse:eclipse
{noformat}
** If this is the first project in your workspace to use maven artifacts you 
need to create a classpath variable named M2_REPO which contains the full path 
to your local repository. The eclipse plugin can do this for you with the 
following command \\
{noformat}
mvn eclipse:configure-workspace -Declipse.workspace=${path to your workspace} 
{noformat}
# Start Eclipse (3.4 or 3.5 suggested) and create a new workspace
# Import the BVAL project, by:
** Select File --> Import... --> General - Existing Projects into Workspace --> 
Next
** Select root directory = <svn checkout location above>
** Press Finish


h2. Eclipse with M2Eclipse plugin

# Checkout the source as described above
# Build the source using Maven as described above
# Start Eclipse (3.5 Galileo is recommended) and create a new workspace
# Good references for this M2Eclipse plugin (need to install the plugin into 
your Eclipse environment)
** http://m2eclipse.codehaus.org/
** http://docs.codehaus.org/display/M2ECLIPSE/Home
** 
http://www.theserverside.com/tt/articles/article.tss?l=Introductiontom2eclipse
# Import the BVAL project, by:
** Select File --> Import... --> General -> Maven Projects --> Next
** Select root directory = <svn checkout location above>
** All of the pom.xml files should be pre-selected for the svn checkout location
** You can affect the naming convention used for the generated Eclipse projects 
(one for each Maven module).  Click on Advanced and fill in the Name Template 
field.  I prefer "TRUNK-\[artifactId\]" since it helps with workspace 
organization, but it's your choice.
** Press Finish
** *Note:*  You may get a popup internal error at the end of this Import 
processing.  Not sure what the problem is, but it doesn't seem to affect the 
usage.  This will probably get cleared up soon since Eclipse 3.5 is still quite 
new.
** The bval-jsr303 module needs the jaxb2:xjc goal to run as part of its build 
process:  Add this to the project's Maven --> Lifecycle Mapping options under 
"Goals to invoke after project clean:".

\\


Change your notification preferences: 
https://cwiki.apache.org/confluence/users/viewnotifications.action    

Reply via email to