Arena PUJ - Development Environment Configuration
- 1 Where is the project specification?
- 2 QuickStart - The code up and running in ~10 minutes
- 2.1 Environment Setup
- 2.2 Install MySql driver in Glassfish
- 2.3 Checkout and build the source code
- 2.4 Start the MySql database
- 2.5 Building and deploying the application
- 2.6 Testing the application
- 3 Quality assurance
- 4 References
Would you like to know more about the project before to put your hands in the code jar? Here are the docs:
The following instructions were tested in Linux Ubuntu 9.10, but we assume it will work in other operational systems as well. If you have questions or problems during your local setup, please feel free to send an email to firstname.lastname@example.org
- Check if you have all software you need:
- Put the $GLASSFISH_HOME/bin in your $PATH (%path% on windows). It is required by the Maven script;
- Create a file called $HOME/.passwords directory, containing the following properties:
ASADMIN_USER=admin MAIL_HOST=smtp.some email.com MAIL_USER=user MAIL_FROMemail@example.com MAIL_SMTP_USERfirstname.lastname@example.org MAIL_SMTP_PORT=465 MAIL_SMTP_PASSWORD=some_password MYSQL_USER=root MYSQL_PASSWORD=adminadmin DB_URL=jdbc\\:mysql\\://localhost\\:3306/arena
- If you are using Windows, create the file %USERPROFILE%\.passwords and copy the above properties, but please change the DB_URL to:
You need to copy the MySql Connector/J jar file to the folder $AS_HOME/domains/domain1/lib/ext
This should be done manually and you should restart the server after copying the file. more...
- Please check if you are using the default domain1, otherwise modify the above command according your Server domain name.
hg clone https://kenai.com/hg/puj~arena cd puj~arena mvn clean install eclipse:eclipse
Done! Now you can import the project in your preferred IDE and play around the source code.
If the MySql database is not yet running, please turn it on:
- Linux Users: /etc/rc.d/init.d/mysqld start
- Windows Users: C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld
- Linux Users: use the profile -Phudson:
cd puj~arena asadmin start-domain mvn clean install -Phudson
- Windows Users: use the profile -PhudsonWin:
cd puj~arena asadmin start-domain mvn clean install -PhudsonWin
If everything worked fine, you should be able to access the following URLs:
Our project has a Continuous Integration Server configured to check the quality of our work continuously. If there is any commit in the last hour, this server will build a clean copy of the source code and generates quality reports based on Findbugs and PMD. Please visit that server regularly to check if your code is sound and considered good quality.
Also, please be sure to have the following plugins installed in your preferred IDE:
If you are producing a web-application, please install YSlow in the browser you use to validate the quality of your code. And other good practice is to do a functional test of your web-gui against the major browsers on the market (at least Firefox, IExplorer and Chrome). There are some online services to test a web application on different machine configurations and browser versions, like the popular browsershots.org.
Web resources validation: a good quality indicator about our web resources are the W3C validations. Please apply your documents for validation and review the W3C warnings and recommendations before to commit the files:
Other good tools for cleanup & enhance the quality of your web resources are:
- How to GET a Cup of Coffee
- PUT or POST: The REST of the Story
- Common REST Mistakes
- Building Web Services the REST Way