Skip to content

Instantly share code, notes, and snippets.

@thomasgohard
Last active August 29, 2015 14:24
Show Gist options
  • Save thomasgohard/3479fb5982835509e8c5 to your computer and use it in GitHub Desktop.
Save thomasgohard/3479fb5982835509e8c5 to your computer and use it in GitHub Desktop.
AEM development environment
# Setup a development environment for AEM using Brackets
1. Install Brackets.
2. Install the AEM and Brackets-git extensions.

Setup java-dev for Java development under Linux

Based on MX-14 (http://www.mepiscommunity.org/mx) installed as a VirtualBox guest.

The Java development environment is based on Java 7 and Tomcat 7 as MX-14 only includes Eclipse 3.8 (current version is 4.5). In the future, the Java development environment should be updated to Java 8 and Tomcat 8, using Eclipse 4.5.

Configuring the Linux guest

  1. sudo apt-get install dkms build-essential linux-headers-686-pae
  2. Mount the guest additions disc image
  3. sudo sh /media/VBOXADDITIONS_{version}/VBoxLinuxAdditions.run

Install Java 7, Tomcat 7, Maven, git, and Eclipse

  1. su -
  2. echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee /etc/apt/sources.list.d/webupd8team-java.list
  3. echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
  4. apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
  5. apt-get update
  6. apt-get install oracle-java7-installer oracle-java7-set-default tomcat7 tomcat7-user maven git eclipse
  7. exit

Configure Tomcat 7

  1. tomcat7-instance-create -p 10080 -c 10005 tomcat-dev
  2. cd tomcat-dev
  3. ln -s /usr/share/tomcat7/lib
  4. ln -s /etc/tomcat7/policy.d/03catalina.policy conf/catalina.policy
  5. ln -s /usr/share/tomcat7/bin/bootstrap.jar bin/bootstrap.jar
  6. ln -s /usr/share/tomcat7/bin/tomcat-juli.jar bin/tomcat-juli.jar
  7. mkdir -p common/classes
  8. mkdir -p server/classes
  9. mkdir -p shared/classes

Configure git

  1. git config --global user.name {your-name}
  2. git config --global user.email {the-email-address-you-use-for-github}

Configure Eclipse

  1. Start Eclipse
  2. Help -> Install New Software...
  3. Install the following:
    • m2e - Maven Integration for Eclipse
    • Eclipse EGit
    • Eclipse Java EE Developer Tools
    • Eclipse Java Web Developer Tools
    • Eclipse Web Developer Tools
    • JST Server Adapters Extensions
  4. Window -> Preferences -> Server -> Runtime Environments
  5. Click Add...
  6. Select Apache Tomcat v7.0
  7. Check Create new local server
  8. Click Next
  9. Set the Tomcat installation directory to {home}/tomcat-dev
  10. Click Finish
  11. Right-click on the server and select Properties.
  12. Go to the General tab.
  13. Click on switch location; it should read "/Servers/Tomcat v7.0 Server at localhost.server"
  14. Click OK
  15. Right-click on the server and select Open.
  16. Under Server Locations, select Use Tomcat installation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment