|
Building
IntroductionThis document how to build the Gaixie Micrite project. This guide is intended to cover how to build the latest svn/trunk,though other newer branches/tags should also follow similar instructions. PrerequisitesJava Developer Kit (JDK)You will need a JDK 5.0+ (J2SE 1.5.0+) or compatible JDK to build Micrite. Apache Maven 2To execute the build process you need to have Apache Maven version 2.0.9 (or newer) installed. mvn -version And it should produce something like: Maven version: 2.0.9 If you have an incompatible version the project build will probably fail with a message complaining SubversionTo fetch the source code for the server, you will need to have a Subversion client version 1.5 (or newer, 1.5 is recommended) installed. Windows Tip
Windows users are strongly encouraged to change the M2 local repository (the place where dependencies are downloaded) to a shorter path with no spaces, e.g. C:\.m2.
Using a longer path may cause the build to behave very strangely when it hits the 260 char limit for filenames on Windows.
In order to change the m2 local repository go to %USERPROFILE%\.m2 and edit or create settings.xml file to contain the following content:
--------------------------------------------------------
<?xml version="1.0"?>
<settings>
<localRepository>C:\.m2</localRepository>
</settings>
Checkout Micritesvn checkout http://micrite.googlecode.com/svn/trunk/ micrite-read-only See http://code.google.com/p/micrite/source/checkout for more detail.
Preparing to Build for the First TimeChances are you will need to increase the heap size for Maven. Add the MAVEN_OPTS environment variable to specify JVM properties, e.g. export MAVEN_OPTS="-Xms256m -Xmx512m" Windows Tip Add the MAVEN_OPTS environment variable by opening up the system properties (WinKey + Pause) --> "Advanced" tab--> "Environment Variables" button, then adding the MAVEN_OPTS variable in the user variables with the value -Xms256m -Xmx512m . This environment variable can be used to supply extra options to Maven. See http://maven.apache.org/download.html for more detail.
BuildingTo build all changes incrementally, from project root directory run: mvn install The first time, this will lead to "table does not exist" error messages but they can be (and are) ignored. To perform clean builds, which are sometimes needed after some changes to the source tree: mvn clean install
Testing the AssemblyOnce you have build micrite fully, which will produce a war archive from the assemblies modules, you can use jetty-maven-plugin to run it. From the assemblies directory run: mvn jetty:run And to stop, just CTRL-C. By default, Micrite use embedded Java database from the Apache Derby project, you can easily switch to another open source database such as MySQL, PostgreSQL. See InstallGuide for more detail. |
没用过maven,但是昨天用了一下,感觉还是摸不着头脑的感觉,maven安装配置一切正常,但是打包war的时候好像每个module都打包成了war。希望能给予更多的支持或者更详细的说明文档,谢谢!
At the of execute mvn jetty:run on micrite root directory i got :
ERROR? Failed to execute goal org.mortbay.jetty:maven-jetty-plugin:6.1.12:run ( default-cli) on project micrite-parent: Webapp source directory D:\Proyectos\Jav aGurus.net\Proyectos\eGas\Workspace\micrite\src\main\webapp does not exist -> [H elp 1] ERROR? ERROR? To see the full stack trace of the errors, re-run Maven with the -e swit ch. ERROR? Re-run Maven using the -X switch to enable full debug logging. ERROR? ERROR? For more information about the errors and possible solutions, please rea d the following articles: ERROR? 1? http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE xception