This revision made January 19, 2010 16:31, by Felipe Gaúcho

Arena PUJ - Development Environment Configuration

Where is the project specification?

Would you like to know more about the project before to put your hands in the code jar? Here are the docs:

QuickStart - The code up and running in ~10 minutes

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 fgaucho@gmail.com

Environment Setup

  • 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_FROM=user@somemail.com
 MAIL_SMTP_USER=user@somemail.com
 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:
 DB_URL=jdbc\:mysql\://localhost\:3306/arena


Install MySql driver in Glassfish

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.

Checkout and build the source code

  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.

Start the MySql database

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

Building and deploying the application

  • 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

Testing the application

If everything worked fine, you should be able to access the following URLs:

Quality assurance

Java Quality Assurance & Continuous integration

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:

Web Resources Quality Assurance

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:

References

HTTP Protocol

RESTful Web-Services

Java EE

Tools

Difference compared to previous revision
<span>* [http://www.jslint.com/ JSLint] (javascript validator) =References= ==<span style="text-decoration:underline;color:green">HTTP Protocol== * [http://www.mnot.net/cache_docs/ Caching Tutorial ''for Web Authors and Webmasters''] ==</span>'''Arena PUJ - Development Environment Configuration''' [http://fgaucho.dyndns.org:8080/hudson/job/arena-puj/ [[image: title.png|right]]] [https://www.ohloh.net/p/arena-puj [[image: project_partner_badge.gif|right]]] ... * [http://www.infoq.com/articles/webber-rest-workflow How to GET a Cup of Coffee] * [http://jcalcote.wordpress.com/2008/10/16/put-or-post-the-rest-of-the-story/ PUT or POST: The REST of the Story] * [http://www.prescod.net/rest/mistakes/ Common REST Mistakes] * [http://www.xfront.com/REST-Web-Services.html Building Web Services the REST Way<span style="text-decoration:line-through;color:red">] * [http://architects.dzone.com/news/common-rest-design-pattern Common REST Design Pattern] * [http://www.innoq.com/resources/REST Resources about REST and RESTful Web services</span>] ==Java EE== * [http://java.sun.com/javaee/6/docs/tutorial/doc/ The Java EE 6 Tutorial]<span>
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2013, Oracle Corporation and/or its affiliates
(revision 20131025.e7cbc9d)
 
 
Close
loading
Please Confirm
Close