Eclipse IDE for SME Server development
- Introduction
- Java SDK
- Eclipse standard edition
- Eclipse plug-ins for SME Server
- Further information
1. IntroductionEclipse IDE is the leader of the open source IDE. It's used to develop java applications but not only
[Read more]With this bundle, you will be able to :
- develop in Shell, Perl, Python, etc...
- connect to your source repositories with your favorite SCM
- connect to bugzilla
- manage the team development tasks
- write documentation in mediawiki style, inside eclipse
- generate Epub, Docbook, HTML files of documentations
- import SRPM in RPM project
- write a spec file with a templated form
- build the srpm and the rpm, inside eclipse
- ...
2. Java SDKEclipse needs a
Java installation with some tweaks to work well. You could install only JRE but
JRE is bundled in JDK and you will not have to install it after, if you want to develop a java application. There are no really
differences between
OpenJDK 7 and
Oracle JDK 7, we will install OpenJDK 7 except on the Windows desktop computers.
2.1. Installation (Centos 7)Open a terminal and type :
sudo yum install java-1.7.0-openjdk java-1.7.0-openjdk-devel java-1.7.0-openjdk-javadoc
2.2. JAVA path (Centos 7)Before installing Eclipse, you have to update your PATH. This can be done by typing the following lines in your shell:
cat << 'EOF' > /etc/profile.d/java.sh
# Path for Java in CentOS
export JAVA_HOME=/usr/lib/jvm/java
export PATH=$PATH:$JAVA_HOME/bin
EOF
tac << 'EOF' > /etc/profile.d/java.csh
setenv PATH $PATH:$JAVA_HOME/bin/
setenv JAVA_HOME /usr/lib/jvm/java
# Path for Java in CentOS
EOF
2.3. TestsNow Java SDK is correctly installed. To check the java type the following :
java -version && javac -version
3. Eclipse standard editionYou don't NEED to use Eclipse in order to work on the SME Server code. But if you don't know Eclipse, you should give it a try, as it's what a lot of developers are using, and it's powerful and open source software. Prior to installing Eclipse, be sure you have a Java SDK installed.
3.1. Eclipse download You can download Eclipse at
Eclipse website. Choose the latest
stable standard version and not a version for
java developers[ ! -d /usr/local/src/eclipse ] && mkdir /usr/local/src/eclipse
cd /usr/local/src/eclipse
wget http://mirror.ibcp.fr/pub/eclipse/technology/epp/downloads/release/luna/SR2/eclipse-standard-luna-SR2-linux-gtk-x86_64.tar.gz \
http://mirror.ibcp.fr/pub/eclipse/technology/epp/downloads/release/luna/SR2/eclipse-standard-luna-SR2-linux-gtk-x86_64.tar.gz.md5 \
http://mirror.ibcp.fr/pub/eclipse/technology/epp/downloads/release/luna/SR2/eclipse-standard-luna-SR2-linux-gtk-x86_64.tar.gz.sha1 \
http://mirror.ibcp.fr/pub/eclipse/technology/epp/downloads/release/luna/SR2/eclipse-standard-luna-SR2-linux-gtk-x86_64.tar.gz.sha512
3.2. Verify the integrity of the downloaded files A hash value processed on the downloaded files is a way to make sure that the content is not modified and has not been damaged during the download process.
sha512sum -c eclipse-standard-luna-SR2-linux-gtk-x86_64.tar.gz.sha512 && \
sha1sum -c eclipse-standard-luna-SR2-linux-gtk-x86_64.tar.gz.sha1 && \
md5sum -c eclipse-standard-luna-SR2-linux-gtk-x86_64.tar.gz.md5
If the values do not match, your downloaded files are broken. Try the download again, and recheck.
3.3. Eclipse installation on Centos 7Installing Eclipse is quite simple : you only have to extract the downloaded archive in the target folder (/opt). For instance, if the archive is a tar-gz archive, type the following :
tar -xzvf eclipse-standard-luna-SR2-linux-gtk-x86_64.tar.gz -C /opt/
Fix file permissions and ownership :
clear ; ls -lna /opt/ ; ls -lna /opt/eclipse/
chown -vR root:root /opt/eclipse
chmod -v 755 /opt/eclipse/eclipse
3.4. Eclipse shortcut and launcherOn Linux desktop, you may want to create a "desktop shortcut" :
cat << 'EOF' > /usr/share/applications/eclipse.desktop
[Desktop Entry]
Type=Application
Version=4.4.2
Name=Eclipse
GenericName=Eclipse Luna IDE
Comment=Eclipse Luna IDE
Exec=/opt/eclipse/eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Encoding=UTF-8
Categories=GTK;Development;IDE;
MimeType=text/x-perl;text/x-python;application/xml;text/x-sql;text/x-diff;
EOF
and to be able to start Eclipse with a command line :
ln -s /opt/eclipse/eclipse /usr/bin/eclipse
3.5. Eclipse configurationBefore starting eclipse you can tweak his
startup configuration file
eclipse.ini. First, move the "/opt/eclipse/eclipse.ini" file in the "/etc/eclipse" folder :
[ ! -d /etc/eclipse ] && mkdir /etc/eclipse
cp /opt/eclipse/eclipse.ini /etc/eclipse/ && chmod 644 /etc/eclipse/eclipse.ini
mv /opt/eclipse/eclipse.ini /opt/eclipse/eclipse.ini.bak
ln -s /etc/eclipse/eclipse.ini /opt/eclipse/eclipse.ini
clear ; more /opt/eclipse/eclipse.ini
Tuning
Garbage Collection
echo "-XX:+UseParallelGC" >> /etc/eclipse/eclipse.ini
echo "-XX:+CMSClassUnloadingEnabled" >> /etc/eclipse/eclipse.ini
Heap
optimization. The following values are for a computer desktop with 8 Go of RAM ( test and adapt the value):
echo "-XX:PermSize=256M" >> /etc/eclipse/eclipse.ini
sed -i "s/XX:MaxPermSize=256m/XX:MaxPermSize=512m/" /etc/eclipse/eclipse.ini
sed -i "s/Xms40m/Xms512m/" /etc/eclipse/eclipse.ini
sed -i "s/Xmx512m/Xmx2g/" /etc/eclipse/eclipse.ini
4. Eclipse plug-ins for SME ServerThere are hundreds of plug-ins available for the Eclipse IDE. Many are collected at and downloadable from the
Eclipse Marketplace.
Plug-ins can be installed according to 4 different ways :
- Help > Eclipse Marketplace > Find > Install
- Help > Install New Software > Add > Add Repository > Name + Location (Remote repository)
- Help > Install New Software > Add > Add Repository > Locale (Locale repository aka on your disk)
- Help > Install New Software > Add > Add Repository > Archive (zip or tar file)
4.1. Programming languages4.1.1. Shell scripts :
ShellEdHelp > Eclipse Marketplace > Find : "ShellEd" > Install
4.1.2. Perl scripts :
Epic v.0.6.57 (last stable)
You must install perl-PadWalker :
sudo yum install perl-PadWalker
Help > Install New Software > Add > Add Repository > Name + Location
Name : EPIC
Location :
http://e-p-i-c.sourceforge.net/updates> Ok
4.1.3. Web development :
Aptana 3Aptana Studio 3 should be installed as a standalone software.
4.2. Tasks Management4.2.1.
Bugzilla connector :
MylynHelp > Eclipse Marketplace > Find : "Mylyn" > Install
4.2.2.
Mediawiki editor :
Mylyn WikiTextHelp > Eclipse Marketplace > Find : "Mylyn WikiText" > Install
4.3. Sources management4.3.1.
CVS (bundled in Eclipse)
You can check out the sources using CVS. Eclipse supplies a CVS team programming environment that enables you to share your work with others.
4.3.2.
GIT :
EGit - Git Team ProviderHelp > Eclipse Marketplace > Find : "EGit" > Install
4.4. Database and LDAP4.4.1.
Apache Directory Project :
Apache Directory StudioApache Directory Studio should be installed as a standalone software.
4.4.2.
Data Tools Platform Project :
Eclipse DTPHelp > Eclipse Marketplace > Find : "Data Tools Platform" > Install
JDBC Drivers :
4.4.3. Database manager :
DBeaverDBeaver should be installed as a standalone software.
4.5. PackagingSpec file editor from
Linux Tools ProjectYou must install the rpmlint and rpm-build packages :
yum install rpmlint rpm-build
Help > Install New Software > Add > Add Repository > Name + Location
Name : Linux Tools Project
Location :
http://download.eclipse.org/linuxtools/update>Ok
Work with : --All Availables sites--
Type filter text : rpm
Select : Linux Tools > RPM Tools
5. Further informationYou can find useful further information in the following websites:
This post is a short extract (and a bad translation) from my notes. I tried to make it the smallest as possible, don't hesitate to add your suggestions...