Ubuntu - Setup Eclipse wiht Java EE, Maven for Spring development

Context

Starting with a new toolset requires a clean drawing board and - as I believe this is currently the best solution -be able to go back in time where things still worked ;-)
The aim is to create a VirtualBox VM with Ubuntu as OS.
The toolset to be installed for the development is Java (and EE), Eclipse, Maven, Spring) ... for now at least. I suppose a number will need to be added to the stack but I'll add them along the way.

Thanks to a number of sources I used to fall back in the need to sharpen (better but not to say is build) my knowledge of the Ubuntu Desktop environment. It's yet an other kind of Linux than the one I'm used to. (Redhat, Fedora, Oracle Linux ... )

Ubuntu is based on Debian and ... if I recall well Debian is also the basis for Mac OS X ...my platform in favour.


Software download links

  • Virtualbox : www.virtualbox.org
  • Ubuntu : 
  • Java JDK 7 : with apt get 
  • Java EE SDK : from oracle website
  • Eclipse : www.eclipse.org/downloads
  • Maven : 
  • Spring
  • Oracle Express Database ( https://forums.oracle.com/thread/2303639 )
  • vim  and vim-gnome via apt-get ( not needed but a personal favour)
  • Maven for eclipse (software install url to be used within eclipse) 
    http://q4e.googlecode.com/svn/trunk/updatesite-iam/
  • Spring IDE 3.4.0 Release (Software install and update url to be used within eclipse (can be found in the marketplace of eclipse) Google search arguments sprint ide 3.4.0 release eclipse marketplace, then click the download button on the right)
    http://dist.springsource.com/release/TOOLS/update/e3.7/
  • tomcat download
    wget http://mirror.atlanticmetro.net/apache/tomcat/tomcat-7/v7.0.29/bin/apache-tomcat-7.0.29.tar.g 

References

  • Install Eclipse with Maven for Spring development : See Eclipse Spring video's on Youtube. Free intros by Cave Of Programming (http://www.caveofprogramming.com)
  • Installation of Java on Ubuntu ... just to get the standard java version:
    http://askubuntu.com/questions/309900/installing-java-7-update-25-on-12-04-lts
  • Installation of Eclipse on Ubuntu:
    http://askubuntu.com/questions/26632/how-to-install-eclipse
  • Installation of Tomcat on Ubuntu 12.04
    https://www.digitalocean.com/community/articles/how-to-install-apache-tomcat-on-ubuntu-12-04
  • Installation Oracle Express Edition
    http://askubuntu.com/questions/198163/how-to-install-oracle-express-11gr2

VM Creation

 Create Virtualbox VM with following specs:
 - 8 GB memory
 - 4 virtual cores
 - disk of 60 GB
 - nic connected to internet via NAT Network (new from 4.3 vbox)

Ubuntu 1204 LTS


Install from Iso File 64 bit
Install Ubuntu 12.04 LTS 64 bit
Update as far as possible

Oracle Java jdk 7


install java on ubuntu ... 
http://askubuntu.com/questions/309900/installing-java-7-update-25-on-12-04-lts
Steps to be executed :

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer


The first step adds the repository to the apt 'namespaces for repositories'
The next step will update the packages in the Ubuntu installation ... all of them. Took an hour to execute.
The last step finally installs the java jdk
Execute a java -version to verify the version of java your running now.

Oracle Java EE

Download from the Oracle website.
File is called : java_ee_sdk-7-unix-ml.sh

Uses the installed Java JDK
And installs also the Glassfish Middleware server from Oracle (Sun inheritance)

Glassfish server 4848

Starting domain
_______________
Executing command :/home/jhelling/glassfish4/glassfish/bin/asadmin start-domain domain1

/home/jhelling/glassfish4/glassfish/bin/asadmin start-domain domain1
Waiting for domain1 to start ..........
Successfully started the domain : domain1
domain  Location: /home/jhelling/glassfish4/glassfish/domains/domain1
Log File: /home/jhelling/glassfish4/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Command start-domain executed successfully.


Java EE + Glassfish installation.

Please see the detailed summary report for an overview of this session, including next steps for using this installation.Please see the log file for detailed information.
 2013-12-15-01-29-install-summary.html 2013-12-15-01-29-install.log
Product Name
Status
Update Tool Bootstrap
Installed
GlassFish Server
Installed
Uninstallation Software
Installed
Update Tool Bootstrap
Configured
GlassFish Server
Configured

Eclipse

Advice to download Eclipse for Java EE Developers (Also for building web interfaces). The steps to install Eclipse on Ubuntu are xplained here:
http://askubuntu.com/questions/26632/how-to-install-eclipse

Optain maven for


Install the Glassfish tools for Eclipse
This is documented in the following post :
Steps:
  • open eclipse
  • in the Window > Show View > Servers
  • In the new opened pane right click and select New Server
  • Click in the link to download the additional server adapters
  • and ... wait ... 
  • From the list of providers select GlassFish tools (Oracle)
  • Install the software 
  • restart eclipse.
  • After restart go to the servers and add a new one
  • select as type the correct version of Glassfish server.
  • Select as install directory of glassfish the directory where it was installed
    (~/Glassfish4/glassfish)
  • Provide credentials ... ( by default leave the password empty )
  • The local server will be viewable in the list of the servers. 
  • Right clicking on the server will show a number of adminstrative actions that can be taken on the server and further on on the applications that will be installed.