The first step in using the Maven2 build is to either:
Once in place, please customize the properties as one would have done for Maven1 using build.properties. The properties are preconfigured for embedded Derby, so more changes are required if another database solution is to be used. To complete this step, ensure that the proper jetspeed database active profile is uncommented for your database in the <activeProfiles> element jetspeed-db-drivers-path should be selected for all non-embedded databases. This setting is needed to execute Jetspeed component tests.
While the default location of the settings.xml file should not be changed, (e.g. ~/.m2/settings.xml), one can relocate the repository using the <localRepository> element in the settings.xml file. See the settings.xml.sample file for an example. Note that the repository path must be an absolute path and not contain any property expressions.
Here is a quick summary of the current Jetspeed2.2 Maven2 build commands, (most of these commands can be executed at the root of the J2.2 source tree or at lower levels to perform partial builds/deployments):
commands |
explanation |
mvn |
performs base build and installs J2 artifacts in the Maven2 repository, (install is the default Maven2 goal for this build) |
mvn install -P init |
performs base build and includes execution of test cases |
mvn jetspeed-db:init -P test -db |
performs base build and includes execution of test cases,If you want to run the tests, first a test database needs to be (re)created(includes test database setup) |
mvn -Dmaven.test.skip=false test |
to run test from any directory of the project, maven.test.skip property when set to 'true': skips the compiling tests,when set to 'false': compiles the tests |
mvn jetspeed-deploy:deploy -P demo |
deploys the war to the server |
mvn clean |
cleans all build target directories |
other commands |
explanation |
Please note that the Maven2 repositories used by default with this build are generally saturated and the Jetspeed2 Maven2 repository does not yet contain a full mirror of the artifacts required to build Jetspeed2. If you experience download or connection failures, simply restart the build by issuing your last command again to retry.