Efficient and trustworthy preservation planning.
To build you require:
- Git client
- Apache Maven 3
- Java Developers Kit 7 (e.g. OpenJDK 7)
For using the recommended IDE you require:
-
Start Eclipse
-
Install the m2e plugin
-
Install the checkstyle plugin
-
Import the projects
- Select "File > Import". Then, select "Maven > Existing Maven Projects" and click "Next"
- In the "Root Directory", browse to Plato source code directory on your filesystem and select "Open"
- Optionally, you can add it to a "Working set"
- Click "Finish"
-
Setting up Checkstyle If you are planning to contribute please setup the provided eclipse_formatter, cleanup_profile and checkstyle config file (in the build-tools-config project). To do this for all projects in this eclipse instance follow these steps:
-
Select Window > Preferences. In the new window select Java > Code Style > Clean Up and import the cleanup_profile.xml (mentioned above). Do the same for the Formatter in Java > Code Style > Formatter
-
For Checkstyle open again the preferences window and select Checkstyle. Click on the New button and select Project Relative Configuration. Afterwards give a name and browse to the checkstyle.xml file provided in the build-tools-config maven module. At the end select this to be the default checkstyle config.
-
To activate checkstyle for a certain project just right click on it select checkstyle > activate checkstyle. This will continuously check the code as you type and mark the bad spots with yellow and will provide warnings.
-
-
Setup Test Server To setup the test server make a copy of the already configured main instance, replace the standalone.xml with the generated standalone-test.xml, and rename it to standalone.xml.
-
Build
- Install maven version 3
- Install git client
- Clone Plato source from the Github:
git clone [email protected]:openplanets/plato.git
- Go into the folder plato and start the build process:
mvn clean install -Dps.port=80 -Dsp.domain=your.planningsuite.domain.org -Didp.domain=your.idp.domain.org -DskipTests
Parameters:
- ps.port=80: port on which the web-applications will be available (defaults to 8080)
- sp.domain: specifies the domain of the service provider - where Planning Suite will be available (defaults to localhost)
- idp.domain: the domain where your identity provider will be available(defaults to localhost)
NOTE: If your database is set up for the first time, you have to:
- Build planningsuite.ear with the additional parameter:
-Ddatabase.schema.generation=create
and deploy it to JBoss (like described above) - Stop JBoss
- Build planningsuite.ear once more without the additional parameter and deploy it again. This is important, otherwise the database gets re-created with each start - and your data gets lost
To run tests:
- Instead of parameter -DskipTests you have to provide the path to your local JBoss server (the one you have prepared for testing):
-DjbossHomeTest=< path to local jboss server >
After successful compile the generated artifacts are available in the target sub-folders of planningsuite-ear and idp
You have to use the war and ear files, you cannot deploy the exploded archives, because there is a bug in the maven-war plugin.
- Copy planningsuite-ear/target/planningsuite-ear.ear to your JBoss deployments folder
- Copy idp/target/idp.war to your JBoss deployments folder
- Fork the GitHub project
- Change the code and push into the forked project
- Submit a pull request
To increase the chances of your changes being accepted and merged into the official source here's a checklist of things to go over before submitting a contribution. For example:
- Has unit tests (that covers at least 80% of the code)
- Has documentation (at least 80% of public API)
- Agrees to contributor license agreement, certifying that any contributed code is original work and that the copyright is turned over to the project